Go to Post Well, it's officially that part of the offseason where we all lose our minds again. - Whippet [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-12-2003, 11:31
authgeek1218's Avatar
authgeek1218 authgeek1218 is offline
Design/Programming Geek
#1218 (CHABots)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Philadelphia
Posts: 26
authgeek1218 is an unknown quantity at this point
Send a message via AIM to authgeek1218
Debugger and Simulation in new IDE?

MPLab seems to have a very powerful debugger and simulator for our chipset but, even with the tutorial, I can't seem to get it to work. The key here is that when I go through the tutorial, it eventually asks me to put in some assembly code and I have no idea where this comes from. When I run the bot code with the assembly, it seems like it only runs the assembly part - at least I can only watch and step through the assembly code.

If someone could give me just a little bit of help, I think I understand the rest enough to write a small tutorial specific for our new chipset - something that I think will greatly benefit anyone programming this year.

Thanks
__________________
  #2   Spotlight this post!  
Unread 08-12-2003, 18:39
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 00:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi