OTA with esp-open-rtos

150 views
Skip to first unread message

Petar Sankovic

unread,
Dec 10, 2016, 5:16:16 PM12/10/16
to esp-open-rtos mailing list
Hello,

I've been trying to build ota example and run it but for some reason it's not working.
I was following OTA explanation from github wiki to the letter.
First I compiled esptool2 then rboot (with changed rboot.h) as wiki is saying.
I would like my application to be able to perform upgrade using OTA.
This is what I have done:
1. buil my app with Makefile having OTA=1 in it
2. clean flash using esptool.py -p /dev/tty.SLAB_USBtoUART erase_flash
3. load rboot.bin esptool.py -p /dev/tty.SLAB_USBtoUART --baud 115200 write_flash -fs 32m 0x0000 /esprtos/rboot/firmware/rboot.bin
4. load my bin to 0x2000 esptool.py -p /dev/tty.SLAB_USBtoUART --baud 115200 write_flash -fs 32m -fm qio -ff 40m 0x2000 mqtt_client.bin

ESP start to download new firmware from tftp but then it get stuck and get this:
TFTP client task starting...
Image will be saved in OTA slot 1.
Downloading mqtt_client.bin to slot 1...

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 1344, room 16 
tail 0
chksum 0xb2
load 0x3ffe8000, len 632, room 8 
tail 0
chksum 0x52
csum 0x52
csum err
ets_main.c 

Same thing is happening if I flash ota_basic example? What am I doing wrong? I am using esp-12e.

/regards,
     Petar

Hugo

unread,
Mar 24, 2017, 7:39:55 AM3/24/17
to esp-open-rtos mailing list
I'm also confused by the OTA_BASIC example. The wiki says that the example runs an tftp server and you upload from your machine using a tftp client.
But the code seems to show otherwise, like an tftp server had to run on your PC and the example would download FROM it:

        tftpclient_download_and_verify_file1(slot, &conf);
        vTaskDelay(5000 / portTICK_PERIOD_MS);

        tftpclient_download_file2(slot);
        vTaskDelay(5000 / portTICK_PERIOD_MS);

Can anyone clear this up?

TIA

Hugo

unread,
Mar 28, 2017, 9:17:38 AM3/28/17
to esp-open-rtos mailing list
Hi guys,

1) I could finally undertsand that yes, the examples was running both a client and a server. I commented the tftp server part...
2) I thought my issues with reset after update had something to do with pull-up resistors on some pins, etc - actually just pressing the Reset button once made OTA updates work now.

cheers
-hugo
Reply all
Reply to author
Forward
0 new messages