SOLVED: PlatformIO setup/custom board parameters

Has anyone successfully set up the SodaqOne with PlatformIO?


I tried here:

with Information from:

but on build I get:

~/.platformio/packages/framework-arduinosam/system/libsam/include/twi.h:82:29: error: 'Twi' was not declared 
in this scope

~/.platformio/packages/framework-arduinosam/system/libsam/include/twi.h:82:34: error: 'pTwi' was not declared
 in this scope

Seems if I replace ~/.platformio/packages/framework-arduinosam/cores/arduino with the cores/arduino folder from sodaqsamdboards-1.6.8.tar.bz2 it gets through the compile step. Most likely a custom SODAQ framework is needed.

I can’t seem to be able to get the upload working - some SAM-BA problem:

5992       1216    1768    8976    2310 .pioenvs/SodaqOne/firmware.elf
Looking for upload port...
Auto-detected: /dev/cu.usbmodem1411
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem1411
Waiting for the new upload port...
Uploading .pioenvs/SodaqOne/firmware.bin
Atmel SMART device 0x10010005 found

SAM-BA operation failed

Send auto-baud
Set binary mode
version()=v2.0 [Arduino:XYZ] May  9 2016 16:06:46
Connected at 115200 baud
Atmel SMART device 0x10010005 found
*** [upload] Error 1
========================== [ERROR] Took 18.86 seconds ===

solution mentioned here doesn’t seem to work, I will try and produce a platform package for and see if that works.

I created a SODAQ platform descriptor here:

You can install it via:
platformio platform install

It currently only features one board: the SODAQ ONE - please open pull requests to add more!


In case you are interested, there is also a Docker image with PlatformIO and the SODAQSamd platform available for your CI. It includes node to be able to test the TTN payload functions as well.

1 Like