Go to Post The dog-gear! Do u even shift bro? - WileyB-J [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 16-02-2009, 09:43
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Question Re: Cannot get Code to Download to cRIO

One weird aspect of VxWorks/PowerPC compiler-linker is that if you make a call to a function that does not exist, the compiler/linker will not give an error.

Wow! Seems like this shouldn't happen. Is there a software switch that needs to be enabled in order to turn on the error indicator in the default configuration version we have been given as examples?
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2009, 12:52
Kruuzr Kruuzr is offline
Mentor - electrical, software
AKA: Steve Cote
FRC #1922 (Ozram)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Henniker, NH
Posts: 33
Kruuzr has a spectacular aura aboutKruuzr has a spectacular aura about
Re: Cannot get Code to Download to cRIO

Quote:
Originally Posted by marccenter View Post
One weird aspect of VxWorks/PowerPC compiler-linker is that if you make a call to a function that does not exist, the compiler/linker will not give an error.

Wow! Seems like this shouldn't happen. Is there a software switch that needs to be enabled in order to turn on the error indicator in the default configuration version we have been given as examples?
I don't believe so. I actually ran into this at work (BAE Systems) and it was explained to me that it just expects the functions to be supplied in a different module. I guess that's the expected normal operation. It just makes life terribly difficult when you don't know what's missing. On the other hand, just knowing that can lead you to look in different directions than if you thought you weren't downloading correctly.

If you are using version control, try going back to an older version till you find one that works. Then track the changes. That's what we had to do.

Steve C
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2009, 17:59
gm342 gm342 is offline
Registered User
FRC #0342
 
Join Date: Feb 2009
Location: Charleston, SC
Posts: 7
gm342 is an unknown quantity at this point
Re: Cannot get Code to Download to cRIO

I still think that there is something more going on here. We troubleshooted this over the weekend quite a bit (still no full solution). We did try going through old code revisions and it did not solve the problem. We had cRIO symbol errors for all of the above mentioned symbols and then the list suddenly decreased to just the Solenoid constructors. After commenting out the solenoid constructor code, everything worked fine. Place the code back in and trouble. I checked Windriver and Eclipse settings files, and they too also were unchanged since the beginning of the season.

I am going to continue with trying to track this down.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2009, 18:15
Sentient's Avatar
Sentient Sentient is offline
Registered User
FRC #0639 (Code Red)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ithaca
Posts: 21
Sentient is on a distinguished road
Re: Cannot get Code to Download to cRIO

Did you try making a physical connection to the debug and reading the output in Hyperterminal? If you do have a run-time error, it will show up here.
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2009, 21:04
computerish computerish is offline
Registered User
FRC #0619
 
Join Date: Nov 2008
Location: va
Posts: 45
computerish is an unknown quantity at this point
Re: Cannot get Code to Download to cRIO

EDIT: Everything was working fine and then suddenly we have the No Code error again. I don't understand it.

Check and double check your IP setting on your computer!

IP: 10.XX.XX.6
Subnet: 255.255.255.0

That solved it for us! Even if you "know" they are right, check it again.

Last edited by computerish : 16-02-2009 at 21:21.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2009, 03:44
Analog's Avatar
Analog Analog is offline
Registered User
AKA: Bob Most
FRC #2619 (The Charge)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Midland, Michigan
Posts: 53
Analog will become famous soon enoughAnalog will become famous soon enough
Re: Cannot get Code to Download to cRIO

This:

Quote:
Originally Posted by Sentient View Post
Did you try making a physical connection to the debug and reading the output in Hyperterminal? If you do have a run-time error, it will show up here.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2009, 11:29
greekgod8591 greekgod8591 is offline
Registered User
FRC #2577
 
Join Date: Feb 2009
Location: New Jersey
Posts: 7
greekgod8591 is an unknown quantity at this point
Re: Cannot get Code to Download to cRIO

Hey guys,
I think we've made some progress. We have no gotten the code to download to the cRIO or at least we're under the impression that this is happening. Unfortunately we cannot get the code to execute/get anything useful to happen. Here's a list of what we did:
Problem 1: Stupidly connected the router to the internet
Solution: Disconnect from internet
Problem 2: Your IPs are not set correctly
Solution: In the control system documentation there is a nice little diagram with all the IPs. We just double checked everything and pinged to ensure they were there.
Problem 3: Project did not build correctly
Solution: Try going into WR and selecting Project->clean and rebuild everything
Problem 4: Incorrect download file
Solution: Window->Preferences and check team number and .out file
Problem 5: Do not have proper remote server set
Solution: Look in the FRC documentation, and reset your server settings, then try and connect to the robot.

So we did all of that and we now get the DS to show a voltage which I'm assuming means that we at least have the code file onto the cRIO. Unfortunately it doesn't do anything. We can also see it is there through looking at the remote server thing. We tried to run in debug mode and nothing happened, when we set debug points it throws crazy errors. We've basically hit a wall, we don't know what else to try.
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2009, 12:53
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,276
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: Cannot get Code to Download to cRIO

Try loading the code via FTP with a program like FileZilla. I had similar problems to your's and managed to resolve them this way.

As a note if you choose this solution then make sure you rename your .out file FRC_UserProgram.out . The loader changes the name itself prior to loading so if you load manually you will need to rename the file manually, you can change the name of the file created in the WindRiver build options if you don't want to rename it every time.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
Reply With Quote
  #9   Spotlight this post!  
Unread 17-02-2009, 17:46
gm342 gm342 is offline
Registered User
FRC #0342
 
Join Date: Feb 2009
Location: Charleston, SC
Posts: 7
gm342 is an unknown quantity at this point
Re: Cannot get Code to Download to cRIO

I connected to the cRIO with a Serial cable. Our error message is no more revealing than the Windriver Eclipse Run Last Debug except for one important bit:

Code:
task 0xc1fc38 (t1) deleted: errno=1835009 (0x1c0001) status=1 (0x1)
Warning: module 0xc9ed18 (FRC_UserProgram.out) holds reference to undefined symb
ol _ZN8SolenoidC1Eii.
Warning: module 0xc9ed18 (FRC_UserProgram.out) holds reference to undefined symb
ol _ZN8SolenoidC1Ei.
(unloading partially loaded module FRC_UserProgram.out)
I used the nmppc tool (located in C:\WindRiver\gnu\3.4.4-vxworks-6.3\x86-win32\bin) to list all of the symbols in C:\WindRiver\vxworks-6.3\target\lib\WPILib.a This lists all of the symbols in this library. Here's the interesting bit:

Code:
000003c0 T _ZN8SolenoidC1Ej
00000690 T _ZN8SolenoidC1Ejj
The symbol names don't line up (compare i and ii to j and jj). Anyone had a problem similar to this or guess what might have caused it? I would be interested to hear if other teams with symbol problems (no code error) are seeing similar output.

If it helps, run C:\WindRiver\gnu\3.4.4-vxworks-6.3\x86-win32\bin\nmppc C:\WindRiver\vxworks-6.3\target\lib\WPILib.a > outfile at a command prompt (I use Windows Power Shell)

and then you can open a file named "outfile" in any text editor to see the horrendously long list of nmppc output
Reply With Quote
  #10   Spotlight this post!  
Unread 19-02-2009, 09:33
Aaron S's Avatar
Aaron S Aaron S is offline
Registered User
FRC #1612 (Robosharks)
Team Role: Programmer
 
Join Date: Jul 2008
Rookie Year: 2008
Location: United States
Posts: 11
Aaron S is an unknown quantity at this point
Send a message via AIM to Aaron S
Re: Cannot get Code to Download to cRIO

I got this error the day after I updated the cRIO and fixed it by downloading the default code and then downloading our code (which I cleaned up a bit by going back through it and making sure I had fixed everything that looked like it could mess up). Whenever you get the "No Code" error after you have successfully downloaded your compiled .out file, it means that there is something wrong with your code. If there was no connectivity to the cRIO from the DS, "No Comm" would be displayed.
Reply With Quote
  #11   Spotlight this post!  
Unread 19-02-2009, 17:18
gm342 gm342 is offline
Registered User
FRC #0342
 
Join Date: Feb 2009
Location: Charleston, SC
Posts: 7
gm342 is an unknown quantity at this point
Re: Cannot get Code to Download to cRIO

It's been several days and I have not seen any replies to this thread from other teams with the No Code error.

Did your error get fixed? Did you feel like it did it on its own or you changed something?

Are you still having problems, but it doesn't appear to be the same one as we're having?

Have you run the nmppc tool at all to compare output?

Thanks teams in replying. The reason why I am pushing this quite a bit is that this bug could track down to an issue inside of the Windriver gcc build, and this could save a lot of teams future heartache to work it now.
Reply With Quote
  #12   Spotlight this post!  
Unread 19-02-2009, 20:14
Aaron S's Avatar
Aaron S Aaron S is offline
Registered User
FRC #1612 (Robosharks)
Team Role: Programmer
 
Join Date: Jul 2008
Rookie Year: 2008
Location: United States
Posts: 11
Aaron S is an unknown quantity at this point
Send a message via AIM to Aaron S
Re: Cannot get Code to Download to cRIO

Again, it's more likely to be in your code if you successfully downloaded the .out file to the cRIO. Try making a new project based off the SimpleTemplate example and just adding your .cpp / .h files to it, then compiling. That's what I and my team did which seems to have worked.
Reply With Quote
  #13   Spotlight this post!  
Unread 20-02-2009, 09:54
gm342 gm342 is offline
Registered User
FRC #0342
 
Join Date: Feb 2009
Location: Charleston, SC
Posts: 7
gm342 is an unknown quantity at this point
Re: Cannot get Code to Download to cRIO

Your fix may be a workaround to this larger problem. What may have happened is that by moving your files in the build order you changed the ordering in memory and gcc got a lucky fix and worked around it.

I have also done the new project, but in our case it hasn't resolved the problem.

I would say we should push for a md5/sha1 checksum on the cRIO for the uploaded file to compare it with the computer's file to verify the copy integrity. I will try this tonight and see where it goes. However, copying the file multiple times should have fixed any possible bit error. It would be inconsistent to get this same error after multiple uploads.

Thanks for the feedback.
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
Cannot Download Code to our Robot jcvd C/C++ 9 27-01-2009 13:09
Download Programs Off the cRIO jwdickson FRC Control System 1 10-01-2009 17:29
Can't Download Code nickmagus Programming 1 05-01-2009 17:52
Download code from robot Luminous Programming 4 25-05-2005 13:32


All times are GMT -5. The time now is 17:30.

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