PlatformIO refusing to upload code to ESP32S3

Want to play with RTOS
Downloaded visual studio code
Followed the preinstall steps without errors
Create a blink project to test things
Compiles no errors
But refuses to upload, error code 1

Works well with Ardinuo environment
Waisted an entire day in this now
Deleted project, recreated
Uninstalled VSC, reinstalled

Using Platform IO extension since Arduino one has been discontinued it seems, anybody using this environment on a Mac?

Tracked the issue down to PlatformIO, doesn’t work if I manually try and upload it either

localuser@marc-macbook-pro freeRTOS_1 % cat platformio.ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:seeed_xiao]
platform = atmelsam
board = seeed_xiao
framework = arduino
upload_port = /dev/cu.usbmodem2101
localuser@marc-macbook-pro freeRTOS_1 % pio run --target upload -d /Users/localuser/Documents/PlatformIO/Projects/freeRTOS_1 --verbose
Processing seeed_xiao (platform: atmelsam; board: seeed_xiao; framework: arduino; upload_port: /dev/cu.usbmodem2101)

CONFIGURATION: Redirecting...
PLATFORM: Atmel SAM (8.3.0) > Seeeduino XIAO
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES:

  • framework-arduino-samd-seeed @ 1.8.5
  • framework-cmsis @ 2.50400.181126 (5.4.0)
  • framework-cmsis-atmel @ 1.2.2
  • tool-bossac @ 1.10700.190624 (1.7.0)
  • toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 15 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode
    MethodWrapper([“checkprogsize”], [".pio/build/seeed_xiao/firmware.elf"])
    Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
    RAM: [= ] 7.3% (used 2408 bytes from 32768 bytes)
    Flash: [ ] 4.1% (used 10760 bytes from 262144 bytes)
    .pio/build/seeed_xiao/firmware.elf :
    section size addr
    .text 10508 8192
    .data 252 536870912
    .bss 2156 536871164
    .ARM.attributes 40 0
    .comment 126 0
    .debug_frame 784 0
    .stabstr 279 0
    Total 14145
    ([“upload”], [".pio/build/seeed_xiao/firmware.bin"])
    AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
    CURRENT: upload_protocol = sam-ba
    BeforeUpload([“upload”], [".pio/build/seeed_xiao/firmware.bin"])
    Using manually specified: /dev/cu.usbmodem2101
    Forcing reset using 1200bps open/close on port /dev/cu.usbmodem2101
    Waiting for the new upload port…
    bossac --info --debug --port “cu.usbmodem2101” --write --verify --reset --erase -U true .pio/build/seeed_xiao/firmware.bin
    No device found on cu.usbmodem2101
    Set binary mode
    Send auto-baud
    Set binary mode
    *** [upload] Error 1

Hi there
Something doesn’t look quite right, Can you post your plio.ini file
MIght think its a samd?
HTH
GL :slight_smile: PJ :v:

1 Like

Hi PJ,
Max from Germany spotted the problem! I was using the wrong XIAO. The PlatformIO.ini file simply needed to say this I had the wrong platform, wrong speed and the wrong board.

[env:seeed_xiao_esp32s3].
platform = espressif32
board = seeed_xiao_esp32s3
framework = arduino
monitor_speed = 9600

1 Like