SOLVED: PlatformIO setup/custom board parameters

Has anyone successfully set up the SodaqOne with PlatformIO?

Cheers,
Joscha

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
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] May  9 2016 16:06:46
chipId=0x10010005
Connected at 115200 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
*** [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 https://github.com/SodaqMoja/SodaqCore-samd/tree/v1.6.8-sodaq and see if that works.

I created a SODAQ platform descriptor here: https://github.com/joscha/platform-sodaqsamd

You can install it via:
platformio platform install https://github.com/joscha/platform-sodaqsamd.git

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

Cheers!

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.
https://hub.docker.com/r/wala/platformio-sodaqsamd-node/

1 Like