ESP-IDF, esptool and flash download tool

ndjurov
Posts: 65
Joined: Wed Mar 25, 2020 11:34 pm

ESP-IDF, esptool and flash download tool

Postby ndjurov » Tue Feb 08, 2022 6:01 pm

I have a problem that appears to be caused by same compatibility issues.

I have 2 computers with different ESP-IDF versions on each computer.
The ‘old’ computer uses ESP-IDV Ver 4.1-dirty and if I build my code with it and send it to my coworkers (by sending bootloader.bin, partition.bin and the_APP_itself.bin) they can load it and run it with no problems. In order to flash the application to their ESP boards, they are using either esptool v3.0-dev or flash_download_tool_v3.8.5.

The ‘new’ computer uses ESP-IDV v4.3.1 and if I build the same application on that computer and they use the same tools as usual, it looks like they can flash the application, but when the application runs it stays in this loop:
'C:\ESP-IDF\TOOLS\.espressif\python_env\idf4.1_py3.9_env\Scripts\python.exe' 'c:\ESP-IDF\IDF\tools\idf.py' '-p' 'COM7'"...
--- idf_monitor on COM7 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
0x40080400: _init at ??:?

entry 0x400806b4
I (514) cpu_start: Pro cpu up.
I (514) cpu_start: Starting app cpu, entry point is 0x40081448
0x40081448: call_start_cpu0 at C:/ESP-IDF/IDF/components/esp32/cpu_start.c:189
(discriminator 1)



I (0) cpu_start: App cpu up.
ets Jun 8 2016 00:22:57

rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
0x40080400: _init at ??:?

entry 0x400806b4
I (544) cpu_start: Pro cpu up.
I (545) cpu_start: Starting app cpu, entry point is 0x40081448
0x40081448: call_start_cpu0 at C:/ESP-IDF/IDF/components/esp32/cpu_start.c:189
(discriminator 1)

I (0) cpu_start: App cpu up.
ets Jun 8 2016 00:22:57
We get the same result regardless whether we run the application on a 4MB WROOM based development board, WROVER-E 8MB development board or WROVER-E based 16MB custom board.

If I build and flash the same application with the ‘new’ computer (ESP-IDF v4.3.1) to any of those 3 boards, the application runs as expected.

To summarize, it appears that if the application is built with ESP-IDF v4.3.1 and flashed with ‘older’ tool (either esptool v3.0-dev or flash_download_tool_v3.8.5), the application can be flashed but it doesn’t run properly.

Can somebody help me with a suggestion – why this happens and how to fix it.
Thanks a lot.

ndjurov
Posts: 65
Joined: Wed Mar 25, 2020 11:34 pm

Re: ESP-IDF, esptool and flash download tool

Postby ndjurov » Tue Feb 08, 2022 10:52 pm

I suppose that ota_data_initial.bin should be sent as well. Can you please tell me to which location. Is it supposed to be the address of ota_data partition?

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP-IDF, esptool and flash download tool

Postby ESP_Sprite » Wed Feb 09, 2022 1:30 am

You could try running 'idf.py build' - if that succeeds, the last line indicates (part of) the parameters fed to esptool.py if you were to flash instead. Those also show the files to be flashed and the addresses to flash.

ndjurov
Posts: 65
Joined: Wed Mar 25, 2020 11:34 pm

Re: ESP-IDF, esptool and flash download tool

Postby ndjurov » Wed Feb 09, 2022 4:35 pm

Thank you very much, I'll do that, Would that explain the log that I put in the first post?

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP-IDF, esptool and flash download tool

Postby ESP_Sprite » Thu Feb 10, 2022 1:40 am

Not sure about that, sorry.

ndjurov
Posts: 65
Joined: Wed Mar 25, 2020 11:34 pm

Re: ESP-IDF, esptool and flash download tool

Postby ndjurov » Thu Feb 10, 2022 11:34 pm

Thank you for your response.

It appears that the problem was in the flash frequency.
After changing the flash frequency from 80MHz to 40MHz, everything runs as expected.

Who is online

Users browsing this forum: No registered users and 314 guests