Technical information
• Review this file and find the interrupt function that changes the LED pins, INT_MTU2_MTU3_TGI3A(void)
• Set a Eventpoint on the line where the LED pins are modified.
• Press ‘Go’ or ‘F5’ to run the code from the current
PC position.
The code will stop in the interrupt routine. It is now possible to step through the interrupt function.
• Remove the Eventpoint in the interrupt by double clicking again before exiting the function.
• Press ‘Step Over’ to step over the instruction and observe the LEDs turn off.
• Press ‘Go’ to run the code from the current PC
position.
The code will now run to the infinite loop at the end of Main(). The user LEDs should now be flashing. If the RSK supports an ADC you can
modify the flashing rate by adjusting the potentiometer on the board.
• Press ‘Stop’ on the debug tool bar.
• Open the file ‘main.c’
• Insert a Evetpoint on ‘StaticsTest();’.
The statics test is used to demonstrate that the initialisation has successfully copied all initialised variables from storage in flash to RAM.
• Press ‘Reset Go’ on the Debug Tool Bar.
The code will stop at the Evetpoint. (Press a button to bypass the flashing LED test.)
• Press ‘Step In’ on the Debug Tool Bar.
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 ‘Add’
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 Eventpoint on the ‘DisplayString();’ function call inside the loop.
• Press ‘Go’ to run the code from the current PC
position.
10