ESP8266 - two sdk applications

sedlacek.david
Posts: 10
Joined: Thu Jul 12, 2018 2:06 pm

ESP8266 - two sdk applications

Postby sedlacek.david » Tue Jul 24, 2018 4:37 pm

Hi. A simple question. Can I have two NON OS SDK applications on a single esp8266? My custom bootloader (including os libs) and my custom application (also including os libs). Don't want share the libs because of the potential complexity of whole solution.

I can imagine I'll have two iroms in flash. Also I believe the iram section of the first application sits at the beginning of the FLASH and gets copied after the startup.

What I'm not sure about is how can I manage to get the second IRAM section stored in the middle of the flash (application IRAM) to the actual IRAM?

Hope it is clear. Thanks in advance.

Pato
Posts: 28
Joined: Sat Mar 24, 2018 12:52 am

Re: ESP8266 - two sdk applications

Postby Pato » Tue Aug 07, 2018 3:21 pm

Hey !

Yes you can, this is the "OTA" feature of the Esp.
In the SDK you have different bootloaders available. The bootloaders for OTA basivally consider the flash is split in two slots (called user1 and user2 by Espressif), and they will run one of the two applications according to a flag set in Eeprom. There even exist others bootloaders on the net like "rboot", that, if I remember, allows even more applications slots.

Each application is standalone and embeds all the library code it needs (no such thing like shared library).

For your question about IRAM, I'm not sure I understand, I would say the compiler/booloader already take care about loading the righ piece of code in IRAM on startup.

sedlacek.david
Posts: 10
Joined: Thu Jul 12, 2018 2:06 pm

Re: ESP8266 - two sdk applications

Postby sedlacek.david » Wed Aug 15, 2018 4:00 pm

Hi, thank you for your reply!

I've been scrutinizing how does it work and it is clear now. I have to load the cca 3 volatile sections (IRAM/DRAM..) and reset the stack manually from the FLASH before jumping into my application.

Who is online

Users browsing this forum: No registered users and 1 guest