forked from OpenEVSE/openevse_esp32_firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
/
platformio.ini
512 lines (480 loc) · 13.1 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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
; 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
; Build options
;
; Build features
; - ENABLE_DEBUG - Turn on general debug options
; - ENABLE_DEBUG_WEB - Enable debug of the web server (noisy)
; - ENABLE_DEBUG_RAPI - Enable debug of the RAPI code (noisy)
; - ENABLE_PROFILE - Turn on the profiling
; - ENABLE_OTA - Enable Arduino OTA update
; - ENABLE_ASYNC_WIFI_SCAN - Enable use of the async WiFI scanning, requires Git version of ESP core
;
; Config
; - WIFI_LED - Define the pin to use for (and enable) WiFi status LED notifications
; - DEBUG_PORT - The port to use for debug messages, Serial is used for RAPI so if connected to an
; OpenEVSE you
[platformio]
data_dir = src/data
default_envs = openevse_wifi_v1
[common]
lib_deps =
bblanchon/ArduinoJson@6.20.1
jeremypoulter/ArduinoMongoose@0.0.20
jeremypoulter/Micro Debug@0.0.5
jeremypoulter/ConfigJson@0.0.6
jeremypoulter/OpenEVSE@0.0.14
jeremypoulter/ESPAL@0.0.4
jeremypoulter/StreamSpy@0.0.2
jeremypoulter/MicroTasks@0.0.3
matth-x/MicroOcpp@1.1.0
matth-x/MicroOcppMongoose@1.1.0
lib_ignore = WebSockets ; MicroOcpp: don't compile built-in WS library
extra_scripts =
pre:scripts/auto_fw_version.py
scripts/extra_script.py
debug_flags =
-ggdb
-D ENABLE_FULL_RAPI
-D ENABLE_DEBUG
#-D ENABLE_DEBUG_WEB
#-D ENABLE_DEBUG_WEB_REQUEST
#-D ENABLE_DEBUG_SCHEDULER
#-D ENABLE_DEBUG_TIME
#-D ENABLE_DEBUG_EVSE_MAN
#-D ENABLE_DEBUG_EVSE_MONITOR
#-D ENABLE_DEBUG_DIVERT
#-D ENABLE_DEBUG_LED
#-D ENABLE_DEBUG_LCD
#-D ENABLE_DEBUG_MQTT
#-D ENABLE_DEBUG_EMONCMS
#-D ENABLE_DEBUG_TESLA_CLIENT
#-D ENABLE_DEBUG_LIMIT
#-D ENABLE_PROFILE
#-D ENABLE_DEBUG_HTTP_UPATE
#-D ENABLE_NOISY_PROFILE
#-D ENABLE_DEBUG_MICROTASKS
#-D ENABLE_DEBUG_ENERGY_METER
#-D ENABLE_DEBUG_MEMORY_MONITOR
#-D ENABLE_DEBUG_CETRIFICATES
#-D ENABLE_DEBUG_WEB_CETRIFICATES
#-D ENABLE_DEBUG_MONGOOSE_MQTT_CLIENT
src_build_flags =
# -D ARDUINOJSON_USE_LONG_LONG
# -D ENABLE_ASYNC_WIFI_SCAN
build_flags =
-D ESP32
-D CS_PLATFORM=CS_P_ESP32
-D MG_ENABLE_SSL=1
-D MG_ENABLE_HTTP_STREAMING_MULTIPART=1
-D MG_ENABLE_EXTRA_ERRORS_DESC=1
-D MG_SSL_MBED_DUMMY_RANDOM=1
-D MG_SSL_IF=MG_SSL_IF_MBEDTLS
-D MG_SSL_IF_MBEDTLS_FREE_CERTS=1
#-D MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN=2048
#-D ARDUINO_MONGOOSE_DEFAULT_STREAM_BUFFER=2048
#-D ARDUINO_MONGOOSE_SEND_BUFFER_SIZE=2048
#-D ENABLE_DEBUG
#-D CS_ENABLE_DEBUG
#-D MBEDTLS_DEBUG_C
-D MG_ENABLE_SNTP=1
#-D ENABLE_DEBUG_MICROTASKS
-D CS_PLATFORM=CS_P_ESP32
-D MO_CUSTOM_WS ; MicroOcpp: don't use built-in WS library
-D MO_CUSTOM_CONSOLE ; MicroOcpp: use custom debug out
-D MO_DBG_LEVEL=MO_DL_INFO
-D MO_TRAFFIC_OUT
-D MO_MG_VERSION_614 ; use MG v6.14
#-D ENABLE_DEBUG
#-D ENABLE_DEBUG_MONGOOSE_HTTP_CLIENT
-D RAPI_MAX_COMMANDS=20
-D BUILD_ENV_NAME="$PIOENV"
-D ARDUINO_ARCH_ESP32
-D USE_ESP32
-D USE_ESP32_FRAMEWORK_ARDUINO
-D MG_MAX_HTTP_REQUEST_SIZE=8196
build_flags_openevse_tft =
${common.build_flags}
${common.src_build_flags}
${common.gfx_display_build_flags}
-D NEO_PIXEL_PIN=26
-D NEO_PIXEL_LENGTH=14
-D WIFI_PIXEL_NUMBER=1
-D WIFI_BUTTON=0
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D I2C_SDA=22
-D I2C_SCL=21
-D ENABLE_MCP9808
-D ENABLE_PN532
build_partitions = min_spiffs.csv
build_partitions_debug = min_spiffs_debug.csv
build_partitions_16mb = openevse_16mb.csv
neopixel_lib = adafruit/Adafruit NeoPixel@1.12.3
ws2812fx_lib = kitesurfer1404/WS2812FX@1.4.4
gfx_display_libs =
# lvgl/lvgl@8.3.9
bodmer/TFT_eSPI@^2.5.31
bitbank2/PNGdec@^1.0.1
SPI
gfx_display_build_flags =
# -D LV_CONF_INCLUDE_SIMPLE
# -D LV_CONF_SUPPRESS_DEFINE_CHECK
-D USER_SETUP_LOADED
-D ILI9488_DRIVER
-D TFT_WIDTH=320
-D TFT_HEIGHT=480
-D TFT_BL=27
-D TFT_MISO=12
-D TFT_MOSI=13
-D TFT_SCLK=14
-D TFT_CS=15
-D TFT_DC=2
-D TFT_RST=-1
-D TOUCH_CS=33
# -D LOAD_GLCD
# -D LOAD_FONT2
# -D LOAD_FONT4
# -D LOAD_FONT6
# -D LOAD_FONT7
# -D LOAD_FONT8
-D LOAD_GFXFF
# -D SMOOTH_FONT
# -D SPI_FREQUENCY=15999999
# -D SPI_FREQUENCY=20000000
# -D SPI_FREQUENCY=27000000
-D SPI_FREQUENCY=40000000
# -D SPI_FREQUENCY=55000000
# -D SPI_FREQUENCY=65000000
# -D SPI_FREQUENCY=80000000
-D SPI_READ_FREQUENCY=20000000
-D SPI_TOUCH_FREQUENCY=600000
-D ENABLE_SCREEN_LCD_TFT
[env]
# specify exact Arduino ESP SDK version, requires platformio 3.5+ (curently dev version)
# http://docs.platformio.org/en/latest/projectconf/section_env_general.html#platform
#platform = https://github.com/platformio/platform-espressif32.git#feature/stage
#platform = https://github.com/platformio/platform-espressif32.git#develop
#platform = espressif32@1.11.1
platform = espressif32@6.8.1
#framework = arduino, espidf
framework = arduino
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags}
#upload_port = openevse.local
upload_speed = 921600
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
#platform_packages =
# ; use a special branch
# framework-arduinoespressif32 @ https://github.com/marcovannoord/arduino-esp32.git#idf-release/v4.0
# platformio/framework-arduinoespressif32 @ ~3.10006.0
monitor_speed = 115200
monitor_filters =
esp32_exception_decoder
[env:nodemcu-32s]
board = nodemcu-32s
build_flags =
${common.build_flags}
${common.src_build_flags}
${common.debug_flags}
-D WIFI_LED=2
-D WIFI_LED_ON_STATE=LOW
-D RAPI_PORT=Serial2
[env:espressif_esp-wrover-kit]
board = esp-wrover-kit
lib_deps =
${common.lib_deps}
${common.neopixel_lib}
build_flags =
${common.build_flags}
${common.src_build_flags}
${common.debug_flags}
-D WIFI_BUTTON=2
-D RAPI_PORT=Serial1
-D NEO_PIXEL_PIN=18
-D NEO_PIXEL_LENGTH=2
-D WIFI_PIXEL_NUMBER=1
-D RED_LED=0
-D GREEN_LED=2
-D BLUE_LED=4
-D RX1=25
-D TX1=27
#upload_port = openevse.local
#upload_protocol = espota
upload_speed = 2000000
#upload_protocol = ftdi
#debug_tool = ftdi
#board_build.partitions = ${common.build_partitions_debug}
# export PLATFORMIO_UPLOAD_PORT=172.16.0.157
# export PLATFORMIO_UPLOAD_FLAGS="-p 3232"
[env:espressif_esp-wrover-kit_latest]
extends = env:espressif_esp-wrover-kit
platform = espressif32
[env:adafruit_huzzah32_dev]
board = featheresp32
build_flags =
${common.build_flags}
${common.src_build_flags}
${common.debug_flags}
-D WIFI_LED=13
-D WIFI_LED_ON_STATE=HIGH
-D WIFI_BUTTON=0
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D RAPI_PORT=Serial
-D DEBUG_PORT=Serial2
[env:adafruit_huzzah32]
board = featheresp32
build_flags =
${common.build_flags}
${common.src_build_flags}
-D WIFI_LED=13
-D WIFI_LED_ON_STATE=HIGH
-D WIFI_BUTTON=0
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D RAPI_PORT=Serial
-D DEBUG_PORT=Serial2
[env:adafruit_featheresp32]
board = featheresp32
build_flags =
${common.build_flags}
${common.src_build_flags}
${common.debug_flags}
-D WIFI_LED=LED_BUILTIN
-D WIFI_BUTTON=LED_BUILTIN
-D RAPI_PORT=Serial2
-D ENABLE_DEBUG_LED
[env:openevse_wifi_v1]
board = esp32dev
lib_deps =
${common.lib_deps}
${common.neopixel_lib}
adafruit/Adafruit MCP9808 Library @ 2.0.2
build_flags =
${common.build_flags}
${common.src_build_flags}
${common.debug_flags}
-D NEO_PIXEL_PIN=17
-D NEO_PIXEL_LENGTH=14
-D WIFI_PIXEL_NUMBER=1
-D WIFI_BUTTON=0
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D RAPI_PORT=Serial
-D DEBUG_PORT=Serial1
-D I2C_SDA=21
-D I2C_SCL=22
-D ENABLE_MCP9808
-D ENABLE_PN532
-D TX1=16
upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update --progress-bar | cat
[env:olimex_esp32-gateway-old]
# For hardware older than RevE
board = esp32-gateway
build_flags =
${common.build_flags}
${common.src_build_flags}
-D WIFI_LED=33
-D WIFI_LED_ON_STATE=HIGH
-D WIFI_BUTTON=34
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D DEBUG_PORT=Serial
-D RAPI_PORT=Serial2
-D ENABLE_WIRED_ETHERNET
# https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/ETH_LAN8720/ETH_LAN8720.ino
[env:olimex_esp32-gateway-f]
# For hardware RevF and RevG
# https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md
board = esp32-gateway
build_flags =
${common.build_flags}
${common.src_build_flags}
-D WIFI_LED=33
-D WIFI_LED_ON_STATE=HIGH
-D WIFI_BUTTON=34
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D DEBUG_PORT=Serial
-D RAPI_PORT=Serial2
-D ENABLE_WIRED_ETHERNET
-D RESET_ETH_PHY_ON_BOOT=1
-D RX2=16
-D TX2=32
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY_F"
upload_speed = 921600
[env:olimex_esp32-gateway-e]
# For hardware RevE
# https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md
extends = env:olimex_esp32-gateway-f
build_flags =
${env:olimex_esp32-gateway-f.build_flags}
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY_E"
[env:olimex_esp32-gateway-e_dev]
extends = env:olimex_esp32-gateway-e
build_flags =
${env:olimex_esp32-gateway-e.build_flags}
${common.debug_flags}
build_type = debug
board_build.partitions = ${common.build_partitions_debug}
[env:olimex_esp32-gateway-f_dev]
extends = env:olimex_esp32-gateway-f
build_flags =
${env:olimex_esp32-gateway-f.build_flags}
${common.debug_flags}
build_type = debug
board_build.partitions = ${common.build_partitions_debug}
[env:olimex_esp32-poe-iso]
# Tested against Rev C board
board = esp32-poe-iso
build_flags =
${common.build_flags}
${common.src_build_flags}
-D WIFI_BUTTON=34
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D DEBUG_PORT=Serial
-D RAPI_PORT=Serial2
-D ENABLE_WIRED_ETHERNET
-D RESET_ETH_PHY_ON_BOOT=1
upload_speed = 921600
[env:heltec_esp32-wifi-lora-v2]
board = heltec_wifi_lora_32_V2
build_flags =
${common.build_flags}
${common.src_build_flags}
-D DEBUG_PORT=Serial
-D WIFI_LED=25
-D WIFI_LED_ON_STATE=HIGH
-D WIFI_BUTTON=2
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D RAPI_PORT=Serial1
-D RX1=25
-D TX1=27
[env:wt32-eth01]
# For Wireless Tag
board = wt32-eth01
build_flags =
${common.build_flags}
${common.src_build_flags}
-D WIFI_LED=12
-D WIFI_LED_ON_STATE=HIGH
-D WIFI_BUTTON=4
-D WIFI_BUTTON_PRESSED_STATE=LOW
# -D DEBUG_PORT=Serial
-D RAPI_PORT=Serial2
-D ENABLE_WIRED_ETHERNET
-D RESET_ETH_PHY_ON_BOOT=1
-D RX2=5
-D TX2=17
-D ETH_PHY_TYPE=ETH_PHY_LAN8720
-D ETH_PHY_ADDR=1
-D ETH_PHY_MDC=23
-D ETH_PHY_MDIO=18
-D ETH_CLK_MODE=ETH_CLOCK_GPIO0_IN
-D ETH_PHY_POWER=16
[env:wt32-eth01-ws2812]
# For Wireless Tag
board = wt32-eth01
lib_deps =
${common.lib_deps}
${common.neopixel_lib}
${common.ws2812fx_lib}
adafruit/Adafruit MCP9808 Library @ 1.1.2
build_flags =
${common.build_flags}
${common.src_build_flags}
#-D WIFI_LED=12
#-D WIFI_LED_ON_STATE=HIGH
-D NEO_PIXEL_PIN=12
-D NEO_PIXEL_LENGTH=15
-D ENABLE_WS2812FX
-D WIFI_PIXEL_NUMBER=1
-D WIFI_BUTTON=4
-D WIFI_BUTTON_PRESSED_STATE=LOW
# -D DEBUG_PORT=Serial
-D RAPI_PORT=Serial2
# If using PN532 RFID reader through I2C
# Need to comment pin definition for SDA and SCL at .platformio/packages/framework-arduinoespressif32/variants/wt32-eth01/pins_arduino.h
#-D I2C_SDA=2
#-D I2C_SCL=4
#-D ENABLE_PN532
# If Using MCP9808
#-D SDA=2
#-D SCL=4
#-D ENABLE_MCP9808
-D ENABLE_WIRED_ETHERNET
-D RESET_ETH_PHY_ON_BOOT=1
-D RX2=5
-D TX2=17
-D ETH_PHY_TYPE=ETH_PHY_LAN8720
-D ETH_PHY_ADDR=1
-D ETH_PHY_MDC=23
-D ETH_PHY_MDIO=18
-D ETH_CLK_MODE=ETH_CLOCK_GPIO0_IN
-D ETH_PHY_POWER=16
[env:esp32-c3-devkitc-02]
board = esp32-c3-devkitc-02
lib_deps =
${common.lib_deps}
${common.neopixel_lib}
build_flags =
${common.build_flags}
${common.src_build_flags}
${common.debug_flags}
-D RAPI_PORT=Serial1
-D TX1=6
-D RX1=7
-D NEO_PIXEL_PIN=8
-D NEO_PIXEL_LENGTH=1
-D WIFI_PIXEL_NUMBER=1
[env:elecrow_esp32_hmi]
board = denky32
build_flags =
${common.build_flags}
${common.src_build_flags}
-D DEBUG_PORT=Serial
-D RAPI_PORT=Serial1
-D RX1=16
-D TX1=17
lib_deps =
${common.lib_deps}
${common.gfx_display_libs}
[env:elecrow_esp32_hmi_dev]
extends = env:elecrow_esp32_hmi
build_flags =
${env:elecrow_esp32_hmi.build_flags}
${common.debug_flags}
${common.gfx_display_build_flags}
upload_protocol = custom
upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update
#build_type = debug
#board_build.partitions = ${common.build_partitions_debug}
[env:openevse_wifi_tft_v1]
board = denky32
build_flags =
${common.build_flags_openevse_tft}
-D DEBUG_PORT=Serial2
-D RAPI_PORT=Serial
lib_deps =
${common.lib_deps}
${common.gfx_display_libs}
${common.neopixel_lib}
adafruit/Adafruit MCP9808 Library @ 2.0.2
board_build.partitions = ${common.build_partitions_16mb}
board_upload.flash_size = 16MB
board_build.flash_mode = qio
board_build.f_flash = 80000000L
[env:openevse_wifi_tft_v1_dev]
extends = env:openevse_wifi_tft_v1
build_flags =
${common.build_flags_openevse_tft}
${common.debug_flags}
-D DEBUG_PORT=Serial
-D RAPI_PORT=Serial2
#upload_protocol = custom
#upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update
build_type = debug