beautypg.com

Renesas REG10J0083-0100 User Manual

Page 16

background image

• Press on the debug toolbar.

• Press ‘CTRL-B’ to open the breakpoint

window.

• Select ‘Remove All’

• Press .

• Open the file ‘main.c’

• Insert a breakpoint on ‘Statics_Test();’.

The statics test is used to demonstrate that the initialisation has successfully copied all initialised variables from storage in flash to RAM.

• Press on the Debug Toolbar.

The code will stop at the breakpoint. (Press a button to bypass the flashing LED test.)

• Press on the Debug Toolbar.

It is possible to monitor variables during debugging of the code. To set up a ‘watch’ on a variable place the mouse over the variable. If the

variable is available in the current context a tool-tip will be displayed with the current value of the variable.

• Hover the mouse over the ‘ucStr’ variable to see the tooltip value. Then Right click on the variable name and select ‘Instant

Watch’.

A dialog will open showing the variable and allowing further details to be explored.

• Press

The dialog will close and a new pane will open in the workspace containing the variable.

It is possible to see that the string has been successfully initialised to ‘STATIC ‘.

• Set a breakpoint on the call to ‘DisplayString();’ inside the for loop.

• Press ‘Go’ to run the code from the current PC

position.

When the program stops you can see the modified string displayed on the second line of the LCD.

Inspection of the watch pane will show that the first character of the variable string has been replaced with the first character of the constant

12