Page 2 of 2

Re: Building and running a module beyond the original image file

Posted: Mon May 13, 2019 1:00 pm
by timl12332
Howdy @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:

main() {
digitalWrite(D0, HIGH);
}

(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.
Hi, I'm wondering if you could share the code already? I'm very interested in doing something like this.
Would it also maybe be possible to give a quick explaination of what needs to be done to implement this?

Thanks.

Re: Building and running a module beyond the original image file

Posted: Wed Oct 23, 2019 7:20 am
by brown_x
Any news on this?
It was more than a year ago, wondering if that opensource code is available now or not :)

Re: Building and running a module beyond the original image file

Posted: Wed Oct 23, 2019 2:41 pm
by RetroDISTORT
Also waiting to see if the code is available :D

Re: Building and running a module beyond the original image file

Posted: Wed Dec 29, 2021 10:07 am
by farraf
@kolban,

It's 2021 year.
Could I share your code at this time?

Thanks Raphael