-
Notifications
You must be signed in to change notification settings - Fork 79
/
platformio.ini
337 lines (275 loc) · 8.52 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
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
; 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
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = mLRS
[env]
framework = arduino
monitor_speed = 115200
upload_speed = 921600
;--------------------
; common environments
;--------------------
[env_common_esp82xx]
platform = [email protected]
board_build.f_cpu = 160000000L
build_type = release
build_flags = -Os
[env_common_esp32]
platform = [email protected]
;board_build.f_flash = 80000000L
;board_build.flash_mode = qio
board_build.f_cpu = 240000000L
build_type = release
build_flags =
-D CONFIG_DISABLE_HAL_LOCKS=1
-D CONFIG_GPIO_CTRL_FUNC_IN_IRAM=1
-D CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM=1
-D CONFIG_GPTIMER_ISR_IRAM_SAFE=1
-D CONFIG_SPI_MASTER_IN_IRAM=1
-D CONFIG_UART_ISR_IN_IRAM=1
-D CONFIG_I2C_ISR_IRAM_SAFE=1
; -D CONFIG_ARDUINO_ISR_IRAM=1
; -D CONFIG_FREERTOS_UNICORE=1
-O2
build_unflags = -Os
;-- RX --
[env_common_rx]
build_src_filter =
-<*>
+<CommonRx/mlrs-rx.cpp>
+<CommonRx/out.cpp>
+<Common/channel_order.cpp>
+<Common/common_stats.cpp>
+<Common/common_types.cpp>
+<Common/diversity.cpp>
+<Common/fhss.cpp>
+<Common/link_types.cpp>
+<Common/lq_counter.cpp>
+<Common/libs/filters.cpp>
+<modules/stm32ll-lib/src/stdstm32.c>
[env_common_rx_esp82xx]
extends = env_common_esp82xx
build_src_filter = ${env_common_rx.build_src_filter}
[env_common_rx_esp32]
extends = env_common_esp32
build_src_filter = ${env_common_rx.build_src_filter}
;-- TX --
[env_common_tx]
build_src_filter =
-<*>
+<CommonTx/mlrs-tx.cpp>
+<CommonTx/config_id.cpp>
+<CommonTx/in.cpp>
+<Common/channel_order.cpp>
+<Common/common_stats.cpp>
+<Common/common_types.cpp>
+<Common/diversity.cpp>
+<Common/fhss.cpp>
+<Common/link_types.cpp>
+<Common/lq_counter.cpp>
+<Common/while.cpp>
+<Common/libs/filters.cpp>
+<Common/thirdparty/thirdparty.cpp>
+<modules/stm32ll-lib/src/stdstm32.c>
[env_common_tx_esp32]
extends = env_common_esp32
build_src_filter = ${env_common_tx.build_src_filter}
;--------------------
; target boards
;--------------------
;-- ELRS 868/915 MHz Generic Devices
[env:rx-generic-900]
extends = env_common_rx_esp82xx
board = esp8285
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_GENERIC_900_ESP8285
[env:rx-generic-900-pa]
extends = env_common_rx_esp82xx
board = esp8285
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_GENERIC_900_PA_ESP8285
[env:rx-generic-900-td-pa]
extends = env_common_rx_esp32
board = pico32
lib_deps =
makuna/NeoPixelBus@^2.7.9
build_src_filter =
${env_common_rx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
build_flags =
${env_common_rx_esp32.build_flags}
-D RX_ELRS_GENERIC_900_TD_PA_ESP32
;-- generic 868/915 MHz ELRS boards with overlays or other variations
[env:rx-radiomaster-br3-900] ; like generic 900 pa, but sx uses RFO, has its own name
extends = env_common_rx_esp82xx
board = esp8285
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_RADIOMASTER_BR3_900_ESP8285
;[env:rx-iflight-elrs-td-900] ; identical to generic 900 td pa, to give it its own name
;extends = env:rx-generic-900-td-pa
;build_flags =
; ${env_common_rx_esp32.build_flags}
; -D RX_ELRS_IFLIGHT_ELRS_TD_900_ESP32
;-- ELRS 2.4 GHz Generic Devices
[env:rx-generic-2400]
extends = env_common_rx_esp82xx
board = esp8285
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx128x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_GENERIC_2400_ESP8285
[env:rx-generic-2400-pa]
extends = env_common_rx_esp82xx
board = esp8285
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx128x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_GENERIC_2400_PA_ESP8285
[env:rx-generic-2400-d-pa] ; only antenna1 is used
extends = env_common_rx_esp82xx
board = esp8285
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx128x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_GENERIC_2400_D_PA_ESP8285
[env:rx-generic-2400-td-pa]
extends = env_common_rx_esp32
board = pico32
lib_deps =
makuna/NeoPixelBus@^2.7.9
build_src_filter =
${env_common_rx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx128x.cpp>
build_flags =
${env_common_rx_esp32.build_flags}
-D RX_ELRS_GENERIC_2400_TD_PA_ESP32
;-- generic 2.4 GHz ELRS boards with overlays or other variations
;[env:rx-iflight-elrs-2400] ; like generic 2400 pa, but provides 500 mW instead of 100 mW, has its own name
;extends = env:rx-generic-2400-pa
;build_flags =
; ${env_common_rx_esp82xx.build_flags}
; -D RX_ELRS_IFLIGHT_ELRS_2400_ESP8285
; -D POWER_OVERLAY
;[env:rx-iflight-elrs-td-2400] ; like generic 2400 td pa, but provides 250 mW instead of 100 mW, has its own name
;extends = env:rx-generic-2400-td-pa
;build_flags =
; ${env_common_rx_esp32.build_flags}
; -D RX_ELRS_IFLIGHT_ELRS_TD_2400_ESP32
; -D POWER_OVERLAY
;-- selected ELRS boards --
[env:rx-bayck-nano-pro-900] ; identical to generic 900 pa, to give it its own name
extends = env:rx-generic-900-pa
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_BAYCK_NANO_PRO_900_ESP8285
[env:rx-speedybee-nano-2400] ; identical to generic 2400 pa, to give it its own name
extends = env:rx-generic-2400-pa
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_ELRS_SPEEDYBEE_NANO_2400_ESP8285
[env:rx-radiomaster-rp4td-2400] ; like generic 2400 td pa, but with OUT added on 2nd serial, has its own name
extends = env:rx-generic-2400-td-pa
build_flags =
${env_common_rx_esp32.build_flags}
-D RX_ELRS_RADIOMASTER_RP4TD_2400_ESP32
[env:rx-betafpv-superd-2400] ; like generic 2400 td pa, but sx and sx2 use DCDC mode, has its own name
extends = env:rx-generic-2400-td-pa
build_flags =
${env_common_rx_esp32.build_flags}
-D RX_ELRS_BETAFPV_SUPERD_2400_ESP32
-D SX_USE_REGULATOR_MODE_DCDC
-D SX2_USE_REGULATOR_MODE_DCDC
;-- some ELRS Tx
[env:tx-radiomaster-rp4td-2400]
extends = env_common_tx_esp32
board = pico32
lib_deps =
makuna/NeoPixelBus@^2.7.9
build_src_filter =
${env_common_tx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx128x.cpp>
build_flags =
${env_common_tx_esp32.build_flags}
-D TX_ELRS_RADIOMASTER_RP4TD_2400_ESP32
[env:tx-betafpv-micro-1w-2400]
extends = env_common_tx_esp32
board = esp32dev
lib_deps =
makuna/NeoPixelBus@^2.7.9
build_src_filter =
${env_common_tx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx128x.cpp>
+<Common/thirdparty/gdisp.c>
build_flags =
${env_common_tx_esp32.build_flags}
-D TX_ELRS_BETAFPV_MICRO_1W_2400_ESP32
[env:tx-radiomaster-bandit-micro-900]
extends = env_common_tx_esp32
board = esp32dev
build_src_filter =
${env_common_tx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
+<Common/thirdparty/gdisp.c>
build_flags =
${env_common_tx_esp32.build_flags}
-D TX_ELRS_RADIOMASTER_BANDIT_MICRO_900_ESP32
[env:tx-radiomaster-bandit-900]
extends = env_common_tx_esp32
board = esp32dev
lib_deps =
makuna/NeoPixelBus@^2.7.9
build_src_filter =
${env_common_tx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
+<Common/thirdparty/gdisp.c>
build_flags =
${env_common_tx_esp32.build_flags}
-D TX_ELRS_RADIOMASTER_BANDIT_900_ESP32
;-- ESP DIY boards --
[env:rx-diy-dev-900-esp8266]
extends = env_common_rx_esp82xx
board = nodemcuv2
board_build.f_cpu = 80000000L
build_type = debug
monitor_filters = esp8266_exception_decoder, default
build_src_filter =
${env_common_rx_esp82xx.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
build_flags =
${env_common_rx_esp82xx.build_flags}
-D RX_DIY_DEV_900_ESP8266
[env:rx-diy-dev-900-esp32]
extends = env_common_rx_esp32
board = heltec_wireless_stick_lite
monitor_filters = esp32_exception_decoder, default, time
build_src_filter =
${env_common_rx_esp32.build_src_filter}
+<modules/sx12xx-lib/src/sx127x.cpp>
build_flags =
${env_common_esp32.build_flags}
-D RX_DIY_DEV_900_ESP32