?? startup.c
字號:
/* * File : startup.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Develop Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes * 2006-08-31 Bernard first implementation */#include <rthw.h>#include <rtthread.h>#include "board.h"extern void rt_hw_board_init(void);extern void rt_system_timer_init(void);extern void rt_system_scheduler_init(void);extern void rt_thread_idle_init(void);extern void rt_hw_cpu_icache_enable(void);/** * @addtogroup STM32 *//*@{*/extern int rt_application_init(void);extern void rt_show_version(void);#ifdef DEBUG/******************************************************************************** Function Name : assert_failed* Description : Reports the name of the source file and the source line number* where the assert error has occurred.* Input : - file: pointer to the source file name* - line: assert error line source number* Output : None* Return : None*******************************************************************************/void assert_failed(u8* file, u32 line){ rt_kprintf("\n\r Wrong parameter value detected on\r\n"); rt_kprintf(" file %s\r\n", file); rt_kprintf(" line %d\r\n", line); while (1) ;}#endif/** * 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(); /* init idle thread */ rt_thread_idle_init(); /* start scheduler */ rt_system_scheduler_start(); /* never reach here */ return ;}int main(){ rtthread_startup();
return 0;}/*@}*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -