The use of the ESP8266 in the world of IoT

User avatar
By gschmott
#18389 Any chance you could share the minor change you made to the Sming linker script before you depart on a well earned vacation? I'd like to reproduce your success with Sming since I have found Sming's existing OTA solution unreliable and a bit opaque. With your great documentation I think I might have a fighting chance in switching over to rboot.

Thanks again for your great work . . .
User avatar
By rab
#18403 Sure.

Change the linker script (found in sming/sming/compiler/ld) from:
Code: Select all  irom0_0_seg :                         org = 0x40209000, len = 0x42000

To this for the first rom:
Code: Select all  irom0_0_seg :                         org = 0x40202010, len = 0x6B000

And this for the second rom:
Code: Select all  irom0_0_seg :                         org = 0x40282010, len = 0x6B000


If you are only compiling one app to put on the flash in two different places remember to link it twice, once against each of the above linker scripts, to produce out files.

Then to make the actual roms from the linked elf files you can convince gen_appbat to produce roms for boot v1.2+, but like most people sming seems to have copied the awful makefiles from the sdk, so that's a pain. Much better way is to use esptool2 and then you can delete half the contents of the makefile.

I've made much a simpler Makefile for the blink example, it's attached as well as suitable linker files. Just unzip these into the basic_blink directory, edit the paths at the top of the Makefile and call make. I don't use any eclipse, or any extra unnecessary development stuff on my system, I just have make, the xtensa gcc compiler and the original sdk. If you have a more complicated setup it may not be as simple. If you are more comfortable using the existing make files, just discard the output firmware files and call esptool2 against the elf files it produces to make suitable roms, like this:
Code: Select allesptool2.exe -quiet -bin -boot2 build/blink_P1.out firmware/rom0.bin .text .data .rodata
esptool2.exe -quiet -bin -boot2 build/blink_P2.out firmware/rom1.bin .text .data .rodata
You do not have the required permissions to view the files attached to this post.
User avatar
By gschmott
#18416 This is great . . . thanks a lot for the instructions. I think it's enough detail (in addition to your blog) to get me started.

BTW - I've contacted the Sming developer and he seems open to supporting your OTA mechanism as a possible replacement (or secondary option) to the one already provided with his project. Perhaps you both could work together to demonstrate rboot's powerful capabilities when used with a larger development framework. I think it would really benefit everyone and give your project increased exposure.
User avatar
By loicus
#18704 I haven't tried it myself yet, but this work seems super useful.
(I did myself something similar for the NRF24L01+PIC18 a year ago and it turned out to be super useful in practice)

However, I would be even more interested if rBoot could be integrated into the Arduino ESP8266 IDE,
that would makes it even more powerful and handy. Is there any chance to have this happening in a near future ?

Thanks in advance,
Loicus