Is there a way to get a program off of a microcontroller?

A team here forgot their laptop and they need to make changes can you get the program off of the microcontroller and onto a different laptop?

Just out of curiosity, which team? Wish I was there…
Anyway, i’m not completely sure, you should probably have someone from their team go collect the laptop just in case. Hmm… you could maybe try hooking the adapter key from the microcontroller into the computer? Not sure if that would work but its all I can think of right now.

I would not count on it… Better get the Forgotten Laptop… Also, look into a Cloud Solution like DropBox… :wink: I am still a New User of DropBox, but used correctly, would have totally saved you in this situation…

If there is a competent Computer User at or near the Location of the Forgotten Laptop, they could e-mail, DropBox or Post your Code so that you can Receive it electronically where you are, and save someone the Trip of fetching the Laptop… Also, if someone near the Laptop, was planning to attend your event, they could Courier the Laptop to you…

When you write a Program in EasyC 4.x, the Compiler turns the ‘C’ Statements into ARM Machine Code, that is then Download to the Vex Controller… Turning the ARM Machine Code back into ‘C’, would just about be impossible…

If your wrote in RobotC, the RobotC Compiler turns the RobotC Code into Byte-Code, that is Processed by the RobotC Byte-Code Interpreter on the Vex Controller…

Theoretically, there should be less Permutations of RobotC to Byte-Code, than ‘C’ to ARM Machine Code, so De-Compiling the RobotC program, has a Higher Probability of Succeeding, although I don’t believe there has been developed any tools do so.

The ARM Machine Code on the Vex Controller, could be Dis-Assembled, giving you an Assembly/Machine Language program, but unless you are very familiar with ARM Machine Code, it won’t be of any Value in fixing your original problem that you needed to make changes for…

I was thinking, and i dont think plugging the adapter key in like I said earlier would work.

This won’t help for the immediate problem, but it might be a good backup for teams that like to be prepared:

You can use the “File Management” window of ROBOTC to copy files to the unused flash space of your Cortex, and then extract them later if needed.

For example, the Smooth Sonar Tracking example project consumes less that 1% of the Cortex’s flash space. Plenty of room left for the project file! I created a zip archive of the example project, then copied it to the Cortex. I was able to remove all copies of the project from my computer, and then recover it from the Cortex by downloading and expanding it.

You will want to keep the filename of the zip file short, since the File Manager truncates long names.

As long as somebody else has a copy of ROBOTC handy, you can extract the source file for your project.

Cheers,

  • Dean