-
Notifications
You must be signed in to change notification settings - Fork 28
/
platformio.ini.dist
60 lines (57 loc) · 1.73 KB
/
platformio.ini.dist
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
;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
[common]
lib_deps_external =
4-20ma/ModbusMaster@~2.0.1
marvinroger/AsyncMqttClient@~0.9.0
bblanchon/ArduinoJson@~7.0.4
https://github.com/tzapu/WiFiManager.git#v2.0.17
[extra]
monitor_speed = 115200
firmware_url = ${sysenv.PIO_FIRMWARE_URL}
modbus_rxd = 27
modbus_txd = 26
modbus_rts = 25
; if there is no flow control pin
; modbus_rts = NOT_A_PIN
modbus_baudrate = 9600
modbus_unit = 10
modbus_retries = 2
modbus_scanrate = 30
mqtt_host_ip = ${sysenv.PIO_MQTT_HOST_IP}
mqtt_port = ${sysenv.PIO_MQTT_PORT}
mqtt_topic = ${sysenv.PIO_MQTT_TOPIC}
[env:fm-devkit]
platform = espressif32
board = fm-devkit
framework = arduino
;upload_port = /dev/tty.SLAB_USBtoUART
;monitor_port = /dev/tty.SLAB_USBtoUART
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
test_port = /dev/ttyUSB0
monitor_speed = ${extra.monitor_speed}
build_flags =
; '-DMODBUS_DISABLED'
'-DCORE_DEBUG_LEVEL=3'
'-DFIRMWARE_URL="${extra.firmware_url}"'
'-DMONITOR_SPEED=${extra.monitor_speed}'
'-DRXD=${extra.modbus_rxd}'
'-DTXD=${extra.modbus_txd}'
'-DRTS=${extra.modbus_rts}'
'-DMODBUS_BAUDRATE=${extra.modbus_baudrate}'
'-DMODBUS_UNIT=${extra.modbus_unit}'
'-DMODBUS_RETRIES=${extra.modbus_retries}'
'-DMODBUS_SCANRATE=${extra.modbus_scanrate}'
'-DMQTT_HOST_IP="${extra.mqtt_host_ip}"'
'-DMQTT_PORT=${extra.mqtt_port}'
'-DMQTT_TOPIC="${extra.mqtt_topic}"'
lib_deps =
${common.lib_deps_external}