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

Function rtthread_startup

bsp/efm32/startup.c:74–135  ·  view source on GitHub ↗

/ * @brief * Startup RT-Thread * * @details * * @note * ******************************************************************************/

Source from the content-addressed store, hash-verified

72 *
73 ******************************************************************************/
74void rtthread_startup(void)
75{
76 /* init board */
77 rt_hw_board_init();
78
79#ifdef RT_USING_HEAP
80 #ifdef __CC_ARM
81 rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)EFM32_SRAM_END);
82 #elif __ICCARM__
83 rt_system_heap_init(__segment_end("HEAP"), (void*)EFM32_SRAM_END);
84 #else
85 /* init memory system */
86 rt_system_heap_init((void*)&__bss_end__, (void*)EFM32_SRAM_END);
87 #endif
88#endif
89
90 /* enable interrupt */
91 rt_hw_interrupt_enable(0x0UL);
92
93 /* init drivers */
94 rt_hw_driver_init();
95
96 /* show version */
97 rt_show_version();
98
99 /* init timer system */
100 rt_system_timer_init();
101
102 /* init scheduler system */
103 rt_system_scheduler_init();
104
105 /* init finsh */
106#ifdef RT_USING_FINSH
107 finsh_system_init();
108#if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
109 finsh_set_device(CONSOLE_DEVICE);
110#endif
111#endif
112
113 /* Initialize gui server */
114#ifdef RT_USING_RTGUI
115 rtgui_system_server_init();
116#endif
117
118 /* init timer thread */
119 rt_system_timer_thread_init();
120
121 /* init idle thread */
122 rt_thread_idle_init();
123
124 /* init energy mode thread */
125 efm32_emu_init();
126
127 /* init application */
128 rt_application_init();
129
130 /* start scheduler */
131 rt_system_scheduler_start();

Callers 1

mainFunction · 0.70

Calls 14

rt_system_heap_initFunction · 0.85
rt_hw_driver_initFunction · 0.85
rt_show_versionFunction · 0.85
rt_system_timer_initFunction · 0.85
finsh_system_initFunction · 0.85
finsh_set_deviceFunction · 0.85
rt_thread_idle_initFunction · 0.85
efm32_emu_initFunction · 0.85
rt_hw_board_initFunction · 0.70
rt_application_initFunction · 0.70
rt_hw_interrupt_enableFunction · 0.50

Tested by

no test coverage detected