-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini.example
139 lines (135 loc) · 5.08 KB
/
platformio.ini.example
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
; ####################################################################################################################################
; # PlatformIO Project Example-Configuration File
; #
; # - Versions are incremented after each upload, regardingless which environment
; # - The Binary is copied to the release directory after uploading to 'OTA-Prod'
; #
; # This settings are used in the code an must be set here:
; #
; # ### Makros used in Source ###
; # '-DMQTT_PREFIX="esp32/hello" ' // The prefix for all MQTT-topics
; # '-DWIFI_SSID="mySSID"' // WiFi SSID
; # '-DWIFI_PSK="myWiFiPassword"' // WiFi Password
; # '-DMQTT_SERVER="mqtt.example.de"' // MQTT Server
; # '-DMQTT_PORT=1883' // MQTT Port
; # '-DMQTT_USER="Username"' // MQTT Username
; # '-DMQTT_PASS="myMQTTPassword"' // MQTT Password
; # '-DOTA_HASH="[MD5-Hash_from_OTA-PASS]"' // MD5-Hash of OTA-Password, e.g: MD5("OTAAccessESP32") = "80e98f64761e74aae38bdea95f9ccefd"
; #
; # ### Upload Params ###
; # upload_port = 192.168.1.123 // IP-Address of device used for OTA Flashing
; # upload_flags =
; # --auth=[OTA-PASS] // OTA-Password matching Entry "-DOTA_HASH"
; #
; # ### available Python Skripts ###
; # - pre:version_increment/version_increment_pre.py // Increment Version Counter after Upload
; # - post:version_increment/version_increment_post.py // Halper for version_increment_pre.py
; # - post:version_increment/esp32_create_factory_bin_post.py // Generating combined binary for serial flashing NOT USED in this project
; # - post:version_increment/copy_bin_2_release.py // Copy binary to release directory
; ####################################################################################################################################
[platformio]
default_envs = OTA-Prod
description = HelloESP32
; ############################################
; # First Flash over Serial, to enable OTA
; # - flashed using Serial-Port
; # - Publishes on Topic: "esp32/hello-serial"
; # - after reboot, subscibe to "esp32/hello-serial/network" to get IP
; # - Insert IP to other Targets
; # - upload_protocol = espota
; # - upload_port = [IP]
; ############################################
[env:Serial]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
build_flags =
'-DTARGET="Serial"'
'-DMQTT_PREFIX="esp32/hello-serial"'
'-DWIFI_SSID="MYWIFISSID"'
'-DWIFI_PSK="MYWIFIPASSWORD"'
'-DMQTT_SERVER="mqtt.example.de"'
'-DMQTT_PORT=1883'
'-DMQTT_USER="Username"'
'-DMQTT_PASS="myMQTTPassword"'
'-DOTA_HASH="80e98f64761e74aae38bdea95f9ccefd"'
monitor_port = com9
monitor_speed = 115200
monitor_filters = time, default
upload_protocol = esptool
upload_port = com9
lib_deps =
physee/SimpleTime@^1.0
uberi/CommandParser@^1.1.0
knolleary/PubSubClient@^2.8
extra_scripts =
pre:version_increment/version_increment_pre.py
post:version_increment/version_increment_post.py
; ############################################
; # Productive Target
; # - OTA-flashed over WiFi
; # - Publishes on Topic: "esp32/hello-ota"
; ############################################
[env:OTA-Prod]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
; monitor_port = com9
; monitor_speed = 115200
monitor_filters = time, default
build_flags =
'-DTARGET="OTA-Prod"'
'-DMQTT_PREFIX="esp32/hello-ota"'
'-DWIFI_SSID="MYWIFISSID"'
'-DWIFI_PSK="MYWIFIPASSWORD"'
'-DMQTT_SERVER="mqtt.example.de"'
'-DMQTT_PORT=1883'
'-DMQTT_USER="Username"'
'-DMQTT_PASS="myMQTTPassword"'
'-DOTA_HASH="80e98f64761e74aae38bdea95f9ccefd"'
upload_protocol = espota
upload_port = 192.168.1.222
upload_flags =
--port=3232
--auth=OTAAccessESP32
lib_deps =
physee/SimpleTime@^1.0
uberi/CommandParser@^1.1.0
knolleary/PubSubClient@^2.8
extra_scripts =
pre:version_increment/version_increment_pre.py
post:version_increment/copy_bin_2_release.py
post:version_increment/version_increment_post.py
; ############################################
; # Test-Target
; # - OTA-flashed over WiFi
; # - Publishes on Topic: "esp32/hello-test"
; ############################################
[env:OTA-Test]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_port = com9
monitor_speed = 115200
build_flags =
'-DTARGET="OTA-Test"'
'-DMQTT_PREFIX="esp32/hello-test"'
'-DWIFI_SSID="MYWIFISSID"'
'-DWIFI_PSK="MYWIFIPASSWORD"'
'-DMQTT_SERVER="mqtt.example.de"'
'-DMQTT_PORT=1883'
'-DMQTT_USER="Username"'
'-DMQTT_PASS="myMQTTPassword"'
'-DOTA_HASH="80e98f64761e74aae38bdea95f9ccefd"'
upload_protocol = espota
upload_port = 192.168.1.223
upload_flags =
--port=3232
--auth=OTAAccessESP32
lib_deps =
physee/SimpleTime@^1.0
uberi/CommandParser@^1.1.0
knolleary/PubSubClient@^2.8
extra_scripts =
pre:version_increment/version_increment_pre.py
post:version_increment/version_increment_post.py