I am trying to switch to Visual Code Studio from Arduino because I want to use freeRTOS on my Seeed ESP32C3 Studio.
I carefully followed all the instructions I could find, did all the prerequisites and the simply program I wrote that does nothing but print “hello world” compiles, but platformIO refuses to upload it.
I tried through VCS and directly with this line.
./.platformio/penv/bin/platformio run -d ./Documents/PlatformIO/Projects/RTOSagain -t upload
But it keeps telling me “No device found on cu.usbmodem2101” despite the fact that the OS sees, as does my Arduino IDE, that does upload code.
My configuration file looks like this…
[env:seeed_xiao]
platform = atmelsam
board = seeed_xiao
framework = arduino
monitor_speed = 9600
upload_protocol = sam-ba
Any help much appreciated
This might help someone point me in the right direction.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/seeed_xiao.html
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
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 16 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .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.8% (used 12596 bytes from 262144 bytes)
Configuring upload protocol...
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = sam-ba
Looking for upload port...
Auto-detected: /dev/cu.usbmodem2101
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem2101
Waiting for the new upload port...
Uploading .pio/build/seeed_xiao/firmware.bin
No device found on cu.usbmodem2101
*** [upload] Error 1
================================================================ [FAILED] Took 10.50 seconds ================================================================
localuser@marc-macbook-pro ~ % ./.platformio/penv/bin/platformio run -d ./Documents/PlatformIO/Projects/RTOSagain -t upload --verbose
Warning! Ignore unknown configuration option `upload.using` in section [env:seeed_xiao]
Processing seeed_xiao (platform: atmelsam; board: seeed_xiao; framework: arduino; monitor_speed: 115200; upload_protocol: sam-ba; upload.using: bootloader)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION:
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 -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 16 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.8% (used 12596 bytes from 262144 bytes)
.pio/build/seeed_xiao/firmware.elf :
section size addr
.text 12344 8192
.data 252 536870912
.bss 2156 536871164
.ARM.attributes 40 0
.comment 126 0
.debug_frame 1208 0
.stabstr 279 0
Total 16405
<lambda>(["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"])
TimeoutError: Could not automatically find serial port for the `Seeeduino XIAO` board based on the declared HWIDs=['2886:802F', '2886:002F']
Auto-detected: /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