-
Notifications
You must be signed in to change notification settings - Fork 68
/
platformio.ini
133 lines (124 loc) · 3.49 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
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
[platformio]
include_dir = .
src_dir = ./src
lib_dir = ./src/libs
test_dir = ./unit_tests
build_cache_dir = ./build_cache
[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.0
[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
-Wuseless-cast
; 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
; [email protected] 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 = [email protected]
board = ATmega2560
upload_protocol = wiring
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_RAMPS
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.4
[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_flags =
${env.build_flags}
-D BOARD=BOARD_ESP32_ESP32DEV
lib_deps =
${common.lib_deps}
WiFi
[env:native]
platform = native
test_ignore = test_embedded