Built-in JTAG is unable to automatically flash on ESP32-C3-DevKitC-02

blanchehermine
Posts: 16
Joined: Wed Mar 22, 2023 8:11 am

Re: Built-in JTAG is unable to automatically flash on ESP32-C3-DevKitC-02

Postby blanchehermine » Mon Mar 27, 2023 4:40 am

Could you see what happens when you manually run esptool forcing it to use the USB-JTAG-serial dance?
Yes, it flashes that way from the user app. And reset is also performed at the end of the flashing.

I had to modify that command to the following line in order for it to work:

Code: Select all

esptool.py --chip esp32c3 -p COM37 -b 460800 --before=usb_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 build/bootloader/bootloader.bin 0x10000 build/test.bin 0x8000 build/partition_table/partition-table.bin
Log:
  1. e:\ESP\projects\test>esptool.py --chip esp32c3 -p COM37 -b 460800 --before=usb_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 build/bootloader/bootloader.bin 0x10000 build/test.bin 0x8000 build/partition_table/partition-table.bin
  2. esptool.py v4.5.1
  3. Serial port COM37
  4. Connecting...
  5. Chip is ESP32-C3 (revision v0.3)
  6. Features: WiFi, BLE
  7. Crystal is 40MHz
  8. MAC: 7c:df:a1:b3:96:74
  9. Uploading stub...
  10. Running stub...
  11. Stub running...
  12. Changing baud rate to 460800
  13. Changed.
  14. Configuring flash size...
  15. Flash will be erased from 0x00000000 to 0x00004fff...
  16. Flash will be erased from 0x00010000 to 0x0003cfff...
  17. Flash will be erased from 0x00008000 to 0x00008fff...
  18. Compressed 20192 bytes to 12374...
  19. Wrote 20192 bytes (12374 compressed) at 0x00000000 in 0.3 seconds (effective 545.7 kbit/s)...
  20. Hash of data verified.
  21. Compressed 181040 bytes to 96201...
  22. Wrote 181040 bytes (96201 compressed) at 0x00010000 in 1.7 seconds (effective 845.3 kbit/s)...
  23. Hash of data verified.
  24. Compressed 3072 bytes to 103...
  25. Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 372.4 kbit/s)...
  26. Hash of data verified.
  27.  
  28. Leaving...
  29. Hard resetting via RTS pin...
Some other notes:
- If you put the board manually into boot mode, then USB-JTAG COM-port disappears and you have to plug / unplug the cable several times before if finally re-appears.
- If flashed from the boot mode using that command, it doesn't reset into user app and stays in the boot mode after flashing (whereas when flashed from the user app, it resets properly).

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

Re: Built-in JTAG is unable to automatically flash on ESP32-C3-DevKitC-02

Postby ESP_Sprite » Mon Mar 27, 2023 7:51 am

Hm, then that detection is what goes wrong. Aside from manually flashing, I unfortunately can't tell you how to fix it... Something is messing with esp-tool figuring out that it's actually talking to an USB device, but my knowledge of Windows doesn't go far enough to have any idea what that could be.

blanchehermine
Posts: 16
Joined: Wed Mar 22, 2023 8:11 am

Re: Built-in JTAG is unable to automatically flash on ESP32-C3-DevKitC-02

Postby blanchehermine » Wed Mar 29, 2023 5:29 am

Ok, got it.

If it's a bug I hope it gets fixed in the future releases. Meanwhile I'll be using VSCode with OpenOCD.

Who is online

Users browsing this forum: No registered users and 59 guests