Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is DFU mode flashing supported in espflash? #656

Open
wuwbobo2021 opened this issue Jul 24, 2024 · 0 comments
Open

Is DFU mode flashing supported in espflash? #656

wuwbobo2021 opened this issue Jul 24, 2024 · 0 comments

Comments

@wuwbobo2021
Copy link

According to the ESP32-S2 reference manual, the download boot mode can be entered by holding GPIO0 down when the chip is reset (CHIP_PU is hold down). when CHIP_PU becomes high, the ESP32-S2FH4 becomes a USB DFU device (303a:0002, /dev/ttyACM0 on Linux).

espflash failed to flash the chip through USB under this mode:

espflash flash -c esp32s2 -p /dev/ttyACM0 <elf file>

but this works:

espflash save-image --chip esp32s2 <elf file> <bin file>
esptool --chip esp32s2 --port /dev/ttyACM0 write_flash -z 0x10000 <bin file>

More info:

$ espflash -V
espflash 3.1.0
$ espflash board-info -c esp32s2 -p /dev/ttyACM0
[2024-07-24T21:13:34Z INFO ] Serial port: '/dev/ttyACM0'
[2024-07-24T21:13:34Z INFO ] Connecting...
Error: espflash::connection_failed

  × Error while connecting to device
  ╰─▶ Failed to connect to the device
  help: Ensure that the device is connected and the reset and boot pins are not being held down

then:

$ esptool --chip esp32s2 --port /dev/ttyACM0 chip_id
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S2FH4 (revision v0.0)
Features: WiFi, Embedded Flash 4MB, No Embedded PSRAM, ADC and temperature sensor calibration in BLK2 of efuse V1
Crystal is 40MHz
MAC: (deleted text)
Uploading stub...
Running stub...
Stub running...
Warning: ESP32-S2 has no Chip ID. Reading MAC instead.
MAC: (deleted text)
WARNING: ESP32-S2FH4 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.

PS: I failed to set the flash address offset when trying to flash the app image using dfu-util.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant