Take the program from the cortex?

Hello, my team has a problem. We have lost our flash drive with our program on it. We have the program downloaded to the cortex though. Is there a way to take the program from the cortex to transfer it to the computer or robotc? Without harming the cortex, computer, and program? We are trying to avoid redoing the program. But if this this isn’t possible we will redo it. But is there a way to transfer the program from the cortex back to the computer? And thank you for reading this.

That would be the compiled machine code, not the program in the .c file readable by you.

@jpearman could probably explain it better.

You should strive to have some sort of backup of your code. Dropbox/google drive/Box/OneDrive are simple methods you can put the .c files there and it will be automatically backed up to the service every time you change them. Adding collaborators like your teammates makes it so they get a copy too on their laptops.

Emailing your code to your teammates works too but it manual.

By using those local directories on your laptop hooked into the services will work with robot C fairly well. If it is the school PC, do you have a user or team or class network drive you can use? You don’t get as good deletion protection/resurrection like you do on Dropbox.

@jpearman, when can we have interaction with SVN or Git repo directly in Robot C? You can hide it under advanced menus if you want.

Yes, everyone probably learns this lesson once! Last year, our laptop crashed the night before a tournament. We did not have an extra copy of the code. After that, I insisnted that the kids double and triple back up all programs. On tournament days, I keep a memory stick on my possession that contains all code.
This early in the season, it’s not such a hard lesson. If you had a whole season of programming and lost it, that would bite! Count your lucky stars!!

Can we sticky a thread like this? The question comes up every couple months.

Use git, have a repo on GitHub, and locally on a laptop, and on a few flash drives.

Have a look in the Recycle bin of the computer you were using, ROBOTC tends to create many temporary files and you may find a recent copy of your code there (perhaps with a different name).

Its such a beautiful system.

I have learnt the hard way many times and, now that I’m fully using PROS now, Eclipse had a nice Git integration but Atom does it just as well with


git-plus

That way you can get great collaboration with Git and it means the source is available anywhere

Maybe ROBOTC should make an update to make such things be possible :wink: .
That will be one of the most useful ideas ever for coding so you can be able to open a code up from anywhere, anytime.

It doesn’t work like that. You would only be able to fit the code on the cortex if your code was like less than 100KB. And it would take away space from the code on the cortex.

Think of a translator. You program in one language and it is translated to robot language. To get your program off the cortex you would have to fit you the English and the robot version on the cortex at the same time.
The English version is most likely 10x the size of the robot version.

I suggest using a professional cloud system like Github but something as simple as Google Drive or Dropbox can all you to code anywhere.

Think of it like the Finnish Language. Machine code is like Finnish because once you decompile it back to C code it has no sentence structure and doesn’t make much sense

Hey! Stop hating on my mom’s native language! :stuck_out_tongue:

Haha well at least it makes sense to you then :stuck_out_tongue:

Decompilers do exist to convert the machine code back to regular code (Ex. “Boomerang” works for the C language). In theory this could also be done with RobotC, but someone would have to develop a separate program for it, and the code it generates may look entirely different then the code you originally wrote.

After downloading my code to the cortex, downloading it to my computer, then changing the file type back to C format, the code seems to be in proper ROBOTC format :wink:


