提交 18389f76 编写于 作者: L lijin.unix

fix bug: init soft timer thread

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@574 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 9a27a2a9
...@@ -10,15 +10,16 @@ ...@@ -10,15 +10,16 @@
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2008-12-11 xuxinming first version * 2008-12-11 xuxinming first version
* 2010-4-3 LiJin add init soft timer thread
*/ */
#include <rthw.h> #include <rthw.h>
#include <rtthread.h> #include <rtthread.h>
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
#include <finsh.h> #include <finsh.h>
extern void finsh_system_init(void); extern void finsh_system_init(void);
#endif #endif
#include <LPC24xx.h> #include <LPC24xx.h>
#include <board.h> #include <board.h>
...@@ -29,15 +30,15 @@ extern void finsh_system_init(void); ...@@ -29,15 +30,15 @@ extern void finsh_system_init(void);
/*@{*/ /*@{*/
extern int rt_application_init(void); extern int rt_application_init(void);
#ifdef RT_USING_DEVICE #ifdef RT_USING_DEVICE
extern rt_err_t rt_hw_serial_init(void); extern rt_err_t rt_hw_serial_init(void);
#endif #endif
#ifdef __CC_ARM #ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit; extern int Image$$RW_IRAM1$$ZI$$Limit;
#else #else
extern int __bss_end; extern int __bss_end;
#endif #endif
/** /**
* This function will startup RT-Thread RTOS. * This function will startup RT-Thread RTOS.
...@@ -66,20 +67,20 @@ void rtthread_startup(void) ...@@ -66,20 +67,20 @@ void rtthread_startup(void)
#ifdef __CC_ARM #ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40010000); rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40010000);
#else #else
rt_system_heap_init((void*)&__bss_end, (void*)0x40010000); rt_system_heap_init((void*)&__bss_end, (void*)0x40010000);
#endif #endif
#endif #endif
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE #ifdef RT_USING_DEVICE
/* init hardware serial device */ /* init hardware serial device */
rt_hw_serial_init(); rt_hw_serial_init();
/*init all registed devices*/ /*init all registed devices*/
rt_device_init_all(); rt_device_init_all();
#endif #endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();
...@@ -89,6 +90,9 @@ void rtthread_startup(void) ...@@ -89,6 +90,9 @@ void rtthread_startup(void)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
/* init soft timer thread */
rt_system_timer_thread_init();
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();
...@@ -97,16 +101,16 @@ void rtthread_startup(void) ...@@ -97,16 +101,16 @@ void rtthread_startup(void)
/* never reach here */ /* never reach here */
return ; return ;
} }
#ifdef __CC_ARM #ifdef __CC_ARM
int main(void) int main(void)
{ {
/* invoke rtthread_startup */ /* invoke rtthread_startup */
rtthread_startup(); rtthread_startup();
return 0; return 0;
} }
#endif #endif
/*@}*/ /*@}*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册