forked from LibreSolar/charge-controller-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
103 lines (79 loc) · 2.87 KB
/
platformio.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# 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 = [email protected]
# https://github.com/LibreSolar/mppt-1210-hus
[env:mppt_1210_hus]
board = [email protected]
# 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 = [email protected]
# 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