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-08-05 mazhiyuan first version 9 */ 10 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 #include <rtthread.h> 14 #include "hal_device.h" 15 #include "mm32_device.h" 16 17 #define SRAM_SIZE 0x5000 18 19 #define SRAM_END (SRAM_BASE + SRAM_SIZE) 20 #ifdef __CC_ARM 21 extern int Image$$RW_IRAM1$$ZI$$Limit; 22 #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit) 23 #elif __ICCARM__ 24 #pragma section = "HEAP" 25 #define HEAP_BEGIN (__segment_end("HEAP")) 26 #else 27 extern int __bss_end; 28 #define HEAP_BEGIN ((void *)&__bss_end) 29 #endif 30 #define HEAP_END SRAM_END 31 #define HEAP_SIZE (HEAP_END - (rt_uint32_t)HEAP_BEGIN) 32 extern void rt_hw_board_init(void); 33 #endif 34