forked from LibreSolar/charge-controller-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
97 lines (76 loc) · 2.53 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
#
# Project Configuration File
#
# A detailed documentation with the EXAMPLES is located here:
# http://docs.platformio.org/en/latest/projectconf.html
#
[platformio]
# Select the charge controller hardware by uncommenting one of the following lines
default_envs =
# mppt_2420_lc
# mppt_2420_rc
# mppt_2420_hpx
# mppt_1210_hus
# pwm_2420_lus
# 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]
#platform = https://github.com/platformio/platform-ststm32.git
platform = ststm32@~8.1.0
framework = zephyr
# Use customized Zephyr branch from Libre Solar repository
platform_packages = framework-zephyr@https://github.com/LibreSolar/zephyr#v2.4-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 ########################################################
# https://github.com/LibreSolar/MPPT-2420-LC/tree/5bc39183c8
[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
# https://github.com/LibreSolar/MPPT-1210-HUS
[env:mppt_1210_hus]
board = mppt_1210_hus
# 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
[env:unit_test]
platform = native
framework =
build_flags =
-std=gnu++17
-Wall
-D UNIT_TEST
-D __STDC_FORMAT_MACROS
-D COMMIT_HASH=\"test\"
-I test
# include src directory (otherwise unit-tests will only include lib directory)
test_build_project_src = true