Go to Post Don't worry about where you will be. Just consider youself lucky for being where you have been. - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2010, 20:06
ofshea ofshea is offline
Registered User
FRC #0246
 
Join Date: Jul 2008
Location: Arlington, MA
Posts: 4
ofshea is an unknown quantity at this point
Another code download problem

I've looked through a lot of pages, and I think our issue might be unique.

Symptoms:
Downloading works (I've watched it in Wireshark, and I can see the file in /ni-rt/system/)
Then we try to reboot the system, to run the downloaded code (using 'Reset Target').
And it never comes back! After a hard-reboot, it starts talking again, but it pretends that we never downloaded anything.

Things I've tried:
-Putting the .out into /startup (same results)
-Connecting over a serial connection (using the Windriver terminal) -- I don't seem to get anything (one empty line?). I've been sure to match the port settings etc. and it's on a standard port (COM1). It is using a serial/usb converter (from VEX I think), because the programming laptop doesn't have a serial port.
-Using the DefaultRobot binary, rather than our own code (same results)

Another note: sometimes we get messages like mikets' (http://www.chiefdelphi.com/forums/sh...d.php?t=83212), but not often (and I'm not sure in what context -- it's only happened once or twice).

Any help appreciated!

Thanks,
246
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2010, 19:25
ofshea ofshea is offline
Registered User
FRC #0246
 
Join Date: Jul 2008
Location: Arlington, MA
Posts: 4
ofshea is an unknown quantity at this point
Re: Another code download problem

I've gathered this additional tidbit:
If the robot has something "deployed" (it still won't run, but if we had downloaded before), we get the "relocation offset too large" (I have set -mlongcall) as in http://www.chiefdelphi.com/forums/sh...ad.php?t=83212 when we try running it in RAM. As soon as it's undeployed & rebooted, it works when we load it in RAM again.
Hopefully this will narrow it down some.

Thanks,
246
Reply With Quote
  #3   Spotlight this post!  
Unread 22-02-2010, 20:20
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 671
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Another code download problem

You may want to check your cRIO image to make sure you have the latest (v20) and also with matching Workbench update 4.3. Sometimes, I found it helpful to re-flash the cRIO image anyway (with the "format" checked), just in case there is something mismatching on the flash disk.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-02-2010, 02:15
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Another code download problem

I am experiencing similar problems - last year's code downloads and executes fine. Creating a new shell based on last year's project, writing new code, compiling it without issue, downloading it perfectly, and rebooting yields "no robot code". Extremely frustrating.

As far as I can tell, I've updated every and all piece of software and firmware to current versions. If there is a magic spiffy-dee-do installation order that must be followed in order to get everything to mesh properly, I don't see the corresponding magic spiffy-dee-do DOCUMENT that informs end users on what that process should be.

I am seeing a lot - too many - of these WindRiver "No Code" issues from many people of late - I did not have any problems at all with this using last year's stuff. Is anyone "in charge" doing anything constructive to address these issues, as some appear to still be stuck?

Also, I'd like to know (and I thought I knew, as I did it last year several times successfully) how to rename a project, the build paths/specs, yadda yadda from one project name to another. Example - "DefaultRobotProject" to "XM12", such that the end result is a binary XM12.out. Again, I did this last year in modifying 1114's beta test code with no major issues.

Disclaimer - I am not a hardcore C programmer.

Thanks in advance,
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #5   Spotlight this post!  
Unread 23-02-2010, 03:28
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Another code download problem

Quote:
Originally Posted by Travis Hoffman View Post
rebooting yields "no robot code".
Extremely frustrating.
I am seeing a lot - too many - of these WindRiver "No Code" issues
One symptom, unknown number of causes, no defined path for reaching a diagnosis. Mayhem. Little black boxes -- remember, you don't need to know what's inside.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
  #6   Spotlight this post!  
Unread 23-02-2010, 12:16
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,113
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: Another code download problem

Quote:
Originally Posted by Travis Hoffman View Post
I am experiencing similar problems - last year's code downloads and executes fine. Creating a new shell based on last year's project, writing new code, compiling it without issue, downloading it perfectly, and rebooting yields "no robot code". Extremely frustrating.

As far as I can tell, I've updated every and all piece of software and firmware to current versions.
If last year's code executes properly, that's a pretty good indication that you probably have last year's image in the cRIO. What does the Driver Station tell you the cRIO image version is? It had better end in v20, or you'll get "no code" indications when you try to run a program compiled against the most recent WPI library.
Reply With Quote
  #7   Spotlight this post!  
Unread 23-02-2010, 17:02
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 160
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Re: Another code download problem

Travis and others -

The best thing you can do is download the NetConsole plugin and install it. (See link under "C/C++ Team Update 4.0" on this page). Watch the console when the cRio reboots. The messages are still a bit cryptic, but you should be able to glean hints about which pieces of code are complaining. You can then either change that code or just comment it out until you can get the rest of your code booting cleanly.

I too have seen a much greater sensitivity to little code issues that didn't seem to matter last year. Not sure exactly what the difference is this year. But I have found that using the NetConsole and the iterative process described above has helped get us through it.

Also, make absolutely sure that you have the latest cRIO firmware image and the latest WPILib update - the latest updates seems to have fixed a lot of the little stuff as well.

HTH.

Last edited by Abrakadabra : 23-02-2010 at 17:06.
Reply With Quote
  #8   Spotlight this post!  
Unread 23-02-2010, 19:42
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Another code download problem

Quote:
Originally Posted by Alan Anderson View Post
If last year's code executes properly, that's a pretty good indication that you probably have last year's image in the cRIO. What does the Driver Station tell you the cRIO image version is? It had better end in v20, or you'll get "no code" indications when you try to run a program compiled against the most recent WPI library.
It's v20 on both the robot's cRIO and our demo board cRIO. Same effect on both. Latest DS software too, as well as latest WindRiver update.

I can run both last year's code (recompiled with this year's WPILib, without many changes) and also this year's 2010 camera demo code.

I copied in modified code from this year's project into the previously working .cpp and .h files from last year - no robot code resulted. I'm going to have to narrow it down slowly.

Quote:
Originally Posted by Abrakadabra View Post
Travis and others -

The best thing you can do is download the NetConsole plugin and install it. (See link under "C/C++ Team Update 4.0" on this page). Watch the console when the cRio reboots. The messages are still a bit cryptic, but you should be able to glean hints about which pieces of code are complaining. You can then either change that code or just comment it out until you can get the rest of your code booting cleanly.

I too have seen a much greater sensitivity to little code issues that didn't seem to matter last year. Not sure exactly what the difference is this year. But I have found that using the NetConsole and the iterative process described above has helped get us through it.

Also, make absolutely sure that you have the latest cRIO firmware image and the latest WPILib update - the latest updates seems to have fixed a lot of the little stuff as well.

HTH.
Thanks for the suggestions - I'll try to lock this down at the school tomorrow.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #9   Spotlight this post!  
Unread 24-02-2010, 00:03
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Another code download problem

Have you checked the WPI page recently for updates? If you aren't running the absolute latest download your code will crash and cause those errors if you try to use the DriverStationLCD or the AxisCamera class (depending on which update you are on)
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #10   Spotlight this post!  
Unread 24-02-2010, 11:35
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Another code download problem

Quote:
Originally Posted by Radical Pi View Post
Have you checked the WPI page recently for updates? If you aren't running the absolute latest download your code will crash and cause those errors if you try to use the DriverStationLCD or the AxisCamera class (depending on which update you are on)
We are using the DriverStationLCD class, but I had installed the latest WindRiver update from the WPI site (4.3, dated 2/17/10) prior to the No Robot Code errors - is there any way to verify the update "took"?

I presume the updates are cumulative - installing the latest includes the changes built in to previous updates - can someone please verify?
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #11   Spotlight this post!  
Unread 24-02-2010, 14:09
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: Another code download problem

Quote:
Originally Posted by Travis Hoffman View Post
I am seeing a lot - too many - of these WindRiver "No Code" issues from many people of late - I did not have any problems at all with this using last year's stuff. Is anyone "in charge" doing anything constructive to address these issues, as some appear to still be stuck?
The plethora of "No Code" threads and issues stems from the simple fact that the "No Code" error indication (on the driver's station, primarily) is so generic and can have so many root causes.

This will be shown whenever something has occurred to make your robot code be non-functional. This includes, but isn't limited to:

1. Failure to load at runtime. The way code is built for the robot is unlike building programs for a computer or other environment -- the program isn't actually complete (at a low-level) until it is on the robot and "linked" at runtime with the other binary files present on the cRIO. If you have a problem in your program where you, for example, declare a function that isn't actually defined anywhere, you won't actually run into a problem until loaded on the robot. This can be the result of even a simple typo.

2. Crashing programs: if your program, has some sort of ill-behavior and aborts for any reason, it can be reported as "No Code".

3. Simply not having code on the robot

4. cRIO image version mismatches with version of Windriver updates. This is really just a special case of #1

5. Buggy Windriver updates - again, just a special case of #1, but has been much more prevalent this year.



Good practices:

Use debug, not FIRST->Download for most testing and development. Only use FIRST->Download once you get to a competition point and need code to run on robot boot up. The debug load will immediately report problems and point you in the direction of how to fix.

As suggested in another post, use the console! This can be:
1. Serial console over the cRIO serial port with the DIP switch toggled appropriately (not for Black Jag CAN users!), or...
2. Netconsole (works great - highly recommended!), or...
3. Target Console launched from Windriver (though this will not catch problems early in cRIO startup)


Quote:
I presume the updates are cumulative - installing the latest includes the changes built in to previous updates - can someone please verify?
I can confirm proper operation of several of our laptops that had recent updates applied without prior updates applied; I do believe they are intended to be all-inclusive.
Reply With Quote
  #12   Spotlight this post!  
Unread 24-02-2010, 17:09
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Another code download problem

Quote:
Originally Posted by Travis Hoffman View Post
I presume the updates are cumulative - installing the latest includes the changes built in to previous updates - can someone please verify?
yeah, you only need the latest update, not a problem if you missed one.

Also double-check whether you chose the right programming language in the cRIO flash window. If you have the wrong one the robot can't figure out how to run the code (another version of #1 of the poster above me)
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #13   Spotlight this post!  
Unread 24-02-2010, 19:45
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Another code download problem

With the help of NetConsole (you're right - it's great - no more serial ports!), and some finagling of the unfamilar debug tools, and the help of people in this thread, I found out that.....drumroll.....

....I had declared a function but did not define code for it. A very basic d'oh. Wish that kind of stuff was presented more obviously to the *basic* end user.

Anyway, thanks again to all who provided advice and assistance in this thread.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
Reply


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
Another Can't Download Code Thread rjn C/C++ 9 24-01-2010 10:17
another festo problem Team2883 Pneumatics 4 11-02-2009 20:22
Problem with easyC download link whytheheckme Programming 1 11-01-2008 23:34
Itunes/Quicktime Download Problem Freddy Schurr Chit-Chat 8 27-11-2007 22:55
program download problem zdeswarte Programming 5 23-03-2005 06:46


All times are GMT -5. The time now is 03:24.

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