Hi, I'm wondering if you could share the code already? I'm very interested in doing something like this.kolban wrote: ↑Tue May 08, 2018 2:13 pmHowdy @jumjum,
I'm working on a project for a 3rd party that needs a fashion of dynamic loading. Think loosely of compiling an application that has a world of dependencies on libraries but what we don't want to do is flash a monolithic 1 MByte file. Imagine a user coded:
(this is a trivial example).
Instead of compiling this source file and then linking it with all the ESP-IDF libraries and other libraries, imagine we just compiled this code such that it had unresolveds (in this case "digitalWrite").
The size of the compiled C source files is a few Kbytes. What we can now do is "push" this to the ESP32 which already has the ESP-IDF and other libraries already in flash and running. At runtime, the resolveds are mapped and the program runs.
Its working very well and the solution is quite elegant.
At present, I can't give you the code but the project I am working on will be an open source solution and at that time, I must imagine that anyone who was really interested in doing similar could then look through the source code (eventually) and figure out how it was done. Hint ... Xtensa assembler was involved but it turned out not to be horrible.
The bottom line ... yes ... it is do-able.
Would it also maybe be possible to give a quick explaination of what needs to be done to implement this?