Hi, I can easily flash my sketch on PlatformIO on an ESP32-S3 using this build flags:
this uses the emulated USB CDC/JTAG
'-D ARDUINO_USB_MODE=1'
'-D ARDUINO_USB_CDC_ON_BOOT=1'
I can’t flash the ESP when it’s in TinyUSB mode (Native USB)
'-D ARDUINO_USB_MODE=0'
'-D ARDUINO_USB_CDC_ON_BOOT=1'
Is there a way to flash the ESP when it’s in the TinyUSB Mode?
Thanks
Does it work in the Arduino IDE? If yes with what exact Tools settings?
thanks for the answer @maxgerhardt
yes it works with this settings:
this is my platformio.ini
[env:glowwormluciferinfull_esp32s3]
platform = ${common_env_data.platform_esp32}
board = lolin_s3_mini
board_build.mcu = esp32s3
framework = ${common_env_data.framework}
monitor_speed = ${common_env_data.monitor_speed}
upload_speed = ${common_env_data.upload_speed}
board_build.filesystem = littlefs
monitor_filters = ${common_env_data.monitor_filters_esp32}
monitor_port = //./COM24
upload_port = //./COM24
lib_deps = ${common_env_data.lib_deps}
lib_ldf_mode = deep
extra_scripts = post:platformio_version_increment/esp32_create_factory_bin_post.py
${common_env_data.extra_scripts}
lib_extra_dirs = ${common_env_data.lib_extra_dirs}
build_unflags = -DARDUINO_USB_MODE=1
build_flags =
'-D ARDUINO_USB_MODE=0'
'-D ARDUINO_USB_CDC_ON_BOOT=1'
am I miss the upload mode? if yes, how can I specify it in platformio.ini?
Hm… Maybe it needs a 1200 bps touch (serial port open) to get into actual bootloader mode? Can you add
board_upload.use_1200bps_touch = yes
board_upload.wait_for_upload_port = yes
board_upload.require_upload_port = yes
to the environment while removing upload_port
?
1 Like
Max you are awesome!!! this way it works.
Espressif created a big framentation in the ESP32 family… 
@maxgerhardt
latest updates seems to have breaked the possibility to flash the ESP32-S3 when it’s in TinyUSB mode…
I don’t know if it was platformio that broke it or if it is the CLion update.
any idea?
thanks!!!
Manually specified //./COM24
looks very weird. upload_port
should either be with backlsashes, or just COM24
or nothing at all.