|
|
int rtthread_startup(void)/ a% Z2 I3 Q, V
{
+ N" m7 X7 E& V& c/ Z$ Q1 p* G3 Z+ }+ r X% K. y
rt_hw_interrupt_disable();
! k9 x% x X2 ]! @0 ?! eSCB->VTOR= FLASH_BASE | 0X10000;
9 k: c, U5 o% ]% d$ v- b/* board level initalization' ^# s* g$ C: U: X
* NOTE: please initialize heap inside board initialization.
$ y- `: g" S0 l*/
7 d. ^0 [- [, n$ u0 V+ Jrt_hw_board_init();5 z( f G, l+ n, W. i% l
/* show RT-Thread version */
: ]! f' t7 \ _3 G# lrt_show_version();& r) Z- q, N* S2 O8 q: M# n
/* timer system initialization */' x- G! k. |7 C }; O3 l: e
rt_system_timer_init();
; o- h# `) {$ t3 H- ` ~( I9 m- [/* scheduler system initialization */
; U7 G. p9 V1 O- q5 ~7 brt_system_scheduler_init();5 a& s- e" H. Y6 r
ifdef RT_USING_SIGNALS, c" P1 j" d7 M
/* signal system initialization */
1 t( f; d$ R; B+ ~3 F7 irt_system_signal_init();6 F' W1 T3 `! `: c1 {/ ?$ |& T
endif
% U3 e% L, B. u* K6 ^6 a/ N9 s/* create init_thread */8 o7 j- d D* t8 x
rt_application_init();
) W0 X- U1 u9 |2 L; q/* timer thread initialization */
+ L* R3 x# U( D4 q, J! g9 hrt_system_timer_thread_init();
( O3 }% p' M$ w+ H3 p" ^3 t/* idle thread initialization */
: [! m9 `$ Z. G8 n/ art_thread_idle_init();% r" w) f- o8 X8 T, O r
/* start scheduler */' `/ w4 @& l. t* I
rt_system_scheduler_start();
8 A. E6 z6 j* B# F/* never reach here */
1 H5 W' A/ f0 p9 h; `return 0;
' f' ~. u7 C8 H% @/ G) S$ g}
4 i0 {$ K0 U' I) A. G: |1 w$ F9 ^按照这样加偏移向量试一下$ r$ u: x$ J' f6 F; p7 b
|
|