[env:SparkFun_Artemis] ; SparkFunModules environment: running stuff on the board
platform = apollo3blue
framework = arduino
;board = SparkFun_Artemis_Module ; the AGT follows the SF Artemis Module convention, so this is the main target
board = SparkFun_RedBoard_Artemis ; sometimes for testing stuff I use a SF Artemis Redboard
platform_packages = framework-arduinoapollo3@1.2.3 ; use the v1.x.x in newest version (bare metal)
build_type = release ; drop debug and break points in firmware
test_ignore = native_* ; native_* is the host computer, do not run these tests on the board! we run embedded_* on the board
monitor_speed = 1000000 ; baudrate of the serial monitor
test_speed = 1000000 ; baudrate used for transmitting test information
build_flags =
-std=c++17
-std=gnu++17
!echo "-DREPO_GIT_BRANCH="$(git branch --show-current)
!echo "-DREPO_COMMIT_ID="$(git log | head -1 | cut -c8-) ; this is non portable, unix only; would need a python "pre platformio script" to get this to work portably...
!echo "-DCOMPILING_HOST_NAME="$(hostname) ; this is non portable, unix only; would need a python script else
!echo "-DCOMPILING_USER_NAME="$(whoami) ; this is non portable, unix only; would need a python script else
build_unflags =
-std=gnu++11
check_tool = cppcheck, clangtidy ; should be the best to use, but really not happy with Ambiq SDK...
you build in release, by default ignore native tests (even if you do not have tests yet), set the default baudrate (remember to use the same baudrate in the Serial.begin(1000000);) so platformio can monitor serial automaticall:
build_type = release ; drop debug and break points in firmware
test_ignore = native_* ; native_* is the host computer, do not run these tests on the board! we run embedded_* on the board
monitor_speed = 1000000 ; baudrate of the serial monitor
test_speed = 1000000 ; baudrate used for transmitting test information
use modern compiler setings:
build_flags =
-std=c++17
-std=gnu++17
build_unflags =
-std=gnu++11
check_tool = cppcheck, clangtidy ; should be the best to use, but really not happy with Ambiq SDK...
providing the git branch, commit, etc, to the firmware, as flags, is super handy for version checking, but the solution I have is linux only, so if you use windows, you may jump over this (but if you use linux or WSL it can be good to keep it):
!echo "-DREPO_GIT_BRANCH="$(git branch --show-current)
!echo "-DREPO_COMMIT_ID="$(git log | head -1 | cut -c8-) ; this is non portable, unix only; would need a python "pre platformio script" to get this to work portably...
!echo "-DCOMPILING_HOST_NAME="$(hostname) ; this is non portable, unix only; would need a python script else
!echo "-DCOMPILING_USER_NAME="$(whoami) ; this is non portable, unix only; would need a python script else
You can see my typical platformio.ini:
vs yours:
https://github.com/jvoermans/Wind_Input_V1/blob/6c934d3cb1a8d7abb8649f5ab8accfc2a7aded28/platformio.ini#L11-L20
I would recommend that:
Serial.begin(1000000);
) so platformio can monitor serial automaticall: