Defective?, RedBoard ESP32 upload fails macOS Sequoia 15.7.1, MacStudio M2

My new Iot RedBoard ESP32 will not accept a “blink” program upload. I have a very recent MacStudio M2. The CH340 driver is working as I can connect and upload to a ESP32-C3 module (although it requires connecting through an old USB2 hub unless connected directly to the MacStudio). Programming with the Arduino IDE. Using Board: Sparkfun ESP IoT RedBoard default settings.

Beginning to think the board is defective. Never had this problem with SparkFun products and macOS over the last two decades.

Here is the error dump from the Arduino IDE:

/Users/michael/Library/Arduino15/packages/esp32/tools/esp-x32/2601/bin/xtensa-esp32-elf-size -A /Users/michael/Library/Caches/arduino/sketches/E8651697ED79A30074472CC8EA7EE664/Blink.ino.elf
Sketch uses 292517 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 22772 bytes (6%) of dynamic memory, leaving 304908 bytes for local variables. Maximum is 327680 bytes.
“/Users/michael/Library/Arduino15/packages/esp32/tools/esptool_py/5.2.0/esptool” --chip esp32 --port “/dev/cu.usbserial-510” --baud 921600 --before default-reset --after hard-reset write-flash -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 “/Users/michael/Library/Caches/arduino/sketches/E8651697ED79A30074472CC8EA7EE664/Blink.ino.bootloader.bin” 0x8000 “/Users/michael/Library/Caches/arduino/sketches/E8651697ED79A30074472CC8EA7EE664/Blink.ino.partitions.bin” 0xe000 “/Users/michael/Library/Arduino15/packages/esp32/hardware/esp32/3.3.8/tools/partitions/boot_app0.bin” 0x10000 “/Users/michael/Library/Caches/arduino/sketches/E8651697ED79A30074472CC8EA7EE664/Blink.ino.bin”
esptool v5.2.0
Serial port /dev/cu.usbserial-510:
Connecting…
Connected to ESP32 on /dev/cu.usbserial-510:
Chip type: ESP32-D0WD-V3 (revision v3.1)
Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
Crystal frequency: 40MHz
MAC: 88:13:bf:59:f1:e4

Uploading stub flasher…
Running stub flasher…
Traceback (most recent call last):
File “esptool/init.py”, line 1187, in _main
File “esptool/init.py”, line 1081, in main
File “esptool/cli_util.py”, line 345, in call
File “rich_click/rich_command.py”, line 402, in call
File “click/core.py”, line 1485, in call
File “rich_click/rich_command.py”, line 216, in main
File “click/core.py”, line 1873, in invoke
File “click/core.py”, line 1269, in invoke
File “click/core.py”, line 824, in invoke
File “click/decorators.py”, line 34, in new_func
File “esptool/init.py”, line 737, in write_flash_cli
File “esptool/cmds.py”, line 1425, in attach_flash
File “esptool/loader.py”, line 1070, in flash_id
File “esptool/loader.py”, line 1640, in run_spiflash_command
File “esptool/loader.py”, line 901, in read_reg
File “esptool/loader.py”, line 565, in check_command
File “esptool/loader.py”, line 495, in command
File “esptool/loader.py”, line 431, in read
StopIteration

A fatal error occurred: The chip stopped responding.
Stub flasher running.
Changing baud rate to 921600…
Changed.

Hard resetting via RTS pin…
Failed uploading: uploading error: exit status 2

Getting ready to return this RedBoard. Not sure why the CH340 is used. In my experience it has never been reliable.

You guys need to setup a tag for macOS and another for CH340.

Thanks

Mike

The ESP32-C3 uses a totally different driver (CP2104); I’d recommend trying to wipe whatever is currently installed and re-install the drivers

If that doesn’t work: Do you have an alternate PC you can test with? Also try swapping cables/ports

Have confirmed that my particular ESP32-C3 uses CH340. Easy to read right there on the board.

Have tried an older Mac Intel machine. Have the same problem.

The Sparkfun Iot RedBoard ESP32 does connect. But it does not accept the upload.

Your instructions for installing a CH340 driver on the Mac are very, very old. macOS 10.x has been gone for many years. The current word is that CH340 is natively supported by the new macOS’ and don’t require third party drivers for CH340. Apple no longer uses .kext files for usb drivers. I believe they are .dext files now.

(I am running macOS version 15).

Mike

I FOUND A FIX… All initial failures were with the default Arduino IDE “Tool” settings for the Sparkfun ESP32 IoT RedBoard.

I played with the flash frequency and upload speeds and settled on these selections as working solutions. Your final choice may depend upon your computer and router performance.

DEFAULT SETTINGS - ALWAYS FAILS TO UPLOAD

  • Flash Frequency: “80 MHz”
  • Upload Speed: “921600”

INITIAL FIX - UPLOADED!

  • Flash Frequency: “40 MHz”
  • Upload Speed: “115200”

SUBSEQUENT FIX - WORKS EVERYTIME

  • Flash Frequency: “80 MHz”
  • Upload Speed: “460800”

FINAL FIX “SAFE SOLVE”

  • Flash Frequency: “80 MHz”
  • Upload Speed: “115200”

I USED THE APPLE BUILT-IN STANDARD CH340 USB DRIVER THAT CAME PRE-INSTALLED. Do not install any third party .kext files! These are for the old macOS 10.x that have been obsolete for many years. Apple no longer uses .kext files, they have been replaced with the more secure .dext drivers.

Awesome work! Thanks for sharing the how-to :slight_smile: