Debugging; Break Points; Mixed Display; Monitoring Variables - Fujitsu F2MC-16FX MB2198 Getting Started

Emulator system
Table of Contents

Advertisement

MB2198 – Getting Started
Chapter 5 Debugging

5 Debugging

A SHORT ASSORTMENT OF SOME DUBUGGER FUNCTIONS

5.1 Break Points

You can set break points in your compiled code to force the execution to stop at these
points.
Therefore enter the debugger mode. In general the code of the Start.asm file is displayed.
You can easy display the code of your Main.c file by double clicking it in the Workspace
window. Beside each command an arrow and a circle is displayed:
Clicking in the circle sets a break point. Depending on the selected break point type, a
differently coloured cross is shown in the circle. For the software break point (default), the
cross is blue, while there is a red cross in the circle for the hardware break point:
Clicking to this circle again releases the break point.
If you now start the execution, the CPU will halt on this break point. The actual line gets a
yellow background colour. Now you see the flag state of the status register just under the
project window.
The execution of course can be continued again by entering the run mode.

5.2 Mixed Display

Sometimes it is useful to see the compiled code together with the C source.
To display this enter the debugger mode, open the file to observe and click on the right
mouse button just over the code window. A pop up window with the entry "Mix display" has
to be selected. The code window now will look like this:
Note that now the break points can be set exactly to the regarding CPU Op Code.

5.3 Monitoring Variables

To watch the content of a variable during stopped execution, choose View > Watch. A small
new window will open. Go with the mouse pointer into it and press the right mouse button.
Then choose Set... . Enter now the name of the variable. It will then be displayed with its
name and its value in the Watch-Window.
To change the radix notation of the value, select the variable and click on the right mouse
button. The menu content Radix offers now display in Binary, Octal, Decimal, and
Hexadecimal formats.

5.4 Monitoring the CPU Registers

To monitor the CPU registers, choose View > Register. A small window with all CPU
registers and their contents will open then.
MCU-AN-300217-E-V10
- 20 -
© Fujitsu Microelectronics Europe GmbH

Advertisement

Table of Contents
loading

Table of Contents