Skip to content

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

Closed
@nicolas-coq

Description

@nicolas-coq

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 :)

Metadata

Metadata

Assignees

Labels

questionFurther information is requestedutilsUtilities-related issue or pull-request

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions