1 /*
2  * Copyright (c) 2023, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2023-07-06     Supperthomas first version
9  */
10 
11 
12 #ifndef __BOARD_H__
13 #define __BOARD_H__
14 
15 #include <stm32f4xx.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define STM32_SRAM_SIZE        (128)
22 #define STM32_SRAM_END         (0x20000000 + STM32_SRAM_SIZE * 1024)
23 
24 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
25 #define STM32_FLASH_SIZE             (1024 * 1024)
26 #define STM32_FLASH_END_ADDRESS      ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
27 
28 #if defined(__ARMCC_VERSION)
29 extern int Image$$RW_IRAM1$$ZI$$Limit;
30 #define HEAP_BEGIN      ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
31 #elif __ICCARM__
32 #pragma section="CSTACK"
33 #define HEAP_BEGIN      (__segment_end("CSTACK"))
34 #else
35 extern int __bss_end;
36 #define HEAP_BEGIN      ((void *)&__bss_end)
37 #endif
38 
39 #define HEAP_END        STM32_SRAM_END
40 
41 void SystemClock_Config(void);
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif
48 
49