jvoermans / Wind_Input_V1

Sketch for measuring pressure and IMU using Platformio
0 stars 0 forks source link

platformio.ini file #2

Closed jerabaul29 closed 1 year ago

jerabaul29 commented 1 year ago

You can see my typical platformio.ini:

[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...

vs yours:

https://github.com/jvoermans/Wind_Input_V1/blob/6c934d3cb1a8d7abb8649f5ab8accfc2a7aded28/platformio.ini#L11-L20

I would recommend that:

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
build_unflags =
    -std=gnu++11
check_tool = cppcheck, clangtidy  ; should be the best to use, but really not happy with Ambiq SDK...
    !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
jvoermans commented 1 year ago

Thanks :)