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  * 2018-11-06     SummerGift   first version
9  * 2019-01-08     AndeyQi      add stm32f446-st-nucleo bsp
10  */
11 
12 #ifndef __BOARD_H__
13 #define __BOARD_H__
14 
15 #include <stm32g4xx.h>
16 
17 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
18 #define STM32_FLASH_SIZE             (128 * 1024)
19 #define STM32_FLASH_END_ADDRESS      ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
20 
21 #define STM32_SRAM_SIZE           32
22 #define STM32_SRAM_END            (0x20000000 + STM32_SRAM_SIZE * 1024)
23 
24 #if defined(__ARMCC_VERSION)
25 extern int Image$$RW_IRAM1$$ZI$$Limit;
26 #define HEAP_BEGIN      (&Image$$RW_IRAM1$$ZI$$Limit)
27 #elif __ICCARM__
28 #pragma section="CSTACK"
29 #define HEAP_BEGIN      (__segment_end("CSTACK"))
30 #else
31 extern int __bss_end;
32 #define HEAP_BEGIN      (&__bss_end)
33 #endif
34 
35 #define HEAP_END        STM32_SRAM_END
36 
37 void SystemClock_Config(void);
38 
39 #endif
40 
41