Skip to main content
Visitor II
July 2, 2024
Solved

cube MX issues with STM32U585OIY6QTR

  • July 2, 2024
  • 4 replies
  • 1958 views

 

 

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!

 

    This topic has been closed for replies.
    Best answer by STTwo-32

    Hello @JulioAndrade @dhs 

    This behavior has been solved on the last version of the STM32CubeMX V6.13.0.

    Best Regards.

    STTwo-32

    4 replies

    ST Employee
    July 2, 2024

    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.

    Explorer II
    November 10, 2024

    Same Issue, problem arise using Tools > Memory Management

     

    Visitor II
    July 3, 2024

    Hello i am using 
    STM32CubeIDE Version: 1.15.1 Build: 21094_20240412_1041 (UTC)

    Technical Moderator
    November 10, 2024

    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 

    Explorer II
    November 10, 2024

    @STTwo-32 

    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

    Technical Moderator
    November 10, 2024

    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 

    STTwo-32Answer
    Technical Moderator
    December 2, 2024

    Hello @JulioAndrade @dhs 

    This behavior has been solved on the last version of the STM32CubeMX V6.13.0.

    Best Regards.

    STTwo-32