Hello thanks for the response.
I tried your program and doesn’t work with PlatformIO/VSCode but does with Arduino. So very puzzled.
So my context is that I can get download to work with theIDE Arduino 1.8.9
I manually ensure that the Autonomo SAMD21 is in boot by connecting D10 to GND, and press reset. Then release D10
On Win10 I get Device Manager
Serial Port "Boassa Porgram Port (COM18)"
On Arduino programing
It says Atmel SMART device 0x10010000 SAMD21J18A found
“Write 12840 bytes to flash”
and then the Green LED flashes.
The program, basic minimum
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
With Platformio - I Create new project Board: Sodaq Autonomo, Framework: Arduino
then press upload button
…
Linking .pioenvs\sodaq_autonomo\firmware.elf
c:/users/neilh77/.platformio/packages/toolchain-gccarmnoneeabi@1.40804.0/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 00002000
Building .pioenvs\sodaq_autonomo\firmware.bin
Checking size .pioenvs\sodaq_autonomo\firmware.elf
Memory Usage → Redirecting...
DATA: [= ] 6.0% (used 1960 bytes from 32768 bytes)
PROGRAM: [ ] 2.7% (used 7164 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: COM18
Forcing reset using 1200bps open/close on port COM18
Waiting for the new upload port…
Uploading .pioenvs\sodaq_autonomo\firmware.bin
Atmel SMART device 0x10010000 found
Erase flash
done in 17.953 seconds
Write 7164 bytes to flash (112 pages)
[==============================] 100% (112/112 pages)
done in 6.640 seconds
Verify 7164 bytes of flash
[==============================] 100% (112/112 pages)
Verify successful
done in 0.092 seconds
CPU reset.
Then nothing. No flashes.
The linker is a bit strange with “cannot find entry symbol Reset_Handler; defaulting to 00002000”
But I believe 2000 is correct
However … I’ve got the ran into some problems early on and thought I had blown the boot.
So’ve reporgrammed (I hope only) the boot with
Atmel-42366-SAM-BA-Bootloader-for-SAM-D21\samd21j18a\samd21_sam_ba_both_interfaces.hex
using a black sphere technologies “BMP 2.1”
$arm-none-eabi-gdb samd21_sam_ba_both_interfaces.hex
Initially I had platformio interface to BMP2.1 and I even found a bug with it - but then the Platformio interface wasn’t reliable, and so I’ve gone back to basics - like the blink.
So now I can program from the Arduino IDE, but not from PlatformIO ???
A bit stuck…
there are some differences between libs, but haven’t wanted to probe too much deeper without posting here…
Documents\ArduinoData\packages\SODAQ\hardware\samd\1.6.19\libraries
.platformio\packages\framework-arduinosam\libraries_cores_\samd
With PlatformIO I can build/download for the SAMD21 on the Adafruit Feather M0 - a different board.
appreciate any insight .