2022-05-12 05:04 AM
Hi,
I am using STM32f413zh i build the code in release mode. After that i put break points on inside the code some places, None of the break point is hit. But i flash the binary file the code was running. Please give guidance for hit the code on main() or inside the code.
Thankyou.
Solved! Go to Solution.
2022-05-27 01:49 AM
So the debugger won't know what code addresses correspond to which source lines - as discussed above.
If you want to be able to do source-level debug, then you need to enable the debug info.
2022-05-12 05:50 AM
Uncheck "run to main", and walk in from Reset_Handler.
Instrument Error_Handler () and HardFault_Handler ()
Make sure BOOT0 is pulled LOW.
Press STOP in the Debugger, observe where the MCU is stuck, or whatever.
2022-05-12 05:59 AM
One reason for this could be that the release mode uses a different code optimisation, so that the lines with the break points have been optimised away. They are then still in the source code, but no longer play a role for the code execution.
2022-05-12 06:17 AM
If you're in Release mode, is debug information being created?
2022-05-12 09:55 PM
Yes, I pause the code while running that was not reach any error handlers, The code was running properly i am also able to see the led indications also perfectly run as per logic.
While i debug the code i am able to see the below screen. I don't know why that was not hit in inside main().
2022-05-13 12:52 AM
again, If you're in Release mode, is debug information being created?
2022-05-27 12:53 AM
NO.
2022-05-27 01:49 AM
So the debugger won't know what code addresses correspond to which source lines - as discussed above.
If you want to be able to do source-level debug, then you need to enable the debug info.
2022-05-27 02:05 AM
Thankyou