summaryrefslogtreecommitdiff
path: root/bsp/mini2440/applications/startup.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-05-28 16:20:08 +0800
committerGitHub <[email protected]>2021-05-28 16:20:08 +0800
commit92beddf3bccf6346e26aa097f82464456fb8e6bd (patch)
tree197e4a108118dda016ea02274172f0c40e7ee8ed /bsp/mini2440/applications/startup.c
parentb18a99b44240ec3152011e159cc24a5af8dff0ce (diff)
parent03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff)
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'bsp/mini2440/applications/startup.c')
-rw-r--r--bsp/mini2440/applications/startup.c122
1 files changed, 61 insertions, 61 deletions
diff --git a/bsp/mini2440/applications/startup.c b/bsp/mini2440/applications/startup.c
index 162cc8a7b4..3d21949b6c 100644
--- a/bsp/mini2440/applications/startup.c
+++ b/bsp/mini2440/applications/startup.c
@@ -43,17 +43,17 @@ extern struct rt_device uart2_device;
/*@{*/
#if defined(__CC_ARM)
- extern int Image$$ER_ZI$$ZI$$Base;
- extern int Image$$ER_ZI$$ZI$$Length;
- extern int Image$$ER_ZI$$ZI$$Limit;
+ extern int Image$$ER_ZI$$ZI$$Base;
+ extern int Image$$ER_ZI$$ZI$$Length;
+ extern int Image$$ER_ZI$$ZI$$Limit;
#elif (defined (__GNUC__))
- rt_uint8_t _irq_stack_start[1024];
- rt_uint8_t _fiq_stack_start[1024];
- rt_uint8_t _undefined_stack_start[512];
- rt_uint8_t _abort_stack_start[512];
- rt_uint8_t _svc_stack_start[4096] SECTION(".nobss");
- extern unsigned char __bss_start;
- extern unsigned char __bss_end;
+ rt_uint8_t _irq_stack_start[1024];
+ rt_uint8_t _fiq_stack_start[1024];
+ rt_uint8_t _undefined_stack_start[512];
+ rt_uint8_t _abort_stack_start[512];
+ rt_uint8_t _svc_stack_start[4096] SECTION(".nobss");
+ extern unsigned char __bss_start;
+ extern unsigned char __bss_end;
#endif
#ifdef RT_USING_FINSH
@@ -65,97 +65,97 @@ extern int finsh_system_init(void);
*/
void rtthread_startup(void)
{
- /* enable cpu cache */
- rt_hw_cpu_icache_enable();
- rt_hw_cpu_dcache_enable();
+ /* enable cpu cache */
+ rt_hw_cpu_icache_enable();
+ rt_hw_cpu_dcache_enable();
- /* init hardware interrupt */
- rt_hw_interrupt_init();
+ /* init hardware interrupt */
+ rt_hw_interrupt_init();
- /* init board */
- rt_hw_board_init();
+ /* init board */
+ rt_hw_board_init();
- /* show version */
- rt_show_version();
+ /* show version */
+ rt_show_version();
- /* init tick */
- rt_system_tick_init();
+ /* init tick */
+ rt_system_tick_init();
- /* init kernel object */
- rt_system_object_init();
+ /* init kernel object */
+ rt_system_object_init();
- /* init timer system */
- rt_system_timer_init();
+ /* init timer system */
+ rt_system_timer_init();
- /* init heap memory system */
+ /* init heap memory system */
#ifdef __CC_ARM
- rt_system_heap_init((void*)&Image$$ER_ZI$$ZI$$Limit, (void*)0x33F00000);
+ rt_system_heap_init((void*)&Image$$ER_ZI$$ZI$$Limit, (void*)0x33F00000);
#else
- rt_system_heap_init((void*)&__bss_end, (void*)0x33F00000);
+ rt_system_heap_init((void*)&__bss_end, (void*)0x33F00000);
#endif
#ifdef RT_USING_MODULE
- /* init module system*/
- rt_system_module_init();
+ /* init module system*/
+ rt_system_module_init();
#endif
- /* init scheduler system */
- rt_system_scheduler_init();
+ /* init scheduler system */
+ rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
- /* register uart0 */
- rt_hw_serial_register(&uart0_device, "uart0",
- RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
- &uart0);
+ /* register uart0 */
+ rt_hw_serial_register(&uart0_device, "uart0",
+ RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
+ &uart0);
- /* register uart2, used for RTI debug */
- rt_hw_serial_register(&uart2_device, "uart2",
- RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
- &uart2);
+ /* register uart2, used for RTI debug */
+ rt_hw_serial_register(&uart2_device, "uart2",
+ RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
+ &uart2);
#ifdef RT_USING_DFS
- rt_hw_sdcard_init();
+ rt_hw_sdcard_init();
#ifdef RT_USING_DFS_UFFS
- rt_hw_nand_init();
+ rt_hw_nand_init();
#endif
#endif
- /* rtc init */
- rt_hw_rtc_init();
+ /* rtc init */
+ rt_hw_rtc_init();
#endif
- /* init application */
- rt_application_init();
+ /* init application */
+ rt_application_init();
#ifdef RT_USING_FINSH
- /* init finsh */
- finsh_system_init();
+ /* init finsh */
+ finsh_system_init();
#ifdef RT_USING_DEVICE
- finsh_set_device("uart0");
+ finsh_set_device("uart0");
#endif
#endif
- rt_system_timer_thread_init();
+ rt_system_timer_thread_init();
- /* init idle thread */
- rt_thread_idle_init();
+ /* init idle thread */
+ rt_thread_idle_init();
- /* start scheduler */
- rt_system_scheduler_start();
+ /* start scheduler */
+ rt_system_scheduler_start();
- /* never reach here */
- return ;
+ /* never reach here */
+ return ;
}
int main(void)
{
- /* disable interrupt first */
- rt_hw_interrupt_disable();
+ /* disable interrupt first */
+ rt_hw_interrupt_disable();
- /* startup RT-Thread RTOS */
- rtthread_startup();
+ /* startup RT-Thread RTOS */
+ rtthread_startup();
- return 0;
+ return 0;
}
/*@}*/