?? 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 * Triseel */#include <rtthread.h>#include <rthw.h>#include <AT9200.h>#include <board.h>#include <serial.h>#ifdef RT_USING_LWIP#include <netif/ethernetif.h>#endifchar _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");extern void rt_hw_interrupt_init(void);extern void rt_hw_board_init(void);extern void rt_serial_init(UARTPort_T *pargUARTPort);extern void rt_system_timer_init(void);extern void rt_system_scheduler_init(void);extern void rt_system_heap_init(void* begin_addr, void* end_addr);extern void rt_thread_idle_init(void);extern void rt_hw_cpu_icache_enable(void);extern void rt_show_version(void);/** * @addtogroup AT9200 *//*@{*/#ifdef __CC_ARMextern unsigned char* __bss_start;extern unsigned char* __bss_end;#elseextern unsigned char __bss_start;extern unsigned char __bss_end;#endifextern void finsh_system_init(void);extern int rt_application_init(void);/** * This function will startup RT-Thread RTOS. */void rtthread_startup(void){ /* enable cpu cache */ rt_hw_cpu_icache_enable(); rt_hw_cpu_dcache_enable(); /* init hardware interrupt */ rt_hw_interrupt_init(); /* init board timer as OS timer tick*/ rt_hw_board_init(); /* show version info */ 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#ifdef __CC_ARM rt_system_heap_init((void*)__bss_end, 0x21000000);#else rt_system_heap_init((void*)&__bss_end, (void*)0x21000000);#endif#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#ifdef RT_USING_DEVICE /*init device system*/ rt_system_device_init();#ifdef RT_USING_LWIP eth_system_device_init(); /* register AT91 EMAC device */ at91ether_register("E0");#endif /*init all registed devices*/ rt_device_init_all();#endif /* 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(); /* init application */ rt_application_init(); /*only unmask this int currently*/ rt_hw_interrupt_umask(SYS_VEC); /* start scheduler */ rt_system_scheduler_start(); return ;}/*@}*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -