Viewing files that are on C-RIO to verify our code

we have our code from last year’s robot (competition season code) and i need to be able to look at it and see if it is the same code that is on my computer (no one kept documentation of our code >.<) i dont know how to view it. i wanted to know if i could view it as if i was viewing a flashdrive.

Sorry to say, but this isn’t exactly possible. Once the code is compiled to the cRIO, there really isn’t a way to take it off of there.

There’s no easy way to view the code, because the version now on the cRIO has been compiled and isn’t in user readable form. You can ftp to the cRIO and look at the file structures easily.

The best you might do is compare the file sizes on the cRIO with the file sizes in your project build folder. Tedious though.

i see what you’re saying. i will try and see what i can do. thank you for your help. i will post here as soon as i can get some results. thanks for your help!

as others have said, there isn’t a good way to work out what the code is once it becomes a binary. For that reason, in my team’s code we write a version string out to the serial port, and every time we commit code to our online repo, we also update that version string.

Does the cRIO have a timestamp on files? I’ve never checked. I wonder if you couldn’t compare that to the last build on the computer.

I’m not sure, but if it does, I’d bet it just uses the ‘date created’ value given to it by windows since there is no battery backed RTC on a FIRST machine.

If comparing filesize/dates doesnt work you could try seeing functionality differences. Back up the file over ftp (/ni-rt/system/programnamehere.out). Then undeploy, redownload the new code.

A potential caveat is that the code may be different but be functionally equivalent.

In the future, version control would solve these problems:)

the crio 2 doesn’t have a battery backed clock, but the 8 slot does. Unfortunately, the lack of a clock also messes up the dates of files ftpd to it.