forked from OpenEVSE/openevse_esp32_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
315 lines (300 loc) · 8.63 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
; 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]
version = -D BUILD_TAG=4.1.1
monitor_speed = 115200
lib_deps =
bblanchon/ArduinoJson@6.15.1
jeremypoulter/ArduinoMongoose@0.0.17
jeremypoulter/Micro Debug@0.0.5
jeremypoulter/ConfigJson@0.0.4
jeremypoulter/OpenEVSE@0.0.10
jeremypoulter/ESPAL@0.0.3
jeremypoulter/StreamSpy@0.0.1
jeremypoulter/MicroTasks@0.0.2
erropix/ESP32 AnalogWrite@0.2
lorol/LittleFS_esp32@1.0.5
matth-x/ArduinoOcpp@0.0.4
lib_ignore = WebSockets ; ArduinoOcpp: don't compile built-in WS library
extra_scripts = scripts/extra_script.py
debug_flags =
-ggdb
-D ENABLE_DEBUG
#-D ENABLE_DEBUG_WEB
#-D ENABLE_DEBUG_WEB_REQUEST
#-D ENABLE_DEBUG_SCHEDULER
#-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_PROFILE
src_build_flags =
# -D ARDUINOJSON_USE_LONG_LONG
# -D ENABLE_ASYNC_WIFI_SCAN
build_flags =
-D CS_PLATFORM=CS_P_ESP32
-D MG_ENABLE_SSL=1
-D MG_ENABLE_HTTP_STREAMING_MULTIPART=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 CS_PLATFORM=CS_P_ESP32
-D AO_CUSTOM_WS ; ArduinoOcpp: don't use built-in WS library
-D AO_CUSTOM_DIAGNOSTICS ; ArduinoOcpp: don't do internal logging
#-D ENABLE_DEBUG
#-D ENABLE_DEBUG_MONGOOSE_HTTP_CLIENT
-D RAPI_MAX_COMMANDS=20
-D BUILD_ENV_NAME="$PIOENV"
build_partitions = min_spiffs.csv
monitor_flags = --filter=esp32_exception_decoder
neopixel_lib = adafruit/Adafruit NeoPixel@1.7.0
# 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
[env:openevse_nodemcu-32s]
platform = ${common.platform}
board = nodemcu-32s
framework = arduino, espidf
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}.dev
${common.src_build_flags}
${common.debug_flags}
-D WIFI_LED=2
-D WIFI_LED_ON_STATE=LOW
-D RAPI_PORT=Serial2
build_flags =
${common.build_flags}
#upload_port = openevse.local
upload_speed = 921600
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
[env:openevse_esp-wrover-kit]
platform = ${common.platform}
board = esp-wrover-kit
framework = arduino, espidf
lib_deps =
${common.lib_deps}
${common.neopixel_lib}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}.dev
${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 RED_LED=0
-D GREEN_LED=2
-D BLUE_LED=4
build_flags =
${common.build_flags}
-D RX1=25
-D TX1=27
-ggdb
#upload_port = openevse.local
#upload_protocol = espota
upload_speed = 2000000
#upload_protocol = ftdi
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
lib_extra_dirs = lib
# export PLATFORMIO_UPLOAD_PORT=172.16.0.157
# export PLATFORMIO_UPLOAD_FLAGS="-p 3232"
[env:openevse_huzzah32_dev]
platform = ${common.platform}
board = featheresp32
framework = arduino, espidf
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}.dev
${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
-D SERIAL_RX_PULLUP_PIN=3
build_flags =
${common.build_flags}
upload_speed = 921600
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
[env:openevse_huzzah32]
platform = ${common.platform}
board = featheresp32
framework = arduino, espidf
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}
${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
-D SERIAL_RX_PULLUP_PIN=3
build_flags =
${common.build_flags}
upload_speed = 921600
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
[env:openevse_featheresp32]
platform = ${common.platform}
board = featheresp32
framework = arduino, espidf
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}.dev
${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
build_flags =
${common.build_flags}
#upload_port = openevse.local
upload_speed = 921600
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
[env:openevse_wifi_v1]
platform = ${common.platform}
board = esp32dev
framework = arduino, espidf
lib_deps =
${common.lib_deps}
${common.neopixel_lib}
adafruit/Adafruit MCP9808 Library @ 1.1.2
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}
${common.src_build_flags}
${common.debug_flags}
-D NEO_PIXEL_PIN=17
-D NEO_PIXEL_LENGTH=2
-D WIFI_BUTTON=0
-D WIFI_BUTTON_PRESSED_STATE=LOW
-D RAPI_PORT=Serial
-D DEBUG_PORT=Serial1
-D SERIAL_RX_PULLUP_PIN=3
-D I2C_SDA=21
-D I2C_SCL=22
-D ENABLE_MCP9808
build_flags =
${common.build_flags}
-D TX1=16
upload_speed = 921600
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}
[env:openevse_esp32-gateway]
#For hardware older than RevE
platform = ${common.platform}
board = esp32-gateway
framework = arduino, espidf
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}
${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 RANDOM_SEED_CHANNEL=1
build_flags =
${common.build_flags}
upload_speed = 115200
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
# https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/ETH_LAN8720/ETH_LAN8720.ino
board_build.partitions = ${common.build_partitions}
[env:openevse_esp32-gateway-e]
# Tested working with hardware RevE and RevF
#https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md
extends = env:openevse_esp32-gateway
framework = arduino, espidf
build_flags =
${common.build_flags}
-D RX2=16
-D TX2=32
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY=\'E\'"
upload_speed = 921600
[env:openevse_esp32-heltec-wifi-lora-v2]
platform = ${common.platform}
board = heltec_wifi_lora_32_V2
framework = arduino, espidf
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
src_build_flags =
${common.version}.dev
${common.src_build_flags}
-D WIFI_LED=25
-D WIFI_BUTTON=2
-D WIFI_LED_ON_STATE=HIGH
-D RAPI_PORT=Serial1
build_flags =
${common.build_flags}
-D RX1=25
-D TX1=27
#upload_port = openevse.local
#upload_speed = 921600
upload_protocol = esptool
monitor_speed = 115200
extra_scripts = ${common.extra_scripts}
board_build.partitions = ${common.build_partitions}