Friday, November 29, 2024

Q&A: Keil μVision: I am not able to hit the breakpoint I set inside a while loop

Q&A: Keil μVision: I am not able to hit the breakpoint I set inside a while loop

I created a blinky application based on baremetal application using NXP BSP for FRDM-K64F in Keil μVision, see this link for details. The issue I am having is that I am not able to hit a breakpoint inside the while loop, see below. The project was created using Pack Installer, so default settings are in place except for changes to debugger and settings.

Solution:

The reason that it is not hitting the breakpoint is that the generated project using Pack Installer have the Optimization set to -O1 for the debug build. To fix this change Optimization to -O0 (Project | Options for Target 'xyz*')
Below shows line 66 breakpoint was hit

No comments:

Post a Comment

Q&A: How to create a blinky baremetal application on STM32F407G-DISC1 using STM32CubeMX and Keil μVision

Q: How to create a blinky baremetal application on STM32F407G-DISC1 using STM32CubeMX and Keil μVision Answer: Blinking an LED is the equiv...