My team has been experimenting around between ConVEX and robotC, and we decided that we like robotC better for it’s fast download times and easy debugging. However, I personally prefer ConVEX for all of those real C features that make it easier for me to program, and which would eventually help my teammate too. Anyway, I want to make downloading ConVEX faster, so I had an idea:
What if I make it so that I only download the user ConVEX code to the robot through VEXnet, and then redirect competition function calls to the user code stored in flash?
I’ve got a few questions on this:
- Does the Cortex map flash memory to global (or whichever correct term) memory space?
- Would I have to specify exact address(es) in flash to write the user code to (like from the cortexFlash utility)?
- Would running the code be as simple as calling the function from a pointer?
- Could I just store some pointer offsets at the beginning of my new code, then transfer execution to the address specified by the respective offset?
- Would I have to write a protocol for ConVEX to receive and write the user code, or could I just modify the cortexFlash utility?
- For compiling this user code, could I simply remove all unnecessary source files in the Makefile?
- How would I get the offsets of the different functions in this compiled user code, so that I can store them somewhere?
- Otherwise, could I force each function to begin at a specific offset, or should I compile each function separately and flash them in different offsets?
- Did jpearman not add this functionality because it was impossible without a lot of work?
Also, here is some information that might be important:
- We are running Windows 10, and compiling via gcc-arm-none-eabi on Bash on Ubuntu on Windows.
- We are not using Eclipse, we are using Atom and some batch files.