2024-07-01 11:45 PM
Hello,
I'm currently using STM32CubeIDE, version 1.15.1 (Build: 21094_20240412_1041 UTC), with the embedded package version 1.5.0. I have set up a project with a secure zone configuration.
After generating code from the IOC file, I encounter an issue in the flash.c file at line 54. The generated code looks like this:
//!!! HAL_FLASHEx_OBProgram is commented because some parameters are missing
//pOBInit.OptionType = OPTIONBYTE_USER|OPTIONBYTE_BOOTADDR
|OPTIONBYTE_WMSEC;
//pOBInit.WMSecStartPage = 0;
//pOBInit.WMSecEndPage = 126;
//HAL_FLASHEx_OBProgram(&pOBInit);
//!!! HAL_FLASHEx_OBProgram is commented because some parameters are missing
//pOBInit.OptionType = OPTIONBYTE_USER|OPTIONBYTE_BOOTADDR
|OPTIONBYTE_WMSEC;
The OPTIONBYTE_WMSEC parameter is on the next line of the comment, which causes it to be ignored by the //. This obviously breaks the build.
While this is easy to fix manually, I have to go back and correct this every time I regenerate the code from the IOC file. Has anyone else experienced this issue or found a more permanent solution?
Thanks in advance!
Solved! Go to Solution.
2024-12-02 01:55 AM
Hello @JulioAndrade @dhs
This behavior has been solved on the last version of the STM32CubeMX V6.13.0.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-07-02 06:53 AM
Hello @JulioAndrade,
Could you please, provide more details about which MX version are you using?
Also could you please attach your .Ioc file/configuration or another Ioc that contains the same possible issue? This would help us to reproduce the issue and find a solution.
2024-07-03 01:48 AM
2024-11-10 04:57 AM
2024-11-10 06:24 AM - edited 2024-11-11 01:58 AM
Hello @JulioAndrade @dhs
For the issue reported by @JulioAndrade I've been able to reproduce it and I've escalated for correction on the future (under internal ticket number 196056). For the project that you have attached @dhs , the .ioc file generated works fine with the last version of STM32CubeIDE (V 1.16.1).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-10 07:55 AM
In my case:
- A warring arise, this is easy to fix
- Additionally, I have to edit to add the parameter NOLOAD every time I regenerate:
/* Unitialized RAM_BACKUP section into "RAM_BACKUP" RAM_BACKUP type memory */
.RAM_BACKUP_Section(NOLOAD) :
{
. = ALIGN(4);
KEEP (*(.RAM_BACKUP_Section))
. = ALIGN(4);
} >RAM_BACKUP
2024-11-10 08:11 AM - edited 2024-11-11 01:57 AM
This is not the same behavior of the original post. I suggest you to create a new post for it with more details (how to reproduce, the version of IDE/MX YOU are using, some screenshots,...)
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-12-02 01:55 AM
Hello @JulioAndrade @dhs
This behavior has been solved on the last version of the STM32CubeMX V6.13.0.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.