Hi.
I am not able to flash a SAMD21 using Atmel-ICE from PlatformIO in Visual Studio Code. When I use AtmelStudio 7 it works great. Just getting my feets wet with PlatformIO, so I really don’t know what I’m doing here. Any help would be greatly appreciated. Here is my platformio.ini file:
[env:zeroUSB]
platform = atmelsam
board = zeroUSB
framework = arduino
debug_tool = atmel-ice
upload_protocol = atmel-ice
build_type=debug
And this is what I get when I try to PlatformIO:Upload
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: docs platformio org/page/boards/atmelsam/zeroUSB.html
PLATFORM: Atmel SAM 3.9.0 > Arduino Zero (USB Native Port)
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES: toolchain-gccarmnoneeabi 1.70201.0 (7.2.1), framework-arduinosam 4.4.191002, tool-openocd 2.1000.190707 (10.0)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 20 compatible libraries
Scanning dependencies…
No dependencies
Building in debug mode
Checking size .pio\build\zeroUSB\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
DATA: [= ] 9.0% (used 2940 bytes from 32768 bytes)
PROGRAM: [= ] 5.5% (used 14304 bytes from 262144 bytes)
Configuring upload protocol…
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = atmel-ice
Uploading .pio\build\zeroUSB\firmware.bin
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1
at91samd21g18
target halted due to debug-request, current mode: Thread
xPSR: 0x41000000 pc: 0x00000158 msp: 0x20008000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x41000003 pc: 0x00000140 msp: 0x20007fc0
shutdown command invoked