int main(void) { #ifdef RT_USING_HEAP extern void __heap_start__; extern void __heap_end__; #endif rt_hw_board_init(); rt_system_tick_init(); rt_system_object_init(); rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init(&__heap_start__, &__heap_end__); #endif rt_system_scheduler_init(); rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device(FINSH_DEVICE_NAME); #endif rt_thread_idle_init(); rt_system_scheduler_start(); return 0; }
static void rtthread_startup(void) { /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); #ifdef RT_USING_HEAP rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END); #endif /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize system timer*/ rt_system_timer_init(); /* initialize application */ rt_application_init(); /* initialize timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); /* init scheduler system */ rt_system_scheduler_init(); /* init application */ rt_application_init(); //printf("%f \n", 0.1); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
int rtthread_startup(void) { rt_hw_interrupt_disable(); /* board level initalization * NOTE: please initialize heap inside board initialization. */ rt_hw_board_init(); /* show RT-Thread version */ rt_show_version(); /* timer system initialization */ rt_system_timer_init(); /* scheduler system initialization */ rt_system_scheduler_init(); /* create init_thread */ rt_application_init(); /* timer thread initialization */ rt_system_timer_thread_init(); /* idle thread initialization */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init hardware interrupt */ rt_hw_interrupt_init(); /* init board */ rt_hw_board_init(); rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x204000); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)0x204000); #else rt_system_heap_init((void*)&__bss_end, (void*)0x204000); #endif #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_HOOK /* if the hook is used */ /* set idle thread hook */ rt_thread_idle_sethook(rt_hw_led_flash); #endif #ifdef RT_USING_DEVICE /* init hardware serial device */ rt_hw_serial_init(); #endif /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device("uart1"); #endif /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
// 此函数在main之前完成系统的相关初始化 int rtthread_startup(void) { rt_hw_interrupt_disable(); // 关系统中断 /* board level initalization * NOTE: please initialize heap inside board initialization. */ rt_hw_board_init(); // 板级初始化,系统外设相关初始化,时钟,中断,内存,控制台 /* show RT-Thread version */ rt_show_version(); /* timer system initialization */ rt_system_timer_init(); // 初始化一组软件定时器 /* scheduler system initialization */ rt_system_scheduler_init(); // 系统调度器初始化 /* create init_thread */ rt_application_init(); // 创建初始化任务 /* timer thread initialization */ rt_system_timer_thread_init(); // 定时器任务,管理所有的定时器 /* idle thread initialization */ rt_thread_idle_init(); // 空闲任务 /* start scheduler */ rt_system_scheduler_start(); // 启动系统调度器 /* never reach here */ return 0; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP #if STM32_EXT_SRAM rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END); #else #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END); #else /* init memory system */ rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END); #endif #endif #endif /* init scheduler system */ rt_system_scheduler_init(); /* init all device */ rt_device_init_all(); /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device(FINSH_DEVICE_NAME); #endif rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init hardware interrupt */ rt_hw_interrupt_init(); /* init board */ rt_hw_board_init(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); rt_show_version(); /* init timer system */ rt_system_timer_init(); /* init memory system */ #ifdef RT_USING_HEAP #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40010000); #else rt_system_heap_init((void*)&__bss_end, (void*)0x40010000); #endif #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_DEVICE /* init hardware serial device */ rt_hw_serial_init(); /*init all registed devices*/ rt_device_init_all(); #endif /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device("uart1"); #endif /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { app_getGUID(); /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); rt_kprintf(" device id:%x %x %x %x\n",devguid[0],devguid[1],devguid[2],devguid[3]); #ifdef RT_USING_HEAP /* initialize memory system */ #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)(0x10000000 + 1024*64)); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)(0x10000000 + 1024*64)); #else rt_system_heap_init((void*)&__bss_end, (void*)(0x10000000 + 1024*64)); #endif #endif /* initialize scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_DFS /* init sdcard driver */ #ifdef RT_USE_SDIO rt_hw_sdcard_init(); #else rt_hw_msd_init(); #endif #endif /* initialize application */ rt_application_init(); #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); finsh_set_device( FINSH_DEVICE_NAME ); #endif /* initialize timer */ rt_system_timer_init(); /* initialize timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP #ifdef __ICCM16C__ rt_system_heap_init(__segment_begin("DATA16_HEAP"),__segment_end("DATA16_HEAP")); #endif #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_DEVICE /* init all device */ rt_device_init_all(); #endif /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device("uart0"); #endif /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init cache */ rt_hw_cache_init(); /* init hardware interrupt */ rt_hw_interrupt_init(); /* copy vector */ memcpy((void *)A_K0BASE, tlb_refill_exception, 0x20); memcpy((void *)(A_K0BASE + 0x180), general_exception, 0x20); memcpy((void *)(A_K0BASE + 0x200), irq_exception, 0x20); /* init board */ rt_hw_board_init(); rt_show_version(); /* init tick */ rt_system_tick_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END); #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_DEVICE /* init all device */ rt_device_init_all(); #endif /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device(FINSH_DEVICE_NAME); #endif /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END); #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_AD7606 ad7606_init(); #endif #ifdef RT_USING_M3AD m3ad_init(); #endif led_config(); led_turn_off_all(); iepe_init(); skf_init(); /* init all device */ rt_device_init_all(); /* init application */ rt_application_init(); /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* disable interrupt first */ rt_hw_interrupt_disable(); /* initialize hardware interrupt */ rt_hw_interrupt_init(); /* initialize mmu */ rt_hw_mmu_init(fh_mem_desc, sizeof(fh_mem_desc)/sizeof(fh_mem_desc[0])); rt_system_heap_init((void*)&__bss_end, (void*)FH_RTT_OS_MEM_END); #ifdef RT_USING_DMA_MEM //just use the last 100KB fh_dma_mem_init((rt_uint32_t *)FH_RTT_OS_MEM_END, FH_DMA_MEM_SIZE); #endif /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* initialize tick */ rt_system_tick_init(); /* initialize kernel object */ rt_system_object_init(); /* initialize timer system */ rt_system_timer_init(); /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize application */ rt_application_init(); /* initialize system timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END); #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_DEVICE /* init all device */ rt_device_init_all(); #endif /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device( FINSH_DEVICE_NAME ); #endif /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
void rtthread_startup() { /* init hardware interrupt */ rt_hw_interrupt_init(); /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); /* init heap memory system */ rt_system_heap_init(&__bss_end, (void*)0x45000000); /* init scheduler system */ rt_system_scheduler_init(); /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); #ifdef RT_USING_DEVICE finsh_set_device("uart0"); #endif #endif rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP /* init memory system */ rt_system_heap_init((void*)&_ramfunc_end, (void*)PIC32_SRAM_END); #endif /* init scheduler system */ rt_system_scheduler_init(); /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); #ifdef RT_USING_DEVICE finsh_set_device("uart1"); #endif #endif /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP /* init memory system */ rt_system_heap_init((void *)heap, (void *)&heap[RT_HEAP_SIZE - 1]); #endif /* init scheduler system */ rt_system_scheduler_init(); /* init all device */ #ifdef RT_USING_DEVICE rt_device_init_all(); #endif /* init basic system */ rt_basic_system_init(); /* init application */ rt_application_init(); /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init cache */ rt_hw_cache_init(); /* init hardware interrupt */ rt_hw_interrupt_init(); /* init board */ rt_hw_board_init(); rt_show_version(); /* init tick */ rt_system_tick_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END); #endif /* init scheduler system */ rt_system_scheduler_init(); #ifdef RT_USING_DEVICE /* init all device */ rt_device_init_all(); #endif /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device(FINSH_DEVICE_NAME); #endif /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #if STM32_EXT_SRAM ext_sram_init(); rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END); #else rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END); #endif /* STM32_EXT_SRAM */ /* init scheduler system */ rt_system_scheduler_init(); /* init all device */ rt_device_init_all(); /* init application */ rt_application_init(); /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); #ifdef RT_USING_HEAP #if STM32_EXT_SRAM rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END); //rt_system_heap_init((void*)(0x10000000), (void*)(0x10000000 + UTIL_CCM_HEAP_SIZE*4)); #else #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END); #else /* init memory system */ rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END); #endif #endif /* STM32_EXT_SRAM */ #endif /* RT_USING_HEAP */ /* init scheduler system */ rt_system_scheduler_init(); /* initialize timer */ rt_system_timer_init(); /* init timer thread */ rt_system_timer_thread_init(); /* init application */ rt_application_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* initialize tick */ rt_system_tick_init(); /* initialize kernel object */ rt_system_object_init(); /* initialize timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP #if LPC_EXT_SDRAM rt_system_heap_init((void *)LPC_EXT_SDRAM_BEGIN, (void *)LPC_EXT_SDRAM_END); sram_init(); #else rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END); #endif #endif /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize application */ rt_application_init(); /* initialize timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init hardware interrupt */ rt_hw_interrupt_init(); /* init board */ rt_hw_board_init(); rt_show_version(); /* init tick */ rt_system_tick_init(); /* init timer system */ rt_system_timer_init(); /* init memory system */ #ifdef RT_USING_HEAP rt_system_heap_init((void*)&__heap_start, (void*)&__heap_end); #endif /* init scheduler system */ rt_system_scheduler_init(); /* init application */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device("uart1"); #endif /* init soft timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* initialize timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END); #endif #ifdef RT_USING_MODULE rt_system_module_init(); #endif /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize application */ rt_application_init(); #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); finsh_set_device( FINSH_DEVICE_NAME ); #endif /* initialize timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); #ifdef RT_USING_HEAP /* initialize memory system */ #ifdef __CC_ARM /*rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x10004000);*/ rt_system_heap_init((void*)0x2007C000, (void*)(0x2007C000 + 0x4000)); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)0x10004000); #else rt_system_heap_init((void*)&__bss_end, (void*)0x10004000); #endif #endif /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize application */ rt_application_init(); /* initialize timer */ rt_system_timer_init(); /* initialize timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); #ifdef RT_USING_HEAP #if STM32_EXT_SRAM rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END); #else #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END); #elif __ICCARM__ //初始化系统堆空间(除去编译时分配的全局变量、静态局部变量外的其他剩余内存被设置为系统堆空间,被系统管理起来) rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END); #else /* init memory system */ rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END); #endif #endif /* STM32_EXT_SRAM */ #endif /* RT_USING_HEAP */ rt_system_scheduler_init();//系统调度器初始化 rt_system_timer_init();//系统定时器初始化 rt_system_timer_thread_init();//系统软件定时器线程初始化 rt_application_init();//应用程序初始化 rt_thread_idle_init();//初始化空闲线程 rt_system_scheduler_start();//开始线程调度此后便进入各个线程的无限循环 /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* initialize board */ rt_hw_board_init(); /* show version */ rt_show_version(); /* initialize tick */ rt_system_tick_init(); /* initialize kernel object */ rt_system_object_init(); /* initialize timer system */ rt_system_timer_init(); /* initialize system heap */ rt_system_heap_init(HEAP_BEGIN, HEAP_END); /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize application */ rt_application_init(); /* initialize timer thread */ rt_system_timer_thread_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { // platform_init(); // print_version(); /* initialzie hardware interrupt */ rt_hw_interrupt_init(); /* initialize board */ rt_hw_board_init(); /* show RT-Thread version */ rt_show_version(); /* initialize memory system */ #ifdef RT_USING_HEAP rt_system_heap_init(HEAP_BEGIN, HEAP_END); #endif /* initialize scheduler system */ rt_system_scheduler_init(); /* initialize timer and soft timer thread */ rt_system_timer_init(); rt_system_timer_thread_init(); /* initialize application */ rt_application_init(); /* initialize idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* show version */ rt_show_version(); #ifdef RT_USING_HEAP #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)FM3_SRAM_END); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)FM3_SRAM_END); #else /* init memory system */ rt_system_heap_init((void*)&__bss_end, (void*)FM3_SRAM_END); #endif #endif /* init scheduler system */ rt_system_scheduler_init(); /* init timer thread */ rt_system_timer_thread_init(); /* init application */ rt_application_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* init board */ rt_hw_board_init(); /* init tick */ rt_system_tick_init(); /* init kernel object */ rt_system_object_init(); /* init timer system */ rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END); #endif /* init scheduler system */ rt_system_scheduler_init(); /* init application */ rt_application_init(); /* init timer thread */ rt_system_timer_thread_init(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ; }
/** * This function will startup RT-Thread RTOS. */ void rtthread_startup(void) { /* 初始化硬件平台相关:时钟设置、中断设置、系统滴答设置、串口设置 */ rt_hw_board_init(); /* init tick */ rt_system_tick_init(); /* 内核对象初始化 */ rt_system_object_init(); /* 系统定时器初始化 */ rt_system_timer_init(); /* 如果使用动态内存分配,则配置之 */ #ifdef RT_USING_HEAP #if STM32_EXT_SRAM rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END); #else #ifdef __CC_ARM rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END); #elif __ICCARM__ rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END); #else /* init memory system */ rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END); #endif #endif #endif /* 系统调度器初始化 */ rt_system_scheduler_init(); #ifdef RT_USING_DFS /* init sdcard driver */ #if STM32_USE_SDIO rt_hw_sdcard_init(); #else rt_hw_msd_init(); #endif #endif /*下面可加入用户所需的相关初始化 */ /*上面可加入用户所需的相关初始化 */ /* 实时时钟初始化 */ #if(0) rt_hw_rtc_init(); #endif /* 系统设备对象初始化 */ rt_device_init_all(); /* 用户应用初始化 */ rt_application_init(); #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); finsh_set_device("uart1"); #endif /* 初始化软件定时器 */ rt_system_timer_thread_init(); /* 初始化空闲线程 */ rt_thread_idle_init(); /* 开始线程调度 此后便进入各个线程的无限循环 */ rt_system_scheduler_start(); /* never reach here */ return ; }