forked from OpenAstroTech/OpenAstroTracker-Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
117 lines (107 loc) · 2.69 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
[platformio]
; default_envs = mega2560
include_dir = .
src_dir = ./src
lib_dir = ./src/libs
[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
[env]
framework = arduino
monitor_speed = 19200
upload_speed = 115200
test_build_project_src = true
extra_scripts =
pre:pre_script_custom_defines.py
pre:pre_script_patch_debug.py
post:post_script_remove_patched_files.py
build_unflags =
-Os
build_flags =
; Can change to -Os if we get size constrained
-O2
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
; -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
debug_build_flags =
; Optimize for debugging
-Og
; Include debug symbols
-g2
; PP define that says we are compiling for debug
-D OAT_DEBUG_BUILD
; 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:mega2560]
platform = atmelavr
board = ATmega2560
upload_protocol = wiring
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MEGA2560
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
[env:mksgenlv21]
extends = env:mega2560
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MKS_GEN_L_V21
[env:mksgenlv2]
extends = env:mega2560
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MKS_GEN_L_V2
[env:mksgenlv1]
extends = env:mega2560
build_flags =
${env.build_flags}
-D BOARD=BOARD_AVR_MKS_GEN_L_V1
[env:esp32]
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