Firmware download without wiping code

Hey all,
We have an old robot still built that we use for demonstrations. We need to upgrade the firmware on the Cortex but we do not still have a copy of its code. Does downloading firmware with RobotC’s built in firmware updater wipe the code in the Cortex? If yes, is there a way to upload the hex file from the Cortex to a computer? We do not care about the source code itself, we just want the robot to run the same after updating.

EDIT: I should add that the robot uses an old Cortex. (flat top, NC something I believe) We are updating the firmware because our joystick will not sync with the robot.

The answer is yes and no.

You can upload a hex file with the current program from the cortex to the PC, use the file management dialog. However, after upgrading the ROBOTC firmware you cannot use an old hex file with it, ROBOTC user code is very much tied to the version of ROBOTC it was compiled with (there are a few exceptions depending on specific versions involved). You could re-download the old hex file for demos which would then need to use whatever old version of ROBOTC it was originally compiled with. If you do not know (or have) the old version of ROBOTC then the whole flash can be uploaded with the SM32 flash loader I posted last year, this could then be downloaded again if necessary and would contain both the user code and ROBOTC firmware.

If you need to update master firmware, then it really depends on which version to which new version. 3.21 to say 3.23 is not an issue, something older to 3.23 may be.

You could downgrade the firmware on the joystick to be the same version as that on the robot. Old versions of RobotC are available at the bottom of this page:

Not sure how you would determine which version of RobotC was used originally. You may need to try downgrading the joystick to several different versions. It’s probably more trouble than it’s worth. Unless the behavior was really complicated, I would personally suggest just rewriting your code.

cant u use file manager in robot c to download the code to the pc … then simply upgrade and re-compile

You woud have to decompile the hex to do that. To my knowledge this is not a good idea. To get to the code to recompile it you would have to decompile it from the hex that was moved to the pc from the cortex.

Are you talking about a Cortex or a PIC v0.5? The description of being an old, flat-topped microcontroller makes me think it might be a PIC.

Cortex - on the bottom side of the controller there’s a label whether is NC1, NC2, etc. Flattop is describing where the vexnet is inserted. The newer versions it has a “bump” to supposedly increase connectivity (not 100% sure that’s the reason).

Is the code for this robot that complicated that you can’t get someone to rewrite to get some extra practice? It surely wouldn’t take that many hours of work.

Thanks for all the great responses guys!

We ended up downgrading the joystick firmware per drdanielfc’s suggestion (it turns out the bot at had crawled the firmware download page right before Worlds 2011, which was the exact version we needed)

Great info, thanks! The robot was on firmware earlier than v3.x still so this wouldn’t have been an option. I’ll keep this in mind though if we need to do something similar later.

The robot had an NC1 Cortex.

The code would have been incredibly easy to rewrite. However, the robot had since been bought from us by a non-profit to use during demonstrations at schools, etc. We asked, and they said they did not want us to modify any of the code on the robot.