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-2-3 yekai first version 9 */ 10 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 14 #include <rtthread.h> 15 #include <stm32h7xx.h> 16 #include "drv_common.h" 17 #include "drv_gpio.h" 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) 24 #define STM32_FLASH_SIZE (128 * 1024) 25 #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) 26 27 #define STM32_SRAM_SIZE (64*5) 28 #define STM32_SRAM_END (0x24000000 + STM32_SRAM_SIZE * 1024) 29 30 #if defined(__ARMCC_VERSION) 31 // use IRAM2(RAM D1) 32 extern int Image$$RW_IRAM2$$ZI$$Limit; 33 #define HEAP_BEGIN (&Image$$RW_IRAM2$$ZI$$Limit) 34 #define HEAP_END STM32_SRAM_END 35 #elif defined(__GNUC__) 36 extern uint8_t _heap_start[]; 37 extern uint8_t _heap_end[]; 38 #define HEAP_BEGIN _heap_start 39 #define HEAP_END _heap_end 40 #endif 41 42 void SystemClock_Config(void); 43 44 #ifdef __cplusplus 45 } 46 #endif 47 48 #endif 49