1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-10-10 Sherman first version 9 */ 10 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #define RA_SRAM_SIZE 256 /* The SRAM size of the chip needs to be modified */ 19 #define RA_SRAM_END (0x20000000 + RA_SRAM_SIZE * 1024) 20 21 #ifdef __ARMCC_VERSION 22 extern int Image$$RAM_END$$ZI$$Base; 23 #define HEAP_BEGIN ((void *)&Image$$RAM_END$$ZI$$Base) 24 #elif __ICCARM__ 25 #pragma section="CSTACK" 26 #define HEAP_BEGIN (__segment_end("CSTACK")) 27 #else 28 extern int __RAM_segment_used_end__; 29 #define HEAP_BEGIN (&__RAM_segment_used_end__) 30 #endif 31 32 #define HEAP_END RA_SRAM_END 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif 39