AnsweredAssumed Answered

BUG REPORT: Cube32 in F446 code generation

Question asked by Harvey White on Apr 29, 2018
Latest reply on Apr 29, 2018 by Harvey White

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.

Outcomes