cmcu为stm32h743IIt6
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-11-16 RealThread first version
*/
#include <rtthread.h>
#include <board.h>
#include <drv_common.h>
struct rt_memheap sdram_AXIRAM,sdram_SRAM1,sdram_SRAM2; // memheap 控制块
rt_weak 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_BEGIN, (void *) HEAP_END);
#endif
rt_memheap_init(&sdram_AXIRAM, "AXIRAM", (void *)AXIRAM_START, AXIRAM_SIZE);
rt_memheap_init(&sdram_SRAM1, "SRAM1", (void *)SRAM1_START, SRAM1_SIZE);
rt_memheap_init(&sdram_SRAM2, "SRAM2", (void *)SRAM2_START, SRAM2_SIZE);
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
}