summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorlijin.unix <[email protected]>2010-04-03 08:31:06 +0000
committerlijin.unix <[email protected]>2010-04-03 08:31:06 +0000
commit18389f7628f393eb293b072be5ac0e2f4b6292c3 (patch)
tree3497d3823a2245245ce43f680586325e93dae26a /bsp
parent9a27a2a96cc1650eec8d767d5d4cbf63341e9eb4 (diff)
fix bug: init soft timer thread
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@574 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
-rw-r--r--bsp/lpc2478/startup.c60
1 files changed, 32 insertions, 28 deletions
diff --git a/bsp/lpc2478/startup.c b/bsp/lpc2478/startup.c
index 2ea112c8e0..6024805c55 100644
--- a/bsp/lpc2478/startup.c
+++ b/bsp/lpc2478/startup.c
@@ -10,15 +10,16 @@
* Change Logs:
* Date Author Notes
* 2008-12-11 xuxinming first version
+ * 2010-4-3 LiJin add init soft timer thread
*/
#include <rthw.h>
-#include <rtthread.h>
+#include <rtthread.h>
-#ifdef RT_USING_FINSH
-#include <finsh.h>
+#ifdef RT_USING_FINSH
+#include <finsh.h>
extern void finsh_system_init(void);
-#endif
+#endif
#include <LPC24xx.h>
#include <board.h>
@@ -29,15 +30,15 @@ extern void finsh_system_init(void);
/*@{*/
extern int rt_application_init(void);
-#ifdef RT_USING_DEVICE
-extern rt_err_t rt_hw_serial_init(void);
+#ifdef RT_USING_DEVICE
+extern rt_err_t rt_hw_serial_init(void);
#endif
#ifdef __CC_ARM
-extern int Image$$RW_IRAM1$$ZI$$Limit;
-#else
-extern int __bss_end;
-#endif
+extern int Image$$RW_IRAM1$$ZI$$Limit;
+#else
+extern int __bss_end;
+#endif
/**
* This function will startup RT-Thread RTOS.
@@ -66,20 +67,20 @@ void rtthread_startup(void)
#ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40010000);
#else
- rt_system_heap_init((void*)&__bss_end, (void*)0x40010000);
+ rt_system_heap_init((void*)&__bss_end, (void*)0x40010000);
#endif
#endif
/* init scheduler system */
rt_system_scheduler_init();
-#ifdef RT_USING_DEVICE
- /* init hardware serial device */
- rt_hw_serial_init();
-
- /*init all registed devices*/
- rt_device_init_all();
-#endif
+#ifdef RT_USING_DEVICE
+ /* init hardware serial device */
+ rt_hw_serial_init();
+
+ /*init all registed devices*/
+ rt_device_init_all();
+#endif
/* init application */
rt_application_init();
@@ -89,6 +90,9 @@ void rtthread_startup(void)
finsh_set_device("uart1");
#endif
+ /* init soft timer thread */
+ rt_system_timer_thread_init();
+
/* init idle thread */
rt_thread_idle_init();
@@ -97,16 +101,16 @@ void rtthread_startup(void)
/* never reach here */
return ;
-}
-
+}
+
#ifdef __CC_ARM
-int main(void)
-{
- /* invoke rtthread_startup */
- rtthread_startup();
-
- return 0;
-}
-#endif
+int main(void)
+{
+ /* invoke rtthread_startup */
+ rtthread_startup();
+
+ return 0;
+}
+#endif
/*@}*/