Page 1 of 1

ESP8266 - two sdk applications

Posted: Tue Jul 24, 2018 4:37 pm
by sedlacek.david
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.

Re: ESP8266 - two sdk applications

Posted: Tue Aug 07, 2018 3:21 pm
by Pato
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.

Re: ESP8266 - two sdk applications

Posted: Wed Aug 15, 2018 4:00 pm
by sedlacek.david
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.

Re: ESP8266 - two sdk applications

Posted: Tue Aug 28, 2018 8:43 pm
by JohnyWalter
Also thanks,that help me as well.
I want to ask can we establish a nodeMCU module to module communication ? in which one module will act as transmitter and keep sending a string while the second module with the lcd attached receive that string and show it on the lcd?