Closed ds2k5 closed 10 months ago
I really wouldn't know, i never uses esptool to flash, i suppose i could try it myself.
@patience4711
thank you
which flash tool can I use on Linux (x86_64) ?
I am trying to flash it (with espressif dowload tools) but no luck, get invalid header. Also with other good working software. It seems that i have to flash a bootloader as well. Could you flash other software successfully? If you have a program with ota you could flash that and replace it with the .bin. I try some other things and come back when i find the solution.
Could you flash other software successfully?
Need a name of a tool.... sorry only know the esptool.py
I used FLASH_DOWNLOAD_TOOLS_V3.4.4 (from the manufacturer espressif) with the settings below. I flashed an esp32 that had other working software uploaded via Arduino_IDE. Maybe that is needed to get the bootloader and partitiontable right. So if you compile and flash a simple sketch on the esp32 with arduineo_ide you can upload the binary @0x10000. It should not make a difference if you use esptool.py or something else as long as the address is right.
is this this link ?
https://www.espressif.com/en/support/download/other-tools?keys=FLASH+DOWNLOAD+TOOLS
see only windows version.... need linux version
Yes, but like i said, if you use esptool it should work too. I don't know nor use other flashers under linux.
If you install ESPasyncWebserver library in arduino ide you should be able to compile yourself,
from https://github.com/espressif/esptool/releases is Version 4.6.2
but the same issue after flashing
sudo esptool-v4.6.2-linux-amd64/esptool --chip esp32 --port /dev/ttyUSB0 write_flash 0x0 ESP32-ECU_v0-8.bin
esptool.py v4.6.2
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:d1:f9:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x000f2fff...
Compressed 994544 bytes to 562324...
Wrote 994544 bytes (562324 compressed) at 0x00000000 in 49.7 seconds (effective 160.0 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
screen /dev/ttyUSB0 115200
invalid header: 0x73617265
invalid header: 0x73617265
invalid header: 0x73617265
invalid header: 0x73617265
invalid header: 0x73617265
invalid header: 0x73617265
invalid header: 0x73617265
I flashed with 0x10000 insted of 0x0
sudo esptool-v4.6.2-linux-amd64/esptool --chip esp32 --port /dev/ttyUSB0 write_flash 0x10000 ESP32-ECU_v0-8.bin
now I can see this:
entry 0x4008067c
[0;32mI (52) boot: ESP-IDF qa-test-v4.3.3-20220423 2nd stage bootloader[0m
[0;32mI (53) boot: compile time 11:11:52[0m
[0;32mI (53) boot: chip revision: 3[0m
[0;32mI (58) boot_comm: chip revision: 3, min. bootloader chip revision: 0[0m
[0;32mI (65) boot.esp32: SPI Speed : 40MHz[0m
[0;32mI (69) boot.esp32: SPI Mode : DIO[0m
[0;32mI (74) boot.esp32: SPI Flash Size : 4MB[0m
[0;32mI (78) boot: Enabling RNG early entropy source...[0m
[0;32mI (84) boot: Partition Table:[0m
[0;32mI (87) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (95) boot: 0 phy_init RF data 01 01 0000f000 00001000[0m
[0;32mI (102) boot: 1 otadata OTA data 01 00 00010000 00002000[0m
[0;32mI (110) boot: 2 nvs WiFi data 01 02 00012000 0000e000[0m
[0;32mI (117) boot: 3 at_customize unknown 40 00 00020000 000e0000[0m
[0;32mI (125) boot: 4 ota_0 OTA app 00 10 00100000 00180000[0m
[0;32mI (132) boot: 5 ota_1 OTA app 00 11 00280000 00180000[0m
[0;32mI (140) boot: End of partition table[0m
[0;31mE (144) boot: ota data partition invalid and no factory, will try all partitions[0m
[0;31mE (152) esp_image: image at 0x100000 has invalid magic byte (nothing flashed here?)[0m
[0;31mE (160) boot: OTA app partition slot 0 is not bootable[0m
[0;31mE (166) esp_image: image at 0x280000 has invalid magic byte (nothing flashed here?)[0m
[0;31mE (175) boot: OTA app partition slot 1 is not bootable[0m
[0;31mE (180) boot: No bootable app partitions in the partition table[0m
ets Jul 29 2019 12:21:46
rst:0x3 (SW_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:2
load:0x3fff0030,len:7672
load:0x40078000,len:16432
load:0x40080400,len:3704
entry 0x4008067c
[0;32mI (52) boot: ESP-IDF qa-test-v4.3.3-20220423 2nd stage bootloader[0m
[0;32mI (53) boot: compile time 11:11:52[0m
[0;32mI (53) boot: chip revision: 3[0m
[0;32mI (58) boot_comm: chip revision: 3, min. bootloader chip revision: 0[0m
[0;32mI (65) boot.esp32: SPI Speed : 40MHz[0m
[0;32mI (69) boot.esp32: SPI Mode : DIO[0m
[0;32mI (74) boot.esp32: SPI Flash Size : 4MB[0m
[0;32mI (78) boot: Enabling RNG early entropy source...[0m
[0;32mI (84) boot: Partition Table:[0m
[0;32mI (87) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (95) boot: 0 phy_init RF data 01 01 0000f000 00001000[0m
[0;32mI (102) boot: 1 otadata OTA data 01 00 00010000 00002000[0m
[0;32mI (110) boot: 2 nvs WiFi data 01 02 00012000 0000e000[0m
[0;32mI (117) boot: 3 at_customize unknown 40 00 00020000 000e0000[0m
[0;32mI (125) boot: 4 ota_0 OTA app 00 10 00100000 00180000[0m
[0;32mI (132) boot: 5 ota_1 OTA app 00 11 00280000 00180000[0m
[0;32mI (140) boot: End of partition table[0m
[0;31mE (144) boot: ota data partition invalid and no factory, will try all partitions[0m
[0;31mE (152) esp_image: image at 0x100000 has invalid magic byte (nothing flashed here?)[0m
[0;31mE (160) boot: OTA app partition slot 0 is not bootable[0m
[0;31mE (166) esp_image: image at 0x280000 has invalid magic byte (nothing flashed here?)[0m
[0;31mE (175) boot: OTA app partition slot 1 is not bootable[0m
[0;31mE (180) boot: No bootable app partitions in the partition table[0m
ets Jul 29 2019 12:21:46
where to get partion and bootloader image ?
@patience4711
open ESP32-ECU_v0-8.ino in Arduino 1.8.19
Error Text:
WARNING: Category '' in library ESP Insights is not valid. Setting to 'Uncategorized' WARNING: Category '' in library ESP RainMaker is not valid. Setting to 'Uncategorized' WARNING: Category '' in library WiFiProv is not valid. Setting to 'Uncategorized' ESP32-ECU_v0-8:1:10: fatal error: AsyncEventSource.h: No such file or directory
^~~~~~~~~~~~~~~~~~~~
compilation terminated. exit status 1 AsyncEventSource.h: No such file or directory
Which LIB need to be installed for: AsyncEventSource.h ?
I dont know where to get the other binaries, i never used that. Like i said, if yoy have a working esp32 and repeat your last attempt at 0x10000 it should work. Just put a simple program on the esp32 first, one of the examples for instance.
Like i said, if yoy have a working esp32 and repeat your last attempt at 0x10000 it should work.
Thanks!!! that worked I think....
but connect to WiFI "ESP-ECU-
now I see this with: screen /dev/ttyUSB0 115200
mounted file system
wificonfig.json not opened
basisconfig.json not opened
mqttconfig.json not opened
read value from EEPROM is �����������������������q�?
requestUrl = /
starting wifi
**********
WARNING connection failed
scan start
scan done
2 networks found
1: box11 (-50)*
2: GUEST (-51)*
result scan networksFound = 2
could not connect with the last known wificredentials, starting access point...
AP IP address:
192.168.4.1
started async HTTP server for the portal
entering the infinitive loop with heartbeat
self build from your source failed
did rm -rf .arduino15/ to get a clean arduino
use this device URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
got this message at open the file: ESP32-ECU_v0-8.ino
thank you - now is OTA.H missing
copy the OTA.H to the folder: ESP32-ECU_v0-8
Now hash.h is missig.... which LIB need to be installed ?
Indeed, you have a working system so no need to compile yourself. It sees only two networks is that correct? When you enter the wifi networkname and passwd (read the wiki) you can see in the serial monitor whats happening. If you see "connected" than you can just reset the device and it will connect.
Sorry but i am not supporting self-compiling, That would cost me too much time, its impossible for me to know why it doesn't work for you, i am afraid you have to find out yourself.
thanks for your help!
works for me
Chip info:
Flashed to ESP32
sudo esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash 0x0 ESP32-ECU_v0-8.bin
Serial Monitor Output
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) invalid header: 0x73617265 invalid header: 0x73617265 invalid header: 0x73617265 invalid header: 0x73617265 invalid header: 0x73617265 invalid header: 0x73617265 invalid header: 0x73617265 ets Jul 29 2019 12:21:46
What did I wrong ?
Building from Source did not work: AsyncEventSource.h missing
WARNING: Category '' in library ESP Insights is not valid. Setting to 'Uncategorized' WARNING: Category '' in library ESP RainMaker is not valid. Setting to 'Uncategorized' WARNING: Category '' in library WiFiProv is not valid. Setting to 'Uncategorized' Build options changed, rebuilding all ESP32-ECU_v0-8:1:10: fatal error: AsyncEventSource.h: No such file or directory
include
compilation terminated. exit status 1 AsyncEventSource.h: No such file or directory