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

Function rtthread_startup

bsp/wh44b0/startup.c:45–103  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

43 * This function will startup RT-Thread RTOS.
44 */
45void rtthread_startup(void)
46{
47 /* enable cpu cache */
48 rt_hw_cpu_icache_enable();
49
50 /* init hardware interrupt */
51 rt_hw_interrupt_init();
52
53 /* init board */
54 rt_hw_board_init();
55
56 /* init hardware serial */
57 rt_serial_init();
58
59 rt_show_version();
60
61 /* init timer system */
62 rt_system_timer_init();
63
64 /* init memory system */
65#ifdef RT_USING_HEAP
66#ifdef __CC_ARM
67 rt_system_heap_init((void*)&Image$$RW_RAM1$$ZI$$Limit, (void*)0xD000000);
68#else
69 rt_system_heap_init((void*)&__bss_end, (void*)0xD000000);
70#endif
71#endif
72
73 /* init scheduler system */
74 rt_system_scheduler_init();
75
76#ifdef RT_USING_HOOK
77 /* set idle thread hook */
78 rt_thread_idle_sethook(rt_hw_led_flash);
79#endif
80
81 /* init application */
82 rt_application_init();
83
84#ifdef RT_USING_FINSH
85 /* init the finsh input */
86 rt_hw_finsh_init();
87
88 /* init finsh */
89 finsh_system_init();
90#endif
91
92 /* init idle thread */
93 rt_thread_idle_init();
94
95 /* unmask interrupt */
96 rt_hw_interrupt_umask(INT_GLOBAL);
97
98 /* start scheduler */
99 rt_system_scheduler_start();
100
101 /* never reach here */
102 return ;

Callers 1

mainFunction · 0.70

Calls 15

rt_show_versionFunction · 0.85
rt_system_timer_initFunction · 0.85
rt_system_heap_initFunction · 0.85
rt_thread_idle_sethookFunction · 0.85
rt_hw_finsh_initFunction · 0.85
finsh_system_initFunction · 0.85
rt_thread_idle_initFunction · 0.85
rt_hw_board_initFunction · 0.70
rt_application_initFunction · 0.70
rt_hw_cpu_icache_enableFunction · 0.50
rt_hw_interrupt_initFunction · 0.50
rt_serial_initFunction · 0.50

Tested by

no test coverage detected