Go to Post [the last period is] a free for all, both goals are turned on, and any robot can go anywhere on the field and score in any goal (although I would recommend scoring in the correct goal, not your opponents :D ) - Ryan Foley [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 10-10-2006, 22:34
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Lightbulb Interactive Debugger/Monitor

I am a spoiled professional programmer. I spend a lot of my day in a source level debugger. I miss that when I am working with the team on programming the robot.

I was wondering if anyone had tried to build a debugger for the FIRST robot?

Is anyone interesting in pursuing a debugger (or in this case what would be more correctly called a monitor)?

The one thing that would be very useful that I've not been able to work out is break points. In order to create a break point, the changes have to be inserted into the code. As far as I can tell, the code is in a read-only area (I actually think its eeprom) so I'm not sure it's even possible.

If the problem of break points can be fixed, I think we solve the rest of the monitor.

Any one have ideas or suggestions?

...Duane
  #2   Spotlight this post!  
Unread 11-10-2006, 00:30
Ben Margolis Ben Margolis is offline
Programmer Boy
no team
 
Join Date: Mar 2005
Rookie Year: 2005
Location: San Bruno, CA
Posts: 9
Ben Margolis is a glorious beacon of lightBen Margolis is a glorious beacon of lightBen Margolis is a glorious beacon of lightBen Margolis is a glorious beacon of lightBen Margolis is a glorious beacon of lightBen Margolis is a glorious beacon of light
Re: Interactive Debugger/Monitor

Frequent (and intelligent) use of printf's.


Its really all you need.
  #3   Spotlight this post!  
Unread 11-10-2006, 00:31
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Interactive Debugger/Monitor

Quote:
Originally Posted by duane
I am a spoiled professional programmer. I spend a lot of my day in a source level debugger. I miss that when I am working with the team on programming the robot.

I was wondering if anyone had tried to build a debugger for the FIRST robot?

Is anyone interesting in pursuing a debugger (or in this case what would be more correctly called a monitor)?

The one thing that would be very useful that I've not been able to work out is break points. In order to create a break point, the changes have to be inserted into the code. As far as I can tell, the code is in a read-only area (I actually think its eeprom) so I'm not sure it's even possible.

If the problem of break points can be fixed, I think we solve the rest of the monitor.

Any one have ideas or suggestions?

...Duane
Although I don't have names or links now, I know there are a few simulators, of sorts, that accept a hex file and will output the pwm and other data according to (very limited) input. These are pretty old though, and not too advanced. Your best bet for testing things, if you don't have access to a full size bot, is a Robovation kit.
__________________
http://www.mikesorrenti.com/
  #4   Spotlight this post!  
Unread 11-10-2006, 00:34
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Interactive Debugger/Monitor

I don't think breakpoints are doable without support from IFI in a Master Code update. The Master processor's watchdog timer will time out and freeze the whole controller if you stop in the user code for any appreciable amount of time. And as far as I know, we don't have any direct inputs into the master controller to do anything about this. I suppose you'd have to somehow modify your code to stop processing user functions and code, but continue looping and updating control values.... Mostly it sounds incredibly complicated and quite likely to break any fragile code you happened to be trying this on.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #5   Spotlight this post!  
Unread 11-10-2006, 08:28
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Interactive Debugger/Monitor

IFI has a dynamic debugging tool, but I haven't used it. It's mentioned on this page: http://www.ifirobotics.com/rc.shtml#Programming. I think the viewer is part of the IFI dashboard application.
  #6   Spotlight this post!  
Unread 11-10-2006, 12:44
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Interactive Debugger/Monitor

Aren't there pins on the board to connect and ICD? I think they are above the TTL pins.

Don't have an RC in front of me at the moment so i'm not 100% sure.

-Q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #7   Spotlight this post!  
Unread 11-10-2006, 14:25
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Interactive Debugger/Monitor

Quote:
Originally Posted by Qbranch
Aren't there pins on the board to connect and ICD? I think they are above the TTL pins.

Don't have an RC in front of me at the moment so i'm not 100% sure.

-Q
Nope, RC doesn't support the ICD for the same reason posted above. Since the programmable microcontroller is a slave you can't pause and restart execution.
  #8   Spotlight this post!  
Unread 11-10-2006, 18:38
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: Interactive Debugger/Monitor

Has IFI ever posted the source to there Master Code? I dont think they have and all I see is the BIN file for it. Maybe if they released the code them people could start working on this.
  #9   Spotlight this post!  
Unread 11-10-2006, 22:04
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Interactive Debugger/Monitor

They haven't and probably won't. I'm pretty sure they consider it their intellectual property and probably won't be releasing it any time soon.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #10   Spotlight this post!  
Unread 11-10-2006, 22:14
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: Interactive Debugger/Monitor

Quote:
Originally Posted by Kevin Sevcik
They haven't and probably won't. I'm pretty sure they consider it their intellectual property and probably won't be releasing it any time soon.
I understand how its "intellectual property" but maybe for the better of the FIRST community they would do it.
  #11   Spotlight this post!  
Unread 11-10-2006, 23:26
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: Interactive Debugger/Monitor

Wow, what a great set of responses. I'll try and address a bunch of them.

Quote:
Frequent (and intelligent) use of printf's.
Spoken like a true hard core debugger. And why are you using C? Shouldn't you be using assembly?

Of course that's what we all have to do. It's simply not enough for any reasonably complex debugging session. Try debugging an active PID routine with printfs. Not pretty and not useful. Until you try a real debugger or a monitor (as this will be) it's just not the same.

Quote:
I know there are a few simulators
It's easy to simulate the processor. It's hard to simulate the world; that is the motors, sensors, and other inputs.

Quote:
I don't think breakpoints are doable without support from IFI in a Master Code update. The Master processor's watchdog timer will time out
Figured that would come up. That's the easy one to fix. The monitor would sit between the master processor polling loop and the main user code. It would handle the polling loop to keep the Master Processor happy.

A breakpoint is just a jump into the monitor. The monitor then takes control and keeps the Master Processor happy. We just need to be able to write that jump instruction into the code!

Quote:
IFI has a dynamic debugging tool
I've looked at the dynamic debugging tool and will probably use it this year if nothing else to become familiar with it. It also does not have breakpoints. Which makes me think that this might not be doable.

Quote:
Has IFI ever posted the source to there Master Code?
IFI won't post the Master Code likely because of the risk that someone could take unfair advantage of something in it. They hope that there is nothing to take advantage of, but these teams are pretty creative.

We don't really need the all the sources, I just want a way to scribble an opcode into the program stream while it's running.

Thanks for all the great response. We'll get those creative juices flowing and come up with a good solution to this problem!

...Duane
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPLAB SIM debugger Questions Chris_Elston Programming 2 16-01-2005 11:28
c debugger stephenthe1 Programming 16 09-12-2004 14:49
openFIRST Now Includes Debugger Timothy D. Ginn FIRST-related Organizations 0 22-12-2003 12:15
Debugger and Simulation in new IDE? authgeek1218 Programming 1 08-12-2003 18:39
interactive strategy piconysm Rules/Strategy 5 11-01-2002 08:47


All times are GMT -5. The time now is 20:55.

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