1 /*
2  * Copyright (c) 2006-2023, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date         Author      Notes
8  * 2012-02-13   mojingxian  first version
9  */
10 
11 #include "application.h"
12 #include "board.h"
13 #include "rtthread.h"
14 
app_init_entry(void * parg)15 void app_init_entry(void *parg)
16 {
17     parg = parg;
18 
19     rt_hw_core_timer_init();//start system tick in first thread.
20 
21     rt_hw_isr_install();
22 }
23 
24 
rt_application_init(void)25 void rt_application_init(void)
26 {
27     rt_thread_t led_thread;
28 
29 #ifdef RT_USING_HEAP
30     led_thread = rt_thread_create("init", app_init_entry, RT_NULL, 512, 200, 20);
31 #endif
32 
33     if (led_thread != RT_NULL)
34     {
35         rt_thread_startup(led_thread);
36     }
37 }
38