View Full Version : Get code from cRIO
Our team has misplaced the laptop that we use for programming and along with it a flash drive with the backups. Is there any way to read the existing code from the cRIO so we don't have to start from scratch? We program in Java.
anthonyttu
19-09-2011, 12:10
Sorry there is no way to remove code from a RIO.
That is what I thought but was hopeful I was wrong. Thanks for the quick response.,
Andrew Schreiber
19-09-2011, 14:21
This post seems to come up every year... I strongly suggest throwing your code into a git repository (even LV code)and putting it on a free account at github or any of the other hosted SCM sites. Revision tracking AND backup all in one and it is free.
AdamHeard
19-09-2011, 14:29
This post seems to come up every year... I strongly suggest throwing your code into a git repository (even LV code)and putting it on a free account at github or any of the other hosted SCM sites. Revision tracking AND backup all in one and it is free.
Highly recommend the same. It's amazing how many programmers don't apreciate the importance of version control.
Off topic, but if you use the two interpreted languages available, Python and Lua, you could ftp the code off ;)
Andrew Schreiber
19-09-2011, 15:37
Highly recommend the same. It's amazing how many programmers don't apreciate the importance of version control.
Off topic, but if you use the two interpreted languages available, Python and Lua, you could ftp the code off ;)
True, we are operating off the assumption that the OP did not use either of those languages. If it is incorrect and you DID use one of those the process Adam described above would work.
As for more details on SCM... the thread http://www.chiefdelphi.com/forums/showthread.php?p=1073528 has a small discussion on it.
I can tell you when I start a project the first command I type is "git init" depending on what I'm doing I do I then push to a remote server (github usually). Works great for hw assignments too.
WizenedEE
19-09-2011, 19:56
Well, if you just want to upload new code to try it out and then put the old code back on, you can just grab startup.rtexe off of it (I don't know if startup.alias is needed.)
Creating a zip file of the folder of your code and uploading it to a folder on your teams website is another easy way to back up your code.
bobl, though I feel for your loss having done the same thing my self, this is a great opportunity to review coding in Java before the season starts. Not that saves you any time, but it is an awesome learning experience
Slow your horses people. If you really really really want your code (and provided its in c++ or another one of the mentioned languages) You can "Somewhat" get the code from the cRIO. You can ftp and fecth the FRC_UserProgram.out file from the /ni-rt/system/ directory. This code can be be then decompiled using a tool such as ollydebug. This technique should be reserved for times when the amount of work to recreate what ever the old coder made is greater than about 10000000000000000 hours:)
This code can be be then decompiled using a tool such as ollydebug.
Ollydbg contains a disassembler, not a "decompiler". You can't get your original C++ code back.
Joe Ross
20-09-2011, 10:42
Ollydbg contains a disassembler, not a "decompiler". You can't get your original C++ code back.
It also appears to be x86 only, which won't help you with the cRIO's ppc target.
Creating a zip file of the folder of your code and uploading it to a folder on your teams website is another easy way to back up your code.
Another option would be to use ftp to upload it to your robot.
WizenedEE
20-09-2011, 17:47
Another option would be to use ftp to upload it to your robot.
Great idea! Also, let's put a compiler and an AI on it so it'll write its own code.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.