Skip to main content
Gpeti
Senior
April 18, 2023
Solved

Cannot step by step debug on STM32H7 with STM32CubeIDE and code in AXI-SRAM

My setup is:

  • STM32H753 eval board
  • STM32CubeIDE 1.10.1
  • code generated with arm-none-eabi-gcc (no stdlib, no semiihosting, no ITM)

The code is located in AXI-SRAM memory.

I can execute the code and break wherever I want. However when I break I cannot step into the code (or continue execution). When i do so (whether it is Step into or step over, assembly mode or normal mode) the code remains at the same instruction (everything happens as if the instruction is not executed). The disassembly is correct. There is no "bkpt" or other particular instruction.

I obviously tried to set the bkpt at different locations.

i also tried to set it up after the code is loaded to RAM. I also set the bkpt as "hardware" instead of "regular"

When the code is executed from somewhere else (like ITCM) it works just fine.

Any idea ?

This topic has been closed for replies.
Gpeti
GpetiBest answer
Senior
April 20, 2023

After further investgation it looks like the problem comes from the instruction cache activation. if I keep the cache disabled, the stepping works

4 replies

ST Technical Moderator
April 20, 2023

Hello @Gpeti​,

Could you please try update the latest version of STM32CubeIDE. Are you enabling the memory protection unit? Could you check access permission in MPU_RASR.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Gpeti
GpetiAuthorBest answer
Senior
April 20, 2023

After further investgation it looks like the problem comes from the instruction cache activation. if I keep the cache disabled, the stepping works

ST Technical Moderator
April 20, 2023

@Gpeti​ Thank you for your feedback.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Gpeti
GpetiAuthor
Senior
April 20, 2023

To answer your other questions, I will update STM32CubeIDE but it will take some time (offline workstation).

I'm enabling the MPU but later in the code, the problem happens before.