User Manual
Hexiwear Workstation
Page 15
In Circuit Debugger
PROGRAMMING
Every developer comes to a point where he has to monitor the code execution in
order to find errors in the code, or simply to see if everything is going as planed. This
hunt for “bugs”, or errors in the code, is called debugging. There are two methods
of debugging: The first method is Software debugging method, which only simulates
what is supposed to be happening on the micro-controller as the code lines are
executed. The second method is Hardware debugging, and it allows monitoring of
the program execution on the MCU itself. The software application is executed on the
target device, instead being simulated by the compiler. This method allows insight into
the internal states of the MCU, while it runs the program code.
When you build your project for debugging, and program the
microcontroller with this HEX file, you can start the debugger using [F9]
command. Compiler will change layout to debugging view, and a blue line
will mark where the code execution is currently paused.
You can use the debugging toolbar in the Watch Window, or shortcut
keys to guide the program execution, and stop anytime. Add the desired
variables to Watch window and monitor their values. Complete guide to
using the debugger is provided in the Help section of the MikroElektronika
compilers.
What is Debugging?
The onboard OpenSDA compatible programmer provides hardware debugging method,
by utilizing the OpenSDA interface. The debugger allows controlled execution of the
software application on the MCU. It offers a preview of the used variables content,
states of the special function registers (SFR), values in various memory locations,
and more, while the program is executed on the MCU. It supports step-over, step-into,
step-out, run, and run to cursor debugging operations, as well as using of standard
breakpoints. Whether you are a beginner, or a professional, this powerful tool, with
intuitive interface and convenient set of commands, will enable you to quickly track
down bugs. OpenSDA compatible mikroProg programmer offers.
All MikroElektronika ARM
®
based compilers - mikroC PRO, mikroBasic PRO, or
mikroPascal PRO, natively support mikroProg
™
OpenSDA compatible debugger.
Specialized DLL module allows compilers to exploit the full potential of the fast
hardware debugging. Along with compiler of your choice, make sure to install the
appropriate mbed serial drivers, and mikroProg Suite for ARM
®
programming software,
as described on pages 20 and 21.
Using mikroProg for debugging
Supported Compilers
How to use the debugger?
mikroC PRO for ARM compiler in the debugging view