Hello,
We are designing a SW that has a configuration with one Factory and two OTA sections.
The Factory Application we want to use as a typical Flashbootloader.
Therefore we are wondering if there is an Espressif mechanism to load&boot the main application from the Factory application.
So far we have only managed to do it via Reset and going through the SSBL.
The question is: Is there another way to directly "jump" from one app to another?
Start one ESP application from another ESP application
-
- Posts: 3
- Joined: Mon Apr 18, 2022 1:46 pm
Re: Start one ESP application from another ESP application
What is the use case or scenario for the "cross-coupling" of ESP32 application partitions? If they have a functional dependency, then shouldn't they be all part of the same application? The purpose of the separate OTA applications is to allow upgrading to newer versions, e.g., over the air, so they are generally independent applications (other than sharing the same NVS, etc).
Re: Start one ESP application from another ESP application
This is only possible via a reset and going via the 2nd stage bootloader.
On the original ESP32, technically booting one app from another could be done, but it's pretty tricky. We need to find an area of IRAM and DRAM unused by the both apps, copy the loading code there, then run the loading code. Failure to do so would cause the loaded app to overwrite the loader.
On ESP32-S2, C3 and more recent chips this is not possible, because we enable memory protection (W^X) when the app starts up. By design, once enabled, memory protection can only be disabled by a CPU reset. This acts as an additional defence against exploits.
On the original ESP32, technically booting one app from another could be done, but it's pretty tricky. We need to find an area of IRAM and DRAM unused by the both apps, copy the loading code there, then run the loading code. Failure to do so would cause the loaded app to overwrite the loader.
On ESP32-S2, C3 and more recent chips this is not possible, because we enable memory protection (W^X) when the app starts up. By design, once enabled, memory protection can only be disabled by a CPU reset. This acts as an additional defence against exploits.
-
- Posts: 3
- Joined: Mon Apr 18, 2022 1:46 pm
Re: Start one ESP application from another ESP application
Thank you for the reply. It is exactly what I needed.
Who is online
Users browsing this forum: Google [Bot] and 103 guests