2018-04-29 11:30 AM
Cube MX 4.25
Generate source using F446 processor for Atollic TS v9
CubeMX and TS are up to date
get following error:
..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c:163:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'HAL_FLASHEx_DisableFlashSleepMode'
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)(same error for any instance of RAMFUNC prefix.
example error line in code is
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)
Line #185 in stm32f4xx_hal_def.h is
#define __RAM_FUNC HAL_StatusTypeDef __attribute__((section('.RamFunc')))
which expands to
HAL_StatusTypeDef __attribute__((section('.RamFunc')))HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)
Cube32 is remarkably consistent in generating this error. Since I don't use code executed from RAM (no guarantee that the compiler doesn't), the code doesn't do anything for me except cause an inconvenience.
PLEASE fix the code generation (or file definition) as needed or at least tell me the settings to remove the 'RAMFUNC' option from my code. I haven't found it.
Solved! Go to Solution.
2018-04-29 11:56 AM
This probably has been fixed in the latest libraries release for F4 v 1.21.0. Definition of
__RAM_FUNC fixed.
--pa
2018-04-29 11:56 AM
This probably has been fixed in the latest libraries release for F4 v 1.21.0. Definition of
__RAM_FUNC fixed.
--pa
2018-04-29 12:54 PM
It turns out that this is absolutely correct. Cube32 was keeping earlier versions of the library and using them rather than the current version. Removing those earlier versions solved the problem. I'll just rebuild other software projects.
Thanks