View Full Version : Cannot Download Code to our Robot
Our problem is somewhat strange in that we don't encounter any errors when trying to download code to our robot, but when we go to test our robot, the behaviour does not change. For example, if we comment out everything in our code involving driving, and then download code, we will be able to do so, but then when we go to test our robot it can still drive.
Things that are worthy of mentioning are that:
-We are using C++ and Wind River, not LabVIEW
-We HAVE updated our cRio
-We are running a Subversion server
wt200999
15-01-2009, 21:27
If you download it you must reboot the cRIO for it to take effect.
neutrino15
15-01-2009, 21:31
If you download it you must reboot the cRIO for it to take effect.
Is there any other option besides "Downloading" code? We have just been rebooting the cRIO every time as well, but this does take a huge amount of time. Is there a way to load code while the cRIO is running?
Shinigami2057
15-01-2009, 22:40
You can run the program in memory without deploying it to flash.
Sorry if the exact dialogues are incorrect, but I don't have it in front of me. I'll clarify with screenshots in the morning if desired :) You can either Run or Debug Kernel Task directly, after building your project. The first time you do it, it will bring up a Run dialog, where you will be able to configure how your program is run. You need to type in the entry point of the program, which is FRC_UserProgram_StartupLibraryInit for WPILib code. If running normally, just hit the "Run" button, which will start running the code.
If you need to test another build, you must first unload your program from the cRIO's memory - find YourProjectName.out in the Remote Systems list, and delete it (don't change any of the check boxes that come up - just hit OK). Then you can run another version of your code . It's a pain, but it works.
Note that you must also "undeploy" any code you've deployed to flash, otherwise directly running your program won't work.
byteit101
16-01-2009, 09:29
right click on the project, if you just created this project, and not built it yet, build, otherwise, Run (or Debug) Kernel Task, and set the values as specified in the updated C CPP Programming guide.pdf (the values only need to be entered once)
hit run
it runs w/o you rebooting
reboot cRIO to "undeploy"
edit file
Repeat
you don't need to undeploy, just reboot the cRIO
(make sure the downloaded code is undeployed)
Also, if you want to FIRST>Download,
you need to rebuild the project (Ctrl +Shift+A)
and then Undeploy, Download, reboot
In labview how to you get the code to stay after a reboot?(permanent download)
I found a thread somewhere that explained this but i can't seem to find it again and i dont think its worth starting a new thread....
Thanks
JamesByrne
16-01-2009, 12:33
When you deploy the code in labview you need to select run on boot option from the drop down box. This will make it so that it works. at least in my experience.
RKElectricalman
16-01-2009, 13:33
just for reference, I ran into the same issue. Early on when testing code, I never saw a change in code, especially when I knew I made drastic changes. What you have to do is run in to preferences, and chance your FIRST downloader preferences, and change the location of your .out file. It's usually on your computer under workspace.
let me know if this works
-Rameez
Our problem is somewhat strange in that we don't encounter any errors when trying to download code to our robot, but when we go to test our robot, the behaviour does not change. For example, if we comment out everything in our code involving driving, and then download code, we will be able to do so, but then when we go to test our robot it can still drive.
Things that are worthy of mentioning are that:
-We are using C++ and Wind River, not LabVIEW
-We HAVE updated our cRio
-We are running a Subversion server
We've got the same problem. We've followed all of the WindRiver-associated steps mentioned in this thread. We are not running SVN, but everything else you mentioned is the same.
On some occasions, we've had it suddenly work, but we haven't been able to deduce why, and it only lasted for one or two reboot/reprogram iterations.
I think I've found the solution (thanks to Ken Streeter and Brad Miller).
http://www.chiefdelphi.com/forums/showpost.php?p=807962&postcount=5
(http://www.chiefdelphi.com/forums/showpost.php?p=807962&postcount=5)
Before trying to download code, the robot should be "dead": No PWM outputs, no console output when you press buttons. If you get either of these, you have to undeploy the default image code first.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.