Skip to content

IAR STM32C0 patch : Failed to load flash loader FlashSTM32C03xx6.flash #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nicolas-coq opened this issue Apr 10, 2025 · 3 comments
Assignees
Labels
question Further information is requested utils Utilities-related issue or pull-request

Comments

@nicolas-coq
Copy link

Hello,

I am using IAR EW 8.32 for a development project using an STM32C031C6 nucleo board.
I installed the 1.02 patch provided in this repository to add support for the STM32C0 family and was able to build my project.
However, I was not able to use the IAR debugger after installing the patch : IAR reported an error "Failed to load flash loader <...>/FlashSTM32C03xx6.flash" :

Image

The IAR debug log indicated that the script STM32C0xx.dmac failed to run at line 96 in the enable_dbg_clock() function :

  rcc_apbenr1_restore = __readMemory32(0x4002103C, "AP0_Memory");

After some trial and error, I stumbled upon the IAR C-SPY Debugging Guide mentioning the prototype of this function :

__readMemory32(address, zone)

This document also states that the only zone available in ARM architecture is "Memory".
I replaced all the occurrences of "AP0_Memory" by the string "Memory" in the STM32C0xx.dmac script, and everything works fine now.

I don't know if this issue is specific to my version of IAR (8.32) but if this patch is compatible with all 8.x versions, it could be upstreamed to avoid uneccessary trouble for other developers :)

@ALABSTM ALABSTM added question Further information is requested utils Utilities-related issue or pull-request labels Apr 11, 2025
@ASEHSTM
Copy link
Contributor

ASEHSTM commented Apr 16, 2025

Hello @nicolas-coq,

Thank you for your report.

Referring to the STM32C0 release note, the supported IAR version for STM32C0 is v9.20.4, as shown below:

Image

With Regards,

@ASEHSTM ASEHSTM moved this from To do to Analyzed in stm32cube-mcu-fw-dashboard Apr 16, 2025
@nicolas-coq
Copy link
Author

Hello,
Sorry for not mentioning it clearly in my first post, I was refering to the patch for IAR v8 : EWARMv8_STM32C01x-03x_V1.0.2.zip
Best regards,
Nicolas

@ASEHSTM
Copy link
Contributor

ASEHSTM commented May 8, 2025

Hello @nicolas-coq,

Apologies for the delayed response. According to the README in the EWARMv8_STM32C01x-03x_V1.0.2, please ensure that you have EWARM version 9.20.1 or later installed before proceeding with the installation.

Image

With Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested utils Utilities-related issue or pull-request
Projects
Development

No branches or pull requests

3 participants