'Cannot set breakpoints in AXI-SRAM on STM32CubeIDE for STM32H753

I'm working on a STM32H753 with STM32CubeIDE 1.4.0.

I have created an empty "STM32 Cortex-M C/C++ Application project". My executable is built by a separate makefile (arm-none-eabi-gcc based). I only use STM32CubeIDE to debug through a remote GDB server.

This setup has been working fine for a long time. Now I changed the memory mapping of my code. Before the code was executing from ITCM RAM and now I moved it to AXi-SRAM. Of course the code is copied from Flash to RAM by a kind of bootloader.

Now breakpoints seem to not work properly. They still work fine in the bootloader (in Flash) but as long as I set a bkpt in AXI SRAM the code doesn't stop. I checked that the assembly is correct. When I break in my code, I can see the correct assembly at the correct adress.

With the previous memory mapping, setting bkpt in ITCM RAM was working fine.

I tried to set bkpt through the GUI and through GDB commands it's the same.

Is there a particularity or a limitation regarding bkpt in AXI SRAM ?

thank you



Solution 1:[1]

I have had problems with breakpoints in RAM as soon as the application enables ICache (SCB_EnableICache). For debugging, I comment out that line of code so the ICache isn't enabled. For my setup (cube ide 1.8) this fixes the issue and I am able to set breakpoints and single step through code. For release candidate code, I use that call to enable the ICache.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Walt Yorgason