Using the debugger
uVision5 provides a debugger that allows us to suspend execution (by inserting a breakpoint), and examine/change values of variables used in our program.
How to do it…
- Download and run the previous project,
debug_ADC
. - Use the debug menu to insert a breakpoint on line 96 of our program (that is, at the statement
ADC_StartConversion ( );
. - Select debug → Start/Stop Debug session to start a debug session.
- Observe that execution stops at main. This is because the default project debug options are set to "Run to main".
- Selecting Run (F5) will ...
Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.