Go to Post ...I pretty much got the impression that the balls are actually very small, cuddly landmines. - Gui Cavalcanti [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 07-11-2007, 14:26
bluenp bluenp is offline
Registered User
None #1817
 
Join Date: Nov 2007
Location: Texas
Posts: 2
bluenp is an unknown quantity at this point
Code Flashing Issues

I am currently working on modifing some code that we have for a past robot in hopes of figuring out where we went wrong.

We compiled and downloaded some code to the robot, and needed to change a couple of things. I made a few changes (and one in a printf statement) and recompiled and downloaded the code. When it was running, in the terminal I noticed that the change I made in the printf statement had not been made. Thinking that I might of loaded the wrong hex, I deleted all of the hex files in the folder, recompiled and downloaded it. We had the same result. The change in the printf statement had not been made, which leads me to believe that the new code that is supposedly getting downloaded is not properly flashing onto our FRC Controller.

I reset the control between each download attempt, and set it to program mode, however when the program began to run it was always running and older version and we were getting the old printf statement to the terminal.

Any Ideas on how to clear off the old code and hopefully get the new set flashed on?

Thanks in Advance

Nolan
  #2   Spotlight this post!  
Unread 07-11-2007, 15:20
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,270
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Code Flashing Issues

Are you sure that your actually getting to where the printf occurs in the code. It is not impossible that there is a problem with the code being loaded onto the RC however it is pretty unlikely that it would not load at all (assuming ifi loader appears to be working, i.e. the progress bar comes up and the code executes at the end) it would be more likely that if there was a problem it would corrupt the code.

If you want to put up the file with the printf statement in it then we might be able to help more.

James
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #3   Spotlight this post!  
Unread 07-11-2007, 15:43
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 684
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Code Flashing Issues

MP-LAB? Assuming yes...

Make sure MP-LAB is working the correct subdirectory.

(Easy way, Project -> Close: see what subdirectory it says it's in.)

Make sure IFI Loader is getting from the correct subdirectory.

If you put everything in a new subdirectory to make a new project, the MP-LAB workspace may still be pointing to the old subdirectory.

Sometimes if things aren't working right, the best bet is to copy all the files to a new subdirectory and use project wizard to create a new project. There is a time limit sometimes of how many different things you could try to fix it versus just recreate it.

After Preview: I suppose JamesBrown could be right, that the code isn't reaching the printf, but ...
Quote:
Originally Posted by bluenp
When it was running, in the terminal I noticed that the change I made in the printf statement had not been made.
I just figured the old printf was printing, so, yes, if there were changes in code around the printf, it could be code issues. Or it may be MP-LAB looking at the wrong locations. (Hey! That sounds like a song!)

Roger.
______________________
Any man whose errors take ten years to correct is quite a man.
J. Robert Oppenheimer
  #4   Spotlight this post!  
Unread 07-11-2007, 22:14
bluenp bluenp is offline
Registered User
None #1817
 
Join Date: Nov 2007
Location: Texas
Posts: 2
bluenp is an unknown quantity at this point
Re: Code Flashing Issues

Yes, I am using MP LAB.

I had previously moved everything into a new folder (and deleted all of the old hex files as to make sure that I was indeed flashing the most current). The thing that makes me believe that it's not flashing correct is that the printf statement occurs and it outputs

offset1: offset2:

and when I was editing the code i made a typo to where it was "offsetf" instead of offset2, however when outputting on the terminal it still says offset2.
  #5   Spotlight this post!  
Unread 07-11-2007, 23:43
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Code Flashing Issues

Quote:
Originally Posted by bluenp View Post
Yes, I am using MP LAB.

I had previously moved everything into a new folder...
Make doubly sure that you're editing the right file. The editor can keep a connection to the file in the old folder until you close everything and open it again from the project window.
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
Issues with encoder code jgannon Programming 7 26-03-2006 15:12
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
Flashing Battery Light Max Brin Technical Discussion 3 12-01-2006 11:46
Flashing Red Robot Feedback Lights zarf Programming 2 12-02-2005 16:01
flashing LEDs jacob_dilles Electrical 1 22-02-2004 21:52


All times are GMT -5. The time now is 09:32.

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