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

Function rtthread_startup

bsp/bf533/startup.c:23–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21extern struct rt_device uart0_device;
22
23void rtthread_startup(void)
24{
25 /* init hardware interrupt */
26 rt_hw_interrupt_init();
27
28 /* init board */
29 rt_hw_board_init();
30
31 /* show version */
32 rt_show_version();
33
34 /* init timer system */
35 rt_system_timer_init();
36
37#ifdef RT_USING_HEAP
38 rt_system_heap_init((void*)&rtt_heap_start, (void*)&rtt_heap_end);
39#endif
40
41#ifdef RT_USING_MODULE
42 /* init module system*/
43 rt_system_module_init();
44#endif
45
46 /* init scheduler system */
47 rt_system_scheduler_init();
48
49#ifdef RT_USING_DEVICE
50 /* register uart0 */
51 rt_hw_serial_register(&uart0_device, "uart0",
52 RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
53 &uart0);
54
55 rt_console_set_device("uart0");
56#endif
57
58 /* init application */
59 rt_application_init();
60
61#ifdef RT_USING_FINSH
62 /* init finsh */
63 extern int finsh_system_init(void);
64 finsh_system_init();
65#if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
66 finsh_set_device("uart0");
67#endif
68#endif
69
70 rt_system_timer_thread_init();
71
72 /* init idle thread */
73 rt_thread_idle_init();
74
75 /* start scheduler */
76 rt_system_scheduler_start();
77
78 /* never reach here */
79 return ;
80}

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_system_module_initFunction · 0.85
rt_console_set_deviceFunction · 0.85
finsh_system_initFunction · 0.85
finsh_set_deviceFunction · 0.85
rt_thread_idle_initFunction · 0.85
rt_hw_interrupt_initFunction · 0.70
rt_hw_board_initFunction · 0.70
rt_application_initFunction · 0.70

Tested by

no test coverage detected