How do i run external code?

Evgeni

Member
I am currently working on a project that has to run compiled code that is previously loaded on an SD card. So far I have managed to do the loading from an SD card part and I supposedly have done the code execution (but I will upload the execution of foreign functions library). My question is how do I compile code (on Linux) so that I can put it on the SD card, and it will run it. Furthermore, will this code be able to access global functions and how do I pass structures (I have structures with data that would be useful for the processes) or pointers for those structures and is there a way to use the Arduino functions (like pinMode() and others)(I do have an idea of how that can be done, with a structure that has pointers to those functions).

Here is the library that executes the code:
Basically the function loadProgram() loads the program into the memory of the executor and the execute() function runs it.
 

Attachments

  • Executor.cpp
    1.9 KB · Views: 21
Back
Top