[FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

[FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

Postby davdav » Thu Sep 13, 2018 9:28 am

Hi all,

During my search for reducing code size I got this two threads where @kolban provide a solution (also reported in its awesome book) to separe ESP-IDF "core function" to user application code.

https://esp32.com/viewtopic.php?f=13&t= ... elf#p25884

https://esp32.com/viewtopic.php?f=2&t=6 ... elf#p28778

Even if there are explanations on how to do that, this is beyond the average user (like me) which requires a lot of knowledge and details of the ESP32 module.

I would like to ask Espressif Team if they plan to introduce in their toolchain or tool, something which can compile and flash separately ESP-IDF and the user code APP. This will downsize the overall flash required for OTA. In my experience with other GSM/WiFi modules, usually there is a firmware ("core") downloaded one time in production and the application code is eventually upgraded.

I know that you will not have possibility to upgrade ESP-IDF core function in case of bugs, but I think that for most users once a release is deployed (e.g v3.0.3 or v3.1) their application code could be upgraded using the same release.

Thanks

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: [FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

Postby WiFive » Thu Sep 13, 2018 10:30 am

It would be nice feature in theory but
1. Core isn't stable enough yet
2. Good to have full firmware backup for fault tolerance
3. Easy to get 8/16mb modules now
4. You can do this to a certain extent with interpreted languages like python, lua, js, ruby

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: [FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

Postby davdav » Thu Sep 13, 2018 12:26 pm

Thanks @WiFive for reply
1. Core isn't stable enough yet
Are you talking about silicon or esp-idf itself? ESP-IDF is at v3.1 so I guess core firmware should be stable..
3. Easy to get 8/16mb modules now
When I asked to sales@espressif.com they reply me MOQ was 5500 pcs..
Also on official datasheet of ESP32-WROOM-32 (the module we use) it is reported only 4MB

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: [FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

Postby WiFive » Thu Sep 13, 2018 7:09 pm

I'm talking about esp-idf. Version is misleading, I consider 3.1 more like 0.3.1. 3.2 final may be stable enough to be considered more like a 1.0.

Distributors also have these modules now you don't have to buy direct.

bnp117
Posts: 13
Joined: Fri Jun 15, 2018 3:08 am

Re: [FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

Postby bnp117 » Thu Sep 13, 2018 11:40 pm

You can checkout my project below that separates common functionality into a base OS and user apps. Basically apps get compiled into an elf file (as do normal projects in esp-idf) and optionally compressed. They are then loaded using an elf loader and can reference exposed functions in the host OS. If the elf loader cannot resolve an unlinked symbol, the user app will fail to execute.

https://github.com/joltwallet/jolt_wallet
https://github.com/joltwallet/elfloader
https://github.com/joltwallet/nano_app

Code and documentation are still very rough.

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: [FEATURE-REQUEST] Separate ESP-IDF core funtion from user code

Postby davdav » Sat Sep 15, 2018 9:26 pm

Thanks @bnp117. I will take a look.

Who is online

Users browsing this forum: No registered users and 114 guests