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 * 2020-04-29 supperthomas first version 9 * 10 */ 11 #ifndef _BOARD_H_ 12 #define _BOARD_H_ 13 14 #include <rtthread.h> 15 #include <rthw.h> 16 #include "nrf.h" 17 18 #define MCU_FLASH_SIZE MCU_FLASH_SIZE_KB*1024 19 #define MCU_FLASH_END_ADDRESS ((uint32_t)(MCU_FLASH_START_ADDRESS + MCU_FLASH_SIZE)) 20 #define MCU_SRAM_SIZE MCU_SRAM_SIZE_KB*1024 21 #define MCU_SRAM_END_ADDRESS (MCU_SRAM_START_ADDRESS + MCU_SRAM_SIZE) 22 23 #if defined(__ARMCC_VERSION) 24 extern int Image$$RW_IRAM1$$ZI$$Limit; 25 #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit) 26 #elif __ICCARM__ 27 #pragma section="CSTACK" 28 #define HEAP_BEGIN (__segment_end("CSTACK")) 29 #else 30 extern int __bss_end__; 31 #define HEAP_BEGIN ((void *)&__bss_end__) 32 #endif 33 34 35 #define HEAP_END (MCU_SRAM_END_ADDRESS) 36 37 void rt_hw_board_init(void); 38 39 #endif 40 41