1 /* 2 * Copyright (c) 2006-2023, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2023-07-08 Zheng-Bicheng first version 9 */ 10 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 14 #include <rtthread.h> 15 #include <stm32u5xx.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 (2048 * 1024) 25 #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) 26 27 #define STM32_SRAM1_SIZE (768) 28 #define STM32_SRAM1_START (0x20000000) 29 #define STM32_SRAM1_END (STM32_SRAM1_START + STM32_SRAM1_SIZE * 1024) 30 31 #if defined(__ARMCC_VERSION) 32 extern int Image$$RW_IRAM1$$ZI$$Limit; 33 #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit) 34 #elif __ICCARM__ 35 #pragma section="CSTACK" 36 #define HEAP_BEGIN (__segment_end("CSTACK")) 37 #else 38 extern int __bss_end; 39 #define HEAP_BEGIN ((void *)&__bss_end) 40 #endif 41 42 #define HEAP_END STM32_SRAM1_END 43 44 void SystemClock_Config(void); 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 #endif 51 52