Go to Post The person that I would, without a doubt, would like to meet the most is my sanity. - lukevanoort [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 Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 31-01-2010, 08:59
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
can't Download code to cRIO

We can Debug our code, it runs and there are no error messages in the Task console window. Now when we start FIRST...Download the status window opens and it is static, saying "Downloading to robot..." with a red dot on the right side. No progress bar or anything, just stuck. The ethernet lights show no activity. The downloading PC has IP 10.xx.yy.6.

The FIRST Downloader Preferences have been set to our team number and the .out file is the correct one. Windriver has the update, Labview has it's update although possibly those have nothing to do with this problem. The cRIO has C++ image V19 and that is confirmed by Driver Station ... Diagnostic.

Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2010, 15:28
Dark_Vizior Dark_Vizior is offline
Registered User
FRC #3257
 
Join Date: Jan 2010
Location: California
Posts: 2
Dark_Vizior is an unknown quantity at this point
Re: can't Download code to cRIO

The FIRST downloader in Windriver is specifically for downloading the code permanently to the cRIO. The run dialog however, will allow you to send code to the cRIO temporarily which will allow you to debug and test while developing.

Assuming you have set the IPs of the cRIO and the Gaming Adapter correctly, you need to setup a Kernel Task in the Run Dialog. You can do this by clicking on the arrow next to the green button with a triangle on it, and then click 'open run dialog'.

To the left, you should see a tree diagram with the 'kernel task' option in it. Right click on this and make a new kernel task. In the main tab in the box next to 'entry point' you need to put 'FRC_UserProgram_StartupLibraryInit'. Next, switch to the projects to build tab and then add your current C++ project to this box. Switch to the downloads tab and make sure the same project is selected.

Once you have done this, you can click 'apply' which will save the settings and close the dialog.

Now, in the bottom left corner of the Windriver program, you will see the 'remote systems' tab, right click in there and click on 'new' and the 'connection'. In the dialog that pops up, go into the VxWorks 6.x tree and use the Wind River VxWorks 6.x Target Server Configuration that is available there.

Click next. Make sure the target name/ip address is set to your cRIO's address. The input box next to 'File' needs to be set to the VxWorks file located in C:\windriver\WPILib\ Once you have done that, click finish. You can then right click on that connection and assuming your robot is all connected and you can ping it, you can right click the connect button.

After it connects, you will see the tasks running on your cRIO. To upload code to the robot, all you need to do is go up to the green button that you went to before and select the run configuration you setup before and it should send the code to the robot.

You can reset the code by resetting (the power) or rebooting the robot remotely.

Hope this helped.

Regards, team 3257.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2010, 19:47
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: can't Download code to cRIO

Quote:
Originally Posted by oddjob View Post
We can Debug our code, it runs and there are no error messages in the Task console window.
And it works?

Quote:
Originally Posted by oddjob View Post
Now when we start FIRST...Download the status window opens and it is static, saying "Downloading to robot..." with a red dot on the right side. No progress bar or anything, just stuck. The ethernet lights show no activity. The downloading PC has IP 10.xx.yy.6.
can you open a browser and go to ftp://10.xx.yy.2/ and see the cRIO
if not, make sure you are wired up to the cRIO correctly (and try direct crossover)
is the project Built
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2010, 21:35
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: can't Download code to cRIO

Quote:
Originally Posted by byteit101 View Post
And it works?

Yes. We've loaded code with the Windriver Run button and driven our mecanum chassis robot over field humps. Today we got the camera sending images to the dashboard after formatting and reimaging the cRIO. Still won't Download though. The Download window just sits there, no progress. The Undeploy option says there is no user code loaded, like we didn't know that

Last edited by oddjob : 31-01-2010 at 21:38.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2010, 15:00
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: can't Download code to cRIO

Make sure the networking is set up correctly.
however, you can always get the built file, and FTP it to the crio manually, 10.xx.yy.2/system/startup/FRC_UserProgram.out (or something like it)
EDIT: (hopefully stupid question) you are attempting downloading when the cRIO is plugged in, turned on, and the DS (which is connected to the programming laptop) says communication, no code, Correct?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 01-02-2010 at 15:03.
Reply With Quote
  #6   Spotlight this post!  
Unread 01-02-2010, 15:04
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: can't Download code to cRIO

Quote:
Originally Posted by byteit101 View Post
hmm, if it fails, you can always get the built file, and FTP it to the crio manually, 10.xx.yy.2/system/startup/FRC_UserProgram.out (or something like it)

That's a good idea to try FTP. If the FIRST Downloader uses FTP to transfer data, maybe the root cause of the problem is with FTP. We'll try it and report back.
Reply With Quote
  #7   Spotlight this post!  
Unread 04-02-2010, 08:05
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: can't Download code to cRIO

Our control system is in pieces, getting installed on the chassis. We did ftp into the cRIO and were able to copy over our .out file and rename it, power cycled the cRIO, it didn't run our code and the RSL had a somewhat random blinking pattern. Further debugging will have to wait until probably Saturday.
Reply With Quote
  #8   Spotlight this post!  
Unread 04-02-2010, 15:14
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: can't Download code to cRIO

are you positive you have v19 and Windriver/WPILib update 4?
also, Right click the project, and rebuild
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #9   Spotlight this post!  
Unread 05-02-2010, 17:18
Lakedaimon's Avatar
Lakedaimon Lakedaimon is offline
Registered User
FRC #3012 (Spartans)
Team Role: Teacher
 
Join Date: Nov 2008
Rookie Year: 2003
Location: Cypress Lakes HS, Katy, TX
Posts: 23
Lakedaimon is an unknown quantity at this point
Re: can't Download code to cRIO

We are seeing this same random blinking pattern on the DS. Does this indicate anything specifically is wrong?
__________________
Firmware is the most expensive thing in the universe. - Jack G. Ganssle
Reply With Quote
  #10   Spotlight this post!  
Unread 12-02-2010, 09:14
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: can't Download code to cRIO

We haven't run any code for a week or so while the hardware is getting assembled.

Last night I reformatted the cRIO and installed v19 image for C++ for maybe the 6th time. Started Windriver, checked the FIRST preferences for the correct .out file and team number, Undeployed the code and it gave a warning that there was no code to undeploy, then rebuilt and Downloaded our code. The Download window opens, red dot on the right side, no progress bar, nothing downloads. Ftp into the cRIO and the Startup directory, no code got copied over. Exit Windriver. Rename and copy over the .out file to the cRIO using ftp. Power cycle the cRIO and the Driver Station says there is no robot code. Ugh. I'm ready to throw the cRIO into the river.
Reply With Quote
  #11   Spotlight this post!  
Unread 12-02-2010, 10:09
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: can't Download code to cRIO

We had a similar experience last night after I added the 2/8/2010 c++ update to our 2 PC's. "no code to undeploy" messages and "no robot code" upon cRio power reset and what was a ""too fast" progress bar on the download. After doing the insanity thing and repeating over and over, my cohort, Bryce re-installed the update on one of our HP's. He pulled a new "2010 vision code " example project...then closed and re-started WindRiver. Built, set the correct .out, and downloaded. That finally worked.... I don't blame the cRio. There is something very funky about WindRiver/Eclipse this year. We keep getting Windows "out-of-memory" errors and need to close and re-start at least once a meeting.......go figure.

Eric
__________________

Don't PANIC!
S. P. A. M.
Reply With Quote
  #12   Spotlight this post!  
Unread 13-02-2010, 10:56
cmh0114 cmh0114 is offline
Registered User
AKA: Cam H
FRC #0217 (Thunderchickens)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2005
Location: Michigan
Posts: 61
cmh0114 will become famous soon enoughcmh0114 will become famous soon enough
Re: can't Download code to cRIO

Try to take one of the example projects and download it. Sometimes there will be a bug in the code that may prevent it from downloading/running correctly. If you can't deploy a default project, then you know for sure that it's not a problem with the code and that it is a problem with something in the downloading process.
Also, make sure you have the latest updates for everything you're using. Apparently there was an update recently (I think for the DS) that you had to install twice, because it didn't work the first time. Make sure everything is installed and updated.
Good luck!
Reply With Quote
  #13   Spotlight this post!  
Unread 14-02-2010, 08:53
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: can't Download code to cRIO

We finally deployed code yesterday for the first time in 2010!

It was an epic. We tried to reimage the cRIO from our programming laptop and it would fail every time. Sometimes the Imaging app couldn't locate a cRIO, other times it would error out during formatting, sometimes it would error out later in the imaging process. For laughs we booted up our 2009 laptop and loaded the 2009 v7 image, and that worked! Then went back to the 2010 laptop and started the DriverStation, it said there was robot code. Strange stuff. Tried to Image to 2010 v19, same errors as before. Hmmm.

We loaded all the 2010 code onto the Classmate and tried to Image from that. It looked promising but stopped short again. Then we set the cRIO to Safe mode and reformatted, then went out of Safe mode and the Image finally loaded. Then we ran Windriver on the Classmate and the code Downloaded and the robot at last can be power cycled and run the code.

The other laptop with 2010 code still can't Download robot code, so that will have to have all it's 2010 code uninstalled and reinstalled. What a mess, but at least we can compete now.
Reply With Quote
  #14   Spotlight this post!  
Unread 14-02-2010, 12:27
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: can't Download code to cRIO

I helped a team yesterday having problems getting their "Robot Code" light to turn green. The FRC cRIO Imaging Tool on their laptop wouldn't find the cRIO. After trying everything I could think of, I used our team's laptop instead, and things started working.

I think it turned out at the end of the day that there was a 1394 network defined on their laptop, and disabling that in addition to the wireless network fixed the problem.
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
Need to manually reboot cRIO to download code FRC4ME Java 6 24-01-2010 15:59
Another Can't Download Code Thread rjn C/C++ 9 24-01-2010 10:17
Cannot get Code to Download to cRIO greekgod8591 C/C++ 25 09-03-2009 22:10
Can't Download Code nickmagus Programming 1 05-01-2009 17:52
Can't download from Autodesk FIRSTbase Bomberofdoom Inventor 11 01-01-2008 20:06


All times are GMT -5. The time now is 12:22.

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