提交 39ac8bae 编写于 作者: G Grissiom

ls1bdev: format code in startup.c

上级 bfc14082
...@@ -38,49 +38,49 @@ extern void irq_exception(void); ...@@ -38,49 +38,49 @@ extern void irq_exception(void);
*/ */
void rtthread_startup(void) void rtthread_startup(void)
{ {
/* disable interrupt first */ /* disable interrupt first */
rt_hw_interrupt_disable(); rt_hw_interrupt_disable();
/* init cache */ /* init cache */
rt_hw_cache_init(); rt_hw_cache_init();
/* init hardware interrupt */ /* init hardware interrupt */
rt_hw_interrupt_init(); rt_hw_interrupt_init();
/* copy vector */ /* copy vector */
memcpy((void *)A_K0BASE, tlb_refill_exception, 0x20); rt_memcpy((void *)A_K0BASE, tlb_refill_exception, 0x20);
memcpy((void *)(A_K0BASE + 0x180), general_exception, 0x20); rt_memcpy((void *)(A_K0BASE + 0x180), general_exception, 0x20);
memcpy((void *)(A_K0BASE + 0x200), irq_exception, 0x20); rt_memcpy((void *)(A_K0BASE + 0x200), irq_exception, 0x20);
/* init board */ /* init board */
rt_hw_board_init(); rt_hw_board_init();
/* show version */ /* show version */
rt_show_version(); rt_show_version();
#ifdef RT_USING_HEAP #ifdef RT_USING_HEAP
rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END); rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END);
#endif #endif
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
/* initialize timer */ /* initialize timer */
rt_system_timer_init(); rt_system_timer_init();
/* initialize timer thread */ /* initialize timer thread */
rt_system_timer_thread_init(); rt_system_timer_thread_init();
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();
/* init application */ /* init application */
rt_application_init(); rt_application_init();
/* start scheduler */ /* start scheduler */
rt_system_scheduler_start(); rt_system_scheduler_start();
/* never reach here */ /* never reach here */
return; return;
} }
/*@}*/ /*@}*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册