| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- /*
- * Copyright (c) 2006-2024, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2024-11-20 RealThread first version
- */
- #include <rtthread.h>
- #include <board.h>
- #include <drv_common.h>
- static struct rt_memheap system_heap2;
- void rt_hw_board_init()
- {
- extern void hw_board_init(char *clock_src, int32_t clock_src_freq, int32_t clock_target_freq);
- /* Heap initialization */
- #if defined(RT_USING_HEAP)
- rt_system_heap_init((void *) HEAP_BEGIN1, (void *) HEAP_END1);
- rt_memheap_init(&system_heap2, "sram", (void *)RAM2_START, RAM2_SIZE);
- #endif
- hw_board_init(BSP_CLOCK_SOURCE, BSP_CLOCK_SOURCE_FREQ_MHZ, BSP_CLOCK_SYSTEM_FREQ_MHZ);
- /* Set the shell console output device */
- #if defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE)
- rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
- #endif
- /* Board underlying hardware initialization */
- #ifdef RT_USING_COMPONENTS_INIT
- rt_components_board_init();
- #endif
-
- //rt_hw_rtc_init();
- }
|