PlatformIO support for SparkFun OpenLog Artemis board

Hi. I am developing firmware for the OpenLog Artemis board. I have been doing this in the Arduino IDE, but as my firmware grows in complexity, I am finding it hard to keep track of things. Furthermore, the compilation process is painfully slow.

I was trying to see if I can port my code to PlatformIO, but it looks like the OpenLog Artemis is not supported. Code complied in PlatformIO does not upload. I get an error saying “No device found at COMxx”.

Board: SparkFun OpenLog Artemis - DEV-16832 - SparkFun Electronics

In the Arduino IDE, I was using the Redboard Artemis ATP board for compiling my code.

Could someone tell me if the OpenLog Artemis is supported by PlatformIO?

There’s Sparkfun Edge Cortex M4 MCU Board Support · Issue #2709 · platformio/platformio-core · GitHub for supporting this in general, but I don’t know whether all the used versions (like the Arduino core version and compiler) are up-to-date.

@siva82kb I managed to get PlatformIO working with my Sparkfun Artemis Global Tracker (AGT), which has an Artemis module at its core. It was fiddley but I made a bunch of notes as I went, I’ll paste them below. Hopefully you can do similar and get it working on the OpenLog Artemis, I have one of those and would like to be able to drive it from PlatformIO too, but haven’t tried yet.
Here are my notes for the AGT board under PlatformIO.
Good Luck,
Paul

The Artemis processor/board is not officially supported but when I was looking at this project

and they were doing it I thought I would give it a shot.
They were also specifically using the v1.0 core, not the v2.0 (MBed based) one I had read about being such a problem.
I followed a combination of the instructions on the above page and this one from the actual project that lets you do this in the first place.

DONT FORGET TO Add platform_packages = framework-arduinoapollo3@1.2.3 to platformio.ini

Everything worked except for when I went to compile the test_apollo3 example I got
Linking .pio/build/SparkFun_Artemis_Module/program
arm-none-eabi-g++: error: PlatformIO: No such file or directory
arm-none-eabi-g++: error: Projects/test_apollo3/.pio/build/SparkFun_Artemis_Module/program.map: No such file or directory
*** [.pio/build/SparkFun_Artemis_Module/program] Error 1

I did some digging and it turns out the g++ compiler does not handle spaces in the project folder path, and as my projects were in
/Users/paul/Dropbox/Electronics/Arduino/PJ PlatformIO Projects
that was causing the error.

I tried making a project under the default PlatformIO Projects folder and it compiled fine.
So I created a new folder just for my PlatformIO Artemis projects at
/Users/paul/Dropbox/Electronics/Arduino/PJ_PlatformIO_Artemis_Projects
and when I made a test Artemis project in there it compiled fine.

I then had an issue when trying to UPLOAD.

Looking for upload port...
Uploading .pio/build/SparkFun_Artemis_Module/firmware.bin


Artemis SVL Bootloader
Script version 1.7

Phase:  Setup
        Cleared startup blip
Failed to enter bootload phase

Phase:  Setup
        Cleared startup blip
Failed to enter bootload phase

Phase:  Setup
        Cleared startup blip
Failed to enter bootload phase
Target failed to enter bootload mode. Verify the right COM port is selected and that your board has the SVL bootloader.

problem was the upload speed…whatever was being chosen wasn’t ok, so I had to set it in platformio.ini
as discussed here platform-apollo3blue/Upload.md at master · nigelb/platform-apollo3blue · GitHub

My working platformio.ini is now as follows;

[env:SparkFun_Artemis_Module]
platform = apollo3blue
board = SparkFun_Artemis_Module
framework = arduino
platform_packages = framework-arduinoapollo3@1.2.3
upload_port = /dev/cu.usbserial-1110
upload_speed = 115200
monitor_port = /dev/cu.usbserial-1110
monitor_speed = 115200
monitor_filters = time, log2file