1 /* 2 * Copyright (c) 2006-2025, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2025-04-23 Wangshun first version 9 */ 10 11 #include <board.h> 12 #include <rthw.h> 13 #include <rtthread.h> 14 #include <drv_usart.h> 15 16 extern unsigned long __heap_start; 17 extern unsigned long __heap_end; 18 19 /** 20 * This function will initialize your board. 21 */ rt_hw_board_init()22void rt_hw_board_init() 23 { 24 rt_hw_interrupt_init(); 25 26 #ifdef RT_USING_HEAP 27 rt_system_heap_init((void *)&__heap_start, (void *)&__heap_end); 28 #endif 29 30 #ifdef BSP_USING_UART 31 rt_hw_usart_init(); 32 #endif 33 34 #ifdef RT_USING_CONSOLE 35 rt_console_set_device(RT_CONSOLE_DEVICE_NAME); 36 #endif 37 38 #ifdef RT_USING_COMPONENTS_INIT 39 rt_components_board_init(); 40 #endif 41 } 42