MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rtthread_startup

Function rtthread_startup

bsp/microblaze/startup.c:44–100  ·  view source on GitHub ↗

* This function will startup RT-Thread RTOS. */

Source from the content-addressed store, hash-verified

42 * This function will startup RT-Thread RTOS.
43 */
44void rtthread_startup(void)
45{
46 /* init hardware interrupt */
47 rt_hw_interrupt_init();
48
49 /* init board */
50 rt_hw_board_init();
51
52 rt_show_version();
53
54 /* init timer system */
55 rt_system_timer_init();
56
57#ifdef RT_USING_HEAP
58#ifdef __CC_ARM
59 rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x204000);
60#elif __ICCARM__
61 rt_system_heap_init(__segment_end("HEAP"), (void*)0x204000);
62#else
63 rt_system_heap_init((void*)&__bss_end, (void*)(&__bss_end+0x4000));
64
65#endif
66#endif
67
68 /* init scheduler system */
69 rt_system_scheduler_init();
70
71#ifdef RT_USING_HOOK /* if the hook is used */
72 /* set idle thread hook */
73 rt_thread_idle_sethook(rt_hw_led_flash);
74#endif
75
76#ifdef RT_USING_DEVICE
77 /* init hardware serial device */
78 rt_hw_serial_init();
79#endif
80
81 /* init application */
82 rt_application_init();
83
84#ifdef RT_USING_FINSH
85 /* init finsh */
86 finsh_system_init();
87#if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
88 finsh_set_device("uart1");
89#endif
90#endif
91
92 /* init idle thread */
93 rt_thread_idle_init();
94
95 /* start scheduler */
96 rt_system_scheduler_start();
97
98 /* never reach here */
99 return ;
100}
101

Callers 7

mainFunction · 0.70
Reset_HandlerFunction · 0.50
Reset_HandlerFunction · 0.50
Reset_HandlerFunction · 0.50
Reset_HandlerFunction · 0.50
Reset_HandlerFunction · 0.50
Reset_HandlerFunction · 0.50

Calls 13

rt_show_versionFunction · 0.85
rt_system_timer_initFunction · 0.85
rt_system_heap_initFunction · 0.85
rt_thread_idle_sethookFunction · 0.85
finsh_system_initFunction · 0.85
finsh_set_deviceFunction · 0.85
rt_thread_idle_initFunction · 0.85
rt_hw_board_initFunction · 0.70
rt_application_initFunction · 0.70
rt_hw_interrupt_initFunction · 0.50
rt_system_scheduler_initFunction · 0.50
rt_hw_serial_initFunction · 0.50

Tested by

no test coverage detected