Skip to main content
Alexmouse
Associate III
July 23, 2024
Question

Can't set a breakpoint in debug

  • July 23, 2024
  • 6 replies
  • 2879 views

I'm working with an STM32U575 Nucleo and also a custom board with the same processor.

In STM32CubeIDE, neither project will let me set a breakpoint. What am I missing?

I've attached a screenshot showing a "broken" breakpoint.

This topic has been closed for replies.

6 replies

Andrew Neil
Super User
July 23, 2024

What optimisation level are you using?

Can you not set any breakpoints at all, or is it just at this particular location?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Alexmouse
AlexmouseAuthor
Associate III
July 23, 2024

I've tried a variety of optimisiations, no change.

No breakpoints at all, even simple instructions sitting in my main loop.

Rim LANDOLSI
ST Employee
July 23, 2024

Hello @Alexmouse  and welcome to the community,

 

In the attached screenshot there are two main files open, so make sure that the code where you are trying to set the breakpoint is actually being executed. Also check that compiler optimisations are off in Project > Properties > C/C++ Build > Settings > Tool Settings > MCU GCC Compiler > Debugging by setting its level to -O0.

Check if the breakpoint has a condition that will never be met.
You can, also, run Clean and Rebuild.

 

Hope this helps!

Thanks,

Rim.

Alexmouse
AlexmouseAuthor
Associate III
July 23, 2024

I've closed the other project entirely just to be sure.

No matter what optimisation I set, the breakpoint behaviour is the same.

Even a simple instruction in the main loop, shows as crossed out in the line index and the breakpoints window.

Is there something special about the U5 family re. debugging?

Rim LANDOLSI
ST Employee
July 23, 2024

Which version of CubeIDE do you use?