.    ÿÿÿÿÐ “—333333333333333333f“++++99#.| $          - Catapult:  %1.2f%c    À  Exp. Low:  VPrim. Low:  - Gyroscope:    Ða    >þÿÿ    F  Ê    ºúÿÿ6÷ÿÿðñÿÿ   	   	 
 g?   g?  gB      g>Startup D Ða g?   g?  gB      L)(  7#   (  ‰ gB      g>	Disabled É     L)(  7#   (   yWD   L)(  7#   (   y>D   L)(  7#   (   y%D   L)(  7#   (   yD  t   y–xkÿÉ    g?   g?  gB      L)(  8#   (  m g>Autonomous cL)(  8#   (  ; L)(  7#   (  + L)(  5#   (   L)'  2"   '     D  y¸  #      y\g>
User Control cL)(  8#   (  + L)(  7#   (  e L)'  2"   '     D  yÈ  #      xiþa {·(  R  ·( R  ·(( R  ·(< R  ËP  $ U +P 
 7  pP yìW)  	},T R gB      gCAT },T R N+X aqXwsX ·(    AT +X gC(  N+T $ U  +T Q g?  },T R$ gB     gCAT },T R N+X ­-X +X “-X   ŒC·((   AT -X Q/ gC(( x™ M))T !  @)T P g?  },T R0 gB     gCAT },T R M))X ¬-\ )X “-\   zD·(<   AT -\ Q/ gC(< y:},T R< gB     gCAT },T R N+X sX
 ·(   AT +X gC( N+T $U +T | ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T W
)T ME)T W
)T xN+T $U +T | ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V x•N+T  $UL +T ÅN+X $ UP +X 	 Á'T yÁ'T  N+X $UT +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X | ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T W
)T ME)T W
)T xùN+X $UP +X 	 Á'T yÁ'T  N+X $ U\ +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X  ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V xN+X $U\ +X 	 Á'T yÁ'T  N+X $ U` +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X | ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V xSN+X $U` +X 	 Á'T yÁ'T  N+X $ Ud +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X h ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T W
)T ME)T W
)T xžN+X $ UT +X 	 Á'T yÁ'T  N+X $Uh +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X h ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T W
)T ME)T W
)T xéN+X $ Uh +X 	 Á'T yÁ'T  N+X $Ul +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X | ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V x N+X $ Ul +X 	 Á'T yÁ'T  N+X $Up +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X  ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V yCN+T $Ud +T  N+T qTW+T y!N+T $ Up +T  N+T pTW+T xÂN+X $ UP +X 	 Á'T yÁ'T  N+X $UT +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X | ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V xùN+X $UP +X 	 Á'T yÁ'T  N+X $ U\ +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X h ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T W
)T ME)T W
)T xDN+X $U\ +X 	 Á'T yÁ'T  N+X $ U` +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X | ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T W
)T ME)T W
)T x{N+X $U` +X 	 Á'T yÁ'T  N+X $ Ud +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X  ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V xžN+X $ UT +X 	 Á'T yÁ'T  N+X $Uh +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X  ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T ©)V    )T W
)V ME)T ©)V    )T W
)V xÁN+X $ Uh +X 	 Á'T yÁ'T  N+X $Ul +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X | ME)T ©)V    )T ME)T  5+X )T sX 5+\ )V …\+X W
+\ ME)T ©)V    )T ME)T  5+X )T sX „X)V W
+X ME)T W
)T ME)T W
)T xø N+X $ Ul +X 	 Á'T yÁ'T  N+X $Up +X 	 Á'V yÁ'V  ÆX'T +X 'V $UX ,X g ME)T ME)V  5+X )V sX 5+\ )T …\+X W
+\ ME)T ME)V  5+X )V sX „X)T W
+X ME)T W
)T ME)T W
)T yCN+T $Ud +T  N+T qTW+T y!N+T $ Up +T  N+T pTW+T ME)T !  )T a 7  ME)T !  )T ? M
)T N+X sX 5+\ )T …\+X W
+\ M
)T N+X sX „X)T W
+X ME)T !  )T  W
 ÿW
 ÿW
 ÿaW
 ÿ	x­ME)T !  )T  W
  W
  W
  aW
  	x‚ME)T !  )T ) W
  W
  W
  aW
  	W
  W
   xKME)T !  )T  N+T aqTwsT qT ¾+X    +T W
+X N+T aqTwsT qT ¾+X    +T W
+X N+T aqTwsT qT ¾+X    +T W
+X aN+T aqTwsT qT ¾+X    +T W
+X 	x°ME)T !  )T  N+T aqTwsT qTo ¾+X    +T W
+X N+T aqTwsT qTo ¾+X    +T W
+X N+T aqTwsT qTo ¾+X    +T W
+X aN+T aqTwsT qTo ¾+X    +T W
+X 	xN+T aqTwsT $Ut +T  W
 ÿW
 ÿW
 ÿaW
 ÿ	xâ N+T aqTw­-T +T “-T ff@)-X     9-X -T ®)X -X W
)X N+T aqTw­-T +T “-T ff@)-X     9-X -T ®)X -X W
)X N+T aqTw­-T +T “-T ff@)-X     9-X -T ®)X -X W
)X aN+T aqTw­-T +T “-T ff@)-X     9-X -T ®)X -X W
)X 	W
 ÿW
 ÿ N+T aqTwsT $Ux +T  N+T aQ+T   ME)T !  )T  ME)T !  )T  cxŸî7
   7
  7
  7
  7
  7
  7
  7
a  7
  7
	  {dddddddadd	d
ddd
dddddd{Á {gB     L)(  7#   (   g>	Disable  y)L)(  8#   (   g>Auton   yg>Driver  Æ   s Xg=  +  g< : Æ   s 
 +   < g= þÿ+  g< . Æ   +   
 g=  +  { D d t   yóa@ 7)!  g2     g2    g2    ghW 1  W 0 W . W 1 aW P W P 
W P W  W 5 gX a   gX   gX   gX   gX   gX   gX   gXa   gX   gX	a   gY ÿgYÿgYÿgYÿgYÿgYÿgYÿgYaÿgYÿgY	ÿgu ÿÿÿÿgv          gw ÿÿÿÿg}  {É    Á {

I would just see if you can have the ROBOTC translator not just translate from C to the robot language, but the software should be able to understand the robot language and translate back into ROBOTC code right when you download the program from the CORTEX.