104 lines
2.9 KiB
INI
104 lines
2.9 KiB
INI
#
|
|
# Project Configuration File
|
|
#
|
|
# A detailed documentation with the EXAMPLES is located here:
|
|
# http://docs.platformio.org/en/latest/projectconf.html
|
|
#
|
|
|
|
[platformio]
|
|
|
|
# Choose one of below charge controller board envs as default, e.g. mppt_2420_hc
|
|
default_envs =
|
|
|
|
# Or create your own custom.ini file to overwrite settings in this file, e.g. for board selection.
|
|
# For further information see here:
|
|
# https://docs.platformio.org/en/latest/projectconf/section_platformio.html#extra-configs
|
|
extra_configs =
|
|
custom.ini
|
|
|
|
[env]
|
|
|
|
framework = zephyr
|
|
|
|
#platform = https://github.com/platformio/platform-ststm32.git
|
|
platform = ststm32@~12.0.0
|
|
|
|
# Use customized Zephyr branch from Libre Solar repository
|
|
platform_packages =
|
|
framework-zephyr@https://github.com/LibreSolar/zephyr#v2.5-branch
|
|
|
|
#upload_protocol = mbed
|
|
upload_protocol = stlink
|
|
#upload_protocol = jlink
|
|
|
|
#debug_tool = jlink
|
|
|
|
# Custom Serial Monitor baud rate
|
|
monitor_speed = 115200
|
|
|
|
# Compiler settings
|
|
build_flags =
|
|
-std=gnu++17
|
|
-fsingle-precision-constant
|
|
-Wl,-Map,memory.map
|
|
|
|
# Below flags are only valid for C++ and create warnings for C files, so we add them as
|
|
# CXXFLAGS in extra_script.
|
|
build_unflags = -Wno-register -fno-rtti
|
|
extra_scripts = platformio-extra.py
|
|
|
|
check_tool = cppcheck, clangtidy
|
|
check_flags =
|
|
cppcheck: --enable=warning,style,performance,portability,information,missingInclude -j 7 --inline-suppr
|
|
# --addon=addons/misra.py --addon=addons/cert.py
|
|
clangtidy: --checks=-*,cert-*,clang-analyzer-*,bugprone-*,misc-*,performance-*,readability-*,-readability-magic-numbers,-cert-err58-cpp
|
|
|
|
#### BOARD DEFINITIONS ########################################################
|
|
|
|
# You can specify a specific version by adding e.g. @0.2 to the board name
|
|
# (see https://docs.zephyrproject.org/latest/guides/porting/board_porting.html for details)
|
|
|
|
# PlatformIO requires a .json file with the same name in boards/ directory. If not existing for
|
|
# a particular board revision, just copy it from an existing different revision
|
|
|
|
# https://github.com/LibreSolar/mppt-2420-lc
|
|
[env:mppt_2420_lc]
|
|
board = mppt_2420_lc
|
|
|
|
# https://github.com/LibreSolar/mppt-2420-rc
|
|
[env:mppt_2420_rc]
|
|
board = mppt_2420_rc
|
|
|
|
# https://github.com/LibreSolar/mppt-2420-hc
|
|
[env:mppt_2420_hc]
|
|
board = mppt_2420_hc@0.2
|
|
|
|
# https://github.com/LibreSolar/mppt-1210-hus
|
|
[env:mppt_1210_hus]
|
|
board = mppt_1210_hus@0.7
|
|
|
|
# https://github.com/LibreSolar/mppt-2420-hpx
|
|
[env:mppt_2420_hpx]
|
|
board = mppt_2420_hpx
|
|
|
|
# https://github.com/LibreSolar/pwm-2420-lus
|
|
[env:pwm_2420_lus]
|
|
board = pwm_2420_lus@0.3
|
|
|
|
# Nucleo board for testing purposes
|
|
[env:nucleo_g474re]
|
|
board = nucleo_g474re
|
|
|
|
[env:unit_test]
|
|
platform = native
|
|
framework =
|
|
build_flags =
|
|
-std=gnu++17
|
|
-Wall
|
|
-D UNIT_TEST
|
|
-D __STDC_FORMAT_MACROS
|
|
-D FIRMWARE_VERSION_ID=\"v20.0-7-gda01bb3\"
|
|
-I test
|
|
# include src directory (otherwise unit-tests will only include lib directory)
|
|
test_build_project_src = true
|