Building and running a module beyond the original image file

timl12332
Posts: 27
Joined: Wed May 10, 2017 3:05 pm

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

Postby timl12332 » Mon May 13, 2019 1:00 pm

kolban wrote:
Tue May 08, 2018 2:13 pm
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.

brown_x
Posts: 11
Joined: Wed Mar 08, 2017 11:07 am

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

Postby brown_x » Wed Oct 23, 2019 7:20 am

Any news on this?
It was more than a year ago, wondering if that opensource code is available now or not :)

RetroDISTORT
Posts: 4
Joined: Fri Oct 13, 2017 5:44 am

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

Postby RetroDISTORT » Wed Oct 23, 2019 2:41 pm

Also waiting to see if the code is available :D

Who is online

Users browsing this forum: No registered users and 41 guests