|
int rtthread_startup(void)
$ s* {) A4 C1 j$ [6 u1 X: V{
" \0 w( J8 ~. s0 r b) ~: Q( ]" Y& r% N3 a6 | D9 ?$ R! Y( U
rt_hw_interrupt_disable();1 z5 U) M& I' ^8 y
SCB->VTOR= FLASH_BASE | 0X10000;
0 K) R: o8 G2 F) p; G5 w0 g/* board level initalization
) n( o: [0 p1 c. w* NOTE: please initialize heap inside board initialization.
* d! M( b- p W# [- W*/1 ~- K. |# Z' \4 J
rt_hw_board_init();/ f! s. ]9 r# I) h4 s, ]* `
/* show RT-Thread version */6 M- j9 D* P% w1 Z. {8 V" P
rt_show_version();7 L& @' l) _! R# H4 Q
/* timer system initialization */2 V7 O' s3 p7 O! W2 t- p1 ~& S: ]
rt_system_timer_init();
8 s- @7 }7 U' ~2 R3 w! C/ e( v( X/* scheduler system initialization */8 s0 k' D8 K" G
rt_system_scheduler_init();
) ~( F0 c& w) s, i/ f' ?" Vifdef RT_USING_SIGNALS2 u; Z+ E6 j0 o! f" @
/* signal system initialization */ u- J, t5 p* q% b" F6 T# H: K
rt_system_signal_init();
/ a7 j4 I/ h, E$ K5 S9 Bendif
6 h8 m6 `1 g* M- q7 r0 Z0 k9 j/* create init_thread */
2 C7 N9 U" f& e! U3 K. o+ o" Yrt_application_init();0 O- i7 n. g6 M" j( s& F
/* timer thread initialization */
" u6 X$ k& e+ M crt_system_timer_thread_init();
, Z D! G! |- P) g0 }/* idle thread initialization */
" G" h* c$ w; Zrt_thread_idle_init();+ Y: q; e k9 X5 @
/* start scheduler */
, u7 W r& b* Z! hrt_system_scheduler_start();
( v) ^7 G1 B' ]: Y/* never reach here */
2 a2 h7 ^0 z7 u" i: Z; ireturn 0;
6 b5 o2 {" Q6 A) t0 w}
" s. w3 {: n; D- Z1 G, `按照这样加偏移向量试一下
2 }; b4 P! \8 n |
|