|
Re: Debugger and Simulation in new IDE?
To use MPLAB SIM with the EDUCode default program open the project.
Under Project -> Build Options... -> Project
The pop-up has a tab for the MPLAB C18 compiler. At the bottom of this page are the compiler options
-Oa -Os etc
To the bottom line add
-D_SIMULATOR
and click the radio button.
_SIMULATOR is used as a flag within the code to skip over a transmit to the Master uP. If it's not there the SIM will wait forever for the non-existent Master uP to talk to it. You can look for it in the code.
The MPLAB SIM buttons get added to the menu bar by selecting MPLAB SIM from the Debugger pull-down.
Open one of the source files like user_routines.c and double click on a line you know will get executed. This sets a breakpoint. Then hit the run button. The SIM will stop with an arrow pointing to the line with the breakpoint and you can single step from here.
Remember to remove the -D_SIMULATOR from the options before using the EDU controller.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 08-12-2003 at 18:41.
|