⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startup.c

📁 RT-Thread是发展中的下一代微内核嵌入式实时操作系统
💻 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 + -