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

📄 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-10-25     Bernard      first implementation */#include <rtthread.h>#include <rthw.h>#include <board.h>#include <pxa270.h>char _undefined_stack_start[128];char _abort_stack_start[128];char _irq_stack_start[1024];char _fiq_stack_start[1024];char _svc_stack_start[4096] SECTION(".nobbs");/** * @addtogroup PXA270 *//*@{*/extern unsigned char __bss_start;extern unsigned char __bss_end;/* clear .bss */void rt_hw_clear_bss(){	unsigned char *dst;	dst = &__bss_start; 	while (dst < &__bss_end) *dst++ = 0;}extern void finsh_system_init(void);extern int  rt_application_init(void);/** * @brief the startup entry of RT-Thread RTOS * * This function will startup RT-Thread RTOS */void rtthread_startup(){	/* clear .bss */	rt_hw_clear_bss();	/* enable cpu cache */	rt_hw_cpu_icache_enable();	/* init hardware interrupt */	rt_hw_interrupt_init();	/* init board */	// rt_hw_board_init();	/* show rtt version information */	rt_show_version();	/* init tick */	rt_system_tick_init();	/* init kernel object */	rt_system_object_init();	/* init timer system */	rt_system_timer_init();	/* init memory system */#ifdef RT_USING_HEAP	rt_system_page_init((void*)&__bss_end, (void*)0xa4000000);#endif	/* init scheduler system */	rt_system_scheduler_init();#ifdef RT_USING_HOOK	/* set idle thread hook */	rt_thread_idle_sethook(rt_hw_led_flash);#endif	/* init application */	rt_application_init();	/* init finsh */#ifdef RT_USING_FINSH	/* init the finsh input */	rt_hw_finsh_init();	/* init finsh */	finsh_system_init();#endif	/* init idle thread */	rt_thread_idle_init();	// while (1) rt_hw_led_flash();	/* start scheduler */	rt_system_scheduler_start();	/* never reach here */	return ;}/*@}*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -