Description
NB: I introduced same issue report at espressif/esptool, because I don't know actually where the problem could be: espressif/esptool#198
Hello ESP32 lovers,
I am facing a problem with a WEMS ESP32 dev board which I bough on Aliexpress very recently:
https://fr.aliexpress.com/item/ESP32-Development-Board-WiFi-Bluetooth-Ultra-Low-Power-Consumption-Dual-Cores-ESP-32-ESP-32S-Board/32801337284.html
I am able to flash it using Eclipse/esp-idf/xtensa-esp32-elf triplet. The /dev/tty.SLAB_USBtoUART device configured by "make menuconfig" makes the flashing process a success. Further on, my user application (one of the examples of esp-idf) starts and does what expected.
But, with Arduino IDE, this is not the same story. I have installed the toolchain as written at ESP32-Arduino github page, then selected "ESP32 dev module" as the board in Arduino IDE, and also selected /dev/tty.SLAB_USBtoUART as the flashing device.
Like I did for the Eclipse case, I reset dev board with RST and BOOT buttons. I verified to get the "DOWNLOAD" invite on the terminal, then closed the terminal pushed on flash button of Arduino IDE. All I get in Arduino logs is the following:
Sketch uses 118,890 bytes (11%) of program storage space. Maximum is 1,044,464 bytes. Global variables use 9,492 bytes (3%) of dynamic memory, leaving 285,420 bytes for local variables. Maximum is 294,912 bytes. /Users/lmc/Dropbox/arduino/hardware/espressif/esp32/tools/esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_freq 80m --flash_mode dio --flash_size 4MB 0x1000 /Users/lmc/Dropbox/arduino/hardware/espressif/esp32/tools/sdk/bin/bootloader.bin 0x8000 /var/folders/zx/4rs36y2j0315wny99n1j7fj80000gn/T/arduino_build_538507/Blink.ino.partitions.bin 0xe000 /Users/lmc/Dropbox/arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin 0x10000 /var/folders/zx/4rs36y2j0315wny99n1j7fj80000gn/T/arduino_build_538507/Blink.ino.bin esptool.py v2.0-beta Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____ A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
The programming does not detect the dev board in download mode, and the flashing does not start.
As a workaround, I hooked up an external FTDI adapter cable directly to the ESP32, and then Arduino IDE is able to start the flashing. But after, the Arduino sketch does not seems to run. My simple Blink sketch is not running (it toggles a GPIO and prints some text on Serial console).
Issue 1: I saw a post about the problem of the FreeRTOS scheduler not started on Core1, or not enabled Core1, which could resolve the Arduino sketch not running (but I don't know how to configure it within ESP32-Arduino libraries/board from inside Arduino IDE. Could it be a efuse which should be reset to enable Core1 to start?
Issue 2: Concerning my flashing issue, I don't understand why my dev module can be successfully programmed by using the Makefile from within Eclipse/esp-idf, while it ends-up with a timeout from within ArduinoIDE/ESP32-Arduino toolchain.
Anyone could help me about my two issues?
Thank you so much.