From 1e3c79602d5089f1a707f425cdd5d455f83e6f2b Mon Sep 17 00:00:00 2001 From: cedar-renjun <819280802@qq.com> Date: Sat, 17 Oct 2015 20:58:42 +0800 Subject: [PATCH] Update board.h Use *.icf ram symbal, to avoid hardcode. --- bsp/stm32f40x/drivers/board.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bsp/stm32f40x/drivers/board.h b/bsp/stm32f40x/drivers/board.h index 97b506c146..7f362503b0 100644 --- a/bsp/stm32f40x/drivers/board.h +++ b/bsp/stm32f40x/drivers/board.h @@ -37,8 +37,14 @@ // Internal SRAM memory size[Kbytes] <8-64> // Default: 64 +#ifdef __ICCARM__ +// Use *.icf ram symbal, to avoid hardcode. +extern char __ICFEDIT_region_RAM_end__; +#define STM32_SRAM_END &__ICFEDIT_region_RAM_end__ +#else #define STM32_SRAM_SIZE 128 #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) +#endif // Console on USART: <0=> no console <1=>USART 1 <2=>USART 2 <3=> USART 3 // Default: 1 -- GitLab