|
int rtthread_startup(void)/ \0 t1 C/ l: v3 S8 U! U: w
{2 E. Z# d' T K
6 R+ x- i- F$ c3 M8 e1 Zrt_hw_interrupt_disable();/ z2 h) u1 i8 n
SCB->VTOR= FLASH_BASE | 0X10000;
- h' R7 w Y, \- [0 _5 x# O: D; J: l/* board level initalization
; r, {, Q9 w4 a/ `; R( d* NOTE: please initialize heap inside board initialization.
: A$ H& ?7 S5 i*/
1 R) r9 W; V5 |' O- n7 drt_hw_board_init();
% |, K. F) h3 d/ g* M/* show RT-Thread version */
9 L/ G* u$ I. D3 \' [rt_show_version();
: y: l, d; U9 t6 N- Y3 ]/* timer system initialization */
4 t, c" O- l9 y, _6 W3 drt_system_timer_init();
' [6 a7 {0 n- e0 H/* scheduler system initialization */+ v- m3 D# Y7 \" }9 P* p, R
rt_system_scheduler_init();; r- O: z* A4 w
ifdef RT_USING_SIGNALS. j3 s, Z# m1 o( a+ T6 }% X6 Y
/* signal system initialization */. d9 _, T' L! f, T
rt_system_signal_init();
+ T- E$ F; |) R3 |- Zendif' V. }) X' @$ n/ J. J# k
/* create init_thread */# u F( x* |1 e+ p
rt_application_init();& P$ x6 _' x2 H5 n/ ] T
/* timer thread initialization */
& x3 n$ E' Q# i- `$ @rt_system_timer_thread_init();( Z6 g; g v6 c4 Y3 H2 [+ G
/* idle thread initialization */3 |3 W; n. A! `, V& i
rt_thread_idle_init();' ~: T* a0 Z/ T, |( w. L0 `
/* start scheduler */ F/ ]& R3 z! ^
rt_system_scheduler_start();
! V! q9 W8 L) d) p" E* G/* never reach here */1 A2 o6 \, w5 y! ?/ t/ I1 Z F
return 0; L/ S# ]: q- O: Y/ u! r
}
/ F* M0 ]9 \) W7 C. j0 W按照这样加偏移向量试一下
2 t) v( V& K4 C+ v1 Z ~ |
|