diff --git a/bsp/stm32f40x/drivers/board.h b/bsp/stm32f40x/drivers/board.h index 97b506c1468c58de2f1f9f8622cbc5bca8f9259a..7f362503b01393eb26f585d68d94752fc7e72b79 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