1 /*
2  * Copyright (c) 2006-2020, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2021-02-11     supperthomas first version
9  *
10  */
11 #ifndef _BOARD_H_
12 #define _BOARD_H_
13 
14 #include <rtthread.h>
15 #include <rthw.h>
16 
17 #include "mxc_config.h"
18 #include "mxc_assert.h"
19 
20 
21 #define MCU_FLASH_START_ADRESS       ((uint32_t)0x0)
22 #define MCU_FLASH_SIZE_KB               (256)
23 #define MCU_FLASH_END_ADDRESS        ((uint32_t)(MCU_FLASH_START_ADRESS + MCU_FLASH_SIZE*1024))
24 
25 #define MCU_SRAM_SIZE_KB               (96)
26 #define MCU_SRAM_START              (0x20000000)
27 #define MCU_SRAM_END                (MCU_SRAM_START + MCU_SRAM_SIZE_KB * 1024)
28 
29 #if defined(__ARMCC_VERSION)
30 extern int Image$$RW_IRAM1$$ZI$$Limit;
31 #define HEAP_BEGIN      ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
32 #elif __ICCARM__
33 #pragma section="CSTACK"
34 #define HEAP_BEGIN      (__segment_end("CSTACK"))
35 #else
36 extern int _ebss;
37 #define HEAP_BEGIN      ((void *)&_ebss)
38 #endif
39 
40 #define HEAP_END       MCU_SRAM_END
41 
42 void rt_hw_board_init(void);
43 
44 #endif
45 
46