Repository navigation
Expand file tree
/
Copy pathplatformio.ini
More file actions
245 lines (226 loc) · 7.22 KB
/
Copy pathplatformio.ini
File metadata and controls
245 lines (226 loc) · 7.22 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[common]
; These libraries are used by all builds.
lib_deps =
wizard97/SimplyAtomic@^1.0
adbancroft/avr-fast-shift@^1.1.0
ridiculousfish/libdivide@^5.2.0
frankboesing/FastCRC@^1.41
adbancroft/avr-fast-div@^1.4.0
[env:megaatmega2560]
platform=atmelavr
board=megaatmega2560
framework=arduino
build_unflags = -Os -std=gnu++11
build_flags = -DCRC_BIGTABLES=0 -DUSE_LIBDIVIDE -DAFD_INLINE=0U -O3 -ffast-math -fshort-enums -funroll-loops -Wall -Wextra -std=c++14
lib_deps =
EEPROM
Time
${common.lib_deps}
; Note that fp64lib is only used by unit tests. It isn't referenced by the firmware & will be
; ignored.
fp64lib/fp64lib@^1.1.20
debug_tool = simavr
;This environment is the same as the above, however compiles for 6 channels of fuel and 3 channels of ignition
[env:megaatmega2560-6-3]
extends = env:megaatmega2560
build_flags = ${env:megaatmega2560.build_flags} -DINJ_CHANNELS=6 -DIGN_CHANNELS=3
;As the above, however compiles for 8 channels of fuel and only a single ignition channel
[env:megaatmega2560-8-1]
extends = env:megaatmega2560
build_flags = ${env:megaatmega2560.build_flags} -DINJ_CHANNELS=8 -DIGN_CHANNELS=1
[env:megaatmega2560_sim_unittest]
extends = env:megaatmega2560
build_src_flags = ${env:megaatmega2560.build_src_flags} -DSIMULATOR
build_type = test
platform_packages =
platformio/tool-simavr
test_speed = 9600
upload_protocol = custom
upload_command =
test_testing_command =
${platformio.packages_dir}/tool-simavr/bin/simavr
-m
atmega2560
-f
16000000L
${platformio.build_dir}/${this.__env__}/firmware.elf
[env:teensy35]
;platform=teensy
platform=https://github.com/platformio/platform-teensy.git
board=teensy35
framework=arduino
lib_deps =
EEPROM
FlexCAN_T4
Time
InternalTemperature
${common.lib_deps}
extra_scripts = post:post_extra_script.py
[env:teensy36]
;platform=teensy
platform=https://github.com/platformio/platform-teensy.git
board=teensy36
framework=arduino
lib_deps =
EEPROM
FlexCAN_T4
Time
InternalTemperature
${common.lib_deps}
extra_scripts = post:post_extra_script.py
[env:teensy41]
;platform=teensy
platform=https://github.com/platformio/platform-teensy.git
board=teensy41
framework=arduino
lib_deps =
EEPROM
FlexCAN_T4
Time
InternalTemperature
${common.lib_deps}
build_flags = -DTEENSY_INIT_USB_DELAY_AFTER=40
extra_scripts = post:post_extra_script.py
;STM32 Official core
[env:black_F407VE]
platform = ststm32
framework = arduino
board = black_f407ve
; RTC library fixed to 1.2.0, because in newer than that the RTC fails to keep up time. At least up to 1.3.7 version
lib_deps =
stm32duino/STM32duino RTC @ 1.2.0
greiman/SdFat
elapsedMillis
${common.lib_deps}
board_build.core = stm32
build_flags = -DUSE_LIBDIVIDE -std=c++14 -UBOARD_MAX_IO_PINS -DENABLE_HWSERIAL2 -DENABLE_HWSERIAL3 -DUSBCON -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DHAL_CAN_MODULE_ENABLED -DSERIAL_TX_BUFFER_SIZE=128 -DSERIAL_RX_BUFFER_SIZE=128
upload_protocol = dfu
debug_tool = stlink
monitor_speed = 115200
; For testing only
[env:black_F407VE_tests]
extends = env:black_F407VE
upload_protocol = stlink
build_flags =
${env:black_F407VE.build_flags}
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBD_VID=0x0483
-D USBD_PID=0x0003
-D USB_MANUFACTURER="Speeduino"
-D USB_PRODUCT="\"black_f407ve\""
extra_scripts = post:post_extra_script.py
; For testing only
[env:black_F407VE-EEPROM-SRAM]
extends = env:black_F407VE
build_flags = ${env:black_F407VE.build_flags} -DSRAM_AS_EEPROM
; For testing only
[env:black_F407VE-EEPROM-SPI]
extends = env:black_F407VE
build_flags = ${env:black_F407VE.build_flags} -DUSE_SPI_EEPROM
; For testing only
[env:black_F407VE-EEPROM-FRAM]
extends = env:black_F407VE
build_flags = ${env:black_F407VE.build_flags} -DFRAM_AS_EEPROM
;STM32 Official core - FCR Micro F4 (STM32F429VIT6, 2MB flash, 8MHz HSE)
; W25Q16 SPI flash on SPI3 (CS=PA15) as EEPROM, CAN1 on ALT_2 (PD0/PD1), USB CDC with VBUS sense on PA9.
[env:FCR_Micro_F4]
platform = ststm32
framework = arduino
; Project-local board def (boards/fcr_micro_f4.json) wrapping the stm32duino F429VITx variant
board = fcr_micro_f4
lib_deps =
stm32duino/STM32duino RTC @ 1.2.0
elapsedMillis
${common.lib_deps}
board_build.core = stm32
; The stm32duino generic F429VITx variant ships without an ldscript.ld, so provide one in-repo.
board_build.ldscript = boards/ldscript_fcr_micro_f4.ld
build_flags = -Wl,--wrap=pinMode
-DBOARD_FCR_MICRO_F4 -DUSE_LIBDIVIDE -std=c++14 -UBOARD_MAX_IO_PINS -DENABLE_HWSERIAL2 -DENABLE_HWSERIAL3 -DUSBCON -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DHAL_CAN_MODULE_ENABLED -DSERIAL_TX_BUFFER_SIZE=128 -DSERIAL_RX_BUFFER_SIZE=128 -DUSE_SPI_EEPROM=PA15 -DHSE_VALUE=8000000 -DINJ_CHANNELS=2 -DIGN_CHANNELS=2
upload_protocol = dfu
debug_tool = stlink
monitor_speed = 115200
;STM32 Official core
[env:BlackPill_F401CC]
platform = ststm32
framework = arduino
board = blackpill_f401cc
lib_deps =
stm32duino/STM32duino RTC @ 1.2.0
${common.lib_deps}
board_build.core = stm32
build_flags = -DUSE_LIBDIVIDE -std=c++14 -UBOARD_MAX_IO_PINS -DUSBCON -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DHAL_DAC_MODULE_DISABLED -DHAL_ETH_MODULE_DISABLED -DHAL_SD_MODULE_DISABLED -DHAL_QSPI_MODULE_DISABLED
upload_protocol = dfu
debug_tool = stlink
monitor_speed = 115200
;STM32 Official core
[env:BlackPill_F411CE_UART]
platform = ststm32
framework = arduino
board = blackpill_f411ce
lib_deps =
stm32duino/STM32duino RTC @ 1.2.0
${common.lib_deps}
board_build.core = stm32
build_flags = -DUSE_LIBDIVIDE -O3 -std=c++14 -UBOARD_MAX_IO_PINS
upload_protocol = dfu
debug_tool = stlink
monitor_speed = 115200
;STM32 Official core
[env:BlackPill_F411CE_USB]
platform = ststm32
framework = arduino
board = blackpill_f411ce
lib_deps =
stm32duino/STM32duino RTC @ 1.2.0
${common.lib_deps}
board_build.core = stm32
build_flags = -DUSE_LIBDIVIDE -O3 -std=c++14 -UBOARD_MAX_IO_PINS -DUSBCON -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC
upload_protocol = dfu
debug_tool = stlink
monitor_speed = 115200
[platformio]
src_dir=speeduino
default_envs = megaatmega2560
; local.ini is ignored via .gitignore
; This allows developers to make private/local PIO configuration changes without
; triggering Git changes in their dev tooling (E.g. VS Code)
extra_configs = local.ini
[env]
test_build_src = yes
[env:native_base]
platform = native
build_unflags = -fno-exceptions
build_flags =
-DUSE_LIBDIVIDE
-DNATIVE_BOARD
-DEXTERNAL_BOARD_H=\"board_native.h\"
-DARDUINO=101
-D USBCON
-std=c++14
-fshort-enums
-fexceptions
lib_deps =
${common.lib_deps}
https://github.com/adbancroft/ArduinoNativeFake
lib_compat_mode = off
[env:native_code_coverage]
extends = env:native_base
build_unflags = -Os -flto -Werror
build_flags =
${env:native_base.build_flags}
; Needed for setUp()
-DUNITY_INCLUDE_SETUP_STUBS
; Turn off optimizations & inlining to improve quality of coverage reporting
-O0 -fno-inline -fno-inline-small-functions -fno-default-inline
; Coverage flags
-lgcov -fprofile-arcs -ftest-coverage