1 /* 2 * Copyright (c) 2006-2024, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-12-18 BruceOu first implementation 9 * 2024-03-19 Evlers remove the include of drv_usart.h 10 */ 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 14 #include "gd32f10x.h" 15 #include "drv_gpio.h" 16 17 #include "gd32f10x_exti.h" 18 19 #define EXT_SDRAM_BEGIN (0xC0000000U) /* the begining address of external SDRAM */ 20 #define EXT_SDRAM_END (EXT_SDRAM_BEGIN + (32U * 1024 * 1024)) /* the end address of external SDRAM */ 21 22 // <o> Internal SRAM memory size[Kbytes] <8-48> 23 // <i>Default: 48 24 #ifdef __ICCARM__ 25 // Use *.icf ram symbal, to avoid hardcode. 26 extern char __ICFEDIT_region_RAM_end__; 27 #define GD32_SRAM_END &__ICFEDIT_region_RAM_end__ 28 #else 29 #define GD32_SRAM_SIZE 48 30 #define GD32_SRAM_END (0x20000000 + GD32_SRAM_SIZE * 1024) 31 #endif 32 33 #ifdef __ARMCC_VERSION 34 extern int Image$$RW_IRAM1$$ZI$$Limit; 35 #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit) 36 #elif __ICCARM__ 37 #pragma section="HEAP" 38 #define HEAP_BEGIN (__segment_end("HEAP")) 39 #else 40 extern int __bss_end; 41 #define HEAP_BEGIN (&__bss_end) 42 #endif 43 44 #define HEAP_END GD32_SRAM_END 45 46 #endif 47 48