Repository navigation
Expand file tree
/
Copy pathplatformio.ini
More file actions
205 lines (192 loc) · 5.71 KB
/
Copy pathplatformio.ini
File metadata and controls
205 lines (192 loc) · 5.71 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[platformio]
include_dir = .
src_dir = ./src
lib_dir = ./src/libs
test_dir = ./unit_tests
[common]
lib_deps =
mikalhart/TinyGPSPlus @ ^1.0.2
teemuatlut/TMCStepper @ ^0.7.1
waspinator/AccelStepper @ ^1.61
arduino-libraries/LiquidCrystal @ ^1.0.7
lincomatic/LiquidTWI2@^1.2.7
olikraus/U8g2@^2.28.8
https://github.com/ClutchplateDude/esp8266-oled-ssd1306#4.6.2
[env]
extra_scripts =
pre:pre_script_patch_debug.py
post:post_script_remove_patched_files.py
build_unflags =
-Os
build_flags =
; Use non STL version of ETL
-D ETL_NO_STL
; Can change to -Os if we get size constrained
-include ./src/macros/gcc/Macros.hpp
-O2
debug_build_flags =
; Optimize for debugging
-Og
; Include debug symbols
-g2
; PP define that says we are compiling for debug
-D OAT_DEBUG_BUILD
[common_embedded]
framework = arduino
monitor_speed = 19200
upload_speed = 115200
test_ignore = test_native
src_filter =
+<*> -<../.git/> -<../test/>
-<*/.pio/> -<*/.platformio/> -<libs/>
src_build_flags =
; Warnings to be enabled as codebase is refined and fixed up
-Werror
-Wall
-Wextra
; -Wpedantic
-Wno-unused-parameter
; -Wold-style-cast
-Wlogical-op
; Wdouble-promotion can't be enabled until GCC bug 55578 is fixed, since floats are
; implicitly converted to doubles when passed to a variadic function (i.e. a printf-like).
; Else we could disable Wdouble-promotion only for our logv function inside of the LOG macro
; -Wdouble-promotion
; -Wconversion
; -Wfloat-conversion
; -Wsign-conversion
-Wshadow
; -Wsuggest-final-types
-Wunknown-pragmas
; Have to use Wunknown-pragmas instead of Wundef because of a bug in the ESP32 GCC compiler
; See https://stackoverflow.com/questions/31509434/gcc-does-not-honor-pragma-gcc-diagnostic-to-silence-warnings
; platformio says that it will auto-discover the debug port if not set, but it just doesn't
;debug_port = /dev/ttyACM0
; Do not set an initial breakpoint
debug_init_break =
; Always upload firmware when initializing a debug session
debug_load_mode = always
[env:ramps]
extends = common_embedded
; atmelavr@5.0.0 is currently broken (can't upload, gets stk500v2_recv errors)
; but https://github.com/platformio/platform-atmelavr.git @ d9d2738b
; works, even though there are no commits since the 5.0.0 release?!?!?!?!?!?!
platform = atmelavr@4.2.0
board = ATmega2560
upload_protocol = wiring
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_RAMPS
build_src_flags =
${env.src_build_flags}
-Wuseless-cast
debug_tool = avr-stub
debug_build_flags =
${env.debug_build_flags}
; 0: FLASH breakpoints with avr-stub bootloader
; 1: RAM only - RAM breakpoints and stepping
; 2: FLASH breakpoints with Optiboot bootloader (using do_spm() function)
; Note that only RAM breakpoints are supported on ATmega in version 1.2 of avr-debugger!
-D AVR8_BREAKPOINT_MODE=1
-D AVR8_SWINT_SOURCE=7
lib_deps =
${common.lib_deps}
jdolinay/avr-debugger @ 1.2
https://github.com/andre-stefanov/avr-interrupt-stepper#0.0.5
[env:mksgenlv21]
extends = env:ramps
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MKS_GEN_L_V21
[env:mksgenlv2]
extends = env:ramps
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MKS_GEN_L_V2
[env:mksgenlv1]
extends = env:ramps
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MKS_GEN_L_V1
[env:esp32]
extends = common_embedded
platform = espressif32
board = esp32dev
upload_speed = 460800
monitor_filters = esp32_exception_decoder
build_unflags = -std=gnu++11
build_flags =
${env.build_flags}
-std=gnu++17
-D BOARD=BOARD_ESP32_ESP32DEV
lib_deps =
${common.lib_deps}
WiFi
[env:oaeboardv1]
extends = env:esp32
build_unflags = -std=gnu++11
build_flags =
${env.build_flags}
-std=gnu++17
-D BOARD=BOARD_OAE_V1 -D ESP32BOARD
[common_rp2xxx]
extends = common_embedded
; The 19200 default exists for the 8-bit AVR platforms; RP2040 USB CDC keeps up at 115200.
monitor_speed = 115200
; Use the maxgerhardt platform wrapper to access the Earle Philhower arduino-pico core.
; The official platform-raspberrypi uses the Arduino-mbed core, which has poorer
; library compatibility and no flexible UART pin remapping.
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board_build.core = earlephilhower
lib_deps =
mikalhart/TinyGPSPlus @ ^1.0.2
teemuatlut/TMCStepper @ ^0.7.1
waspinator/AccelStepper @ ^1.61
; SSD1306 info display support (SSD1306_128x64_Display.cpp is always compiled)
https://github.com/ClutchplateDude/esp8266-oled-ssd1306#4.6.2
; TimerInterrupt is AVR-only (uses OCR1A etc.); RP2040 uses hardware/timer.h directly
lib_ignore = TimerInterrupt
[env:rp2040_jackw01]
extends = common_rp2xxx
board = rpipico
build_flags =
${env.build_flags}
; arduino-pico core deprecates the B00000000-style Arduino::Binary.h macros used throughout the shared Mount code
-Wno-deprecated-declarations
; The arduino-pico core headers and the SSD1306 OLED library trigger -Woverloaded-virtual
; (-Werror) when parsed together in the same TU; the warning never fires in OAT code itself.
-Wno-overloaded-virtual
-D BOARD=BOARD_RP2040_JACKW01
[env:rp2040_skr_pico]
extends = common_rp2xxx
board = rpipico
build_flags =
${env.build_flags}
; arduino-pico core deprecates the B00000000-style Arduino::Binary.h macros used throughout the shared Mount code
-Wno-deprecated-declarations
; The arduino-pico core headers and the SSD1306 OLED library trigger -Woverloaded-virtual
; (-Werror) when parsed together in the same TU; the warning never fires in OAT code itself.
-Wno-overloaded-virtual
-D BOARD=BOARD_RP2040_SKR_PICO
[env:native]
platform = native
test_build_src = true
test_framework = googletest
build_src_filter =
+<./core>
+<./ports>
+<./adapters>
build_src_flags =
-std=gnu++17
-O0
-g
--coverage
-Wall
-Wextra
-Werror
-Wpedantic
-Wshadow
extra_scripts = pre:scripts/test-coverage.py
test_filter =
test_core
test_hal