forked from openenergymonitor/EmonESP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
197 lines (178 loc) · 7.47 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
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[platformio]
env_default = emonesp
data_dir = src/data
[esp82xx_defaults]
build_flags = -D NDEBUG
-mtarget-align
-Wl,-Map,firmware.map
[core_2_3_0]
; *** Esp8266 core for Arduino version 2.3.0
platform = [email protected]
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Tesp8266.flash.1m512.ld
[core_2_4_2]
; *** Esp8266 core for Arduino version 2.4.2
platform = [email protected]
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m512.ld
-lstdc++ -lsupc++
; lwIP 1.4 (Default)
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; -DVTABLES_IN_FLASH
[core_2_5_0]
; *** Esp8266 core for Arduino version 2.5.0
platform = [email protected]
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m512.ld
; lwIP 1.4
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwidth Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; -DVTABLES_IN_FLASH
; -fno-exceptions
; -lstdc++
[core_stage]
; *** Esp8266 core for Arduino version latest beta
platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m512.ld
; lwIP 1.4 (Default)
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwitdh Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwitdh no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; VTABLES in Flash (default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
; -DVTABLES_IN_DRAM
; VTABLES in IRAM
; -DVTABLES_IN_IRAM
; enable one option set -> No exception recommended
; No exception code in firmware
-fno-exceptions
-lstdc++
; Exception code in firmware
; -fexceptions
; -lstdc++-exc
[core_active]
; Select one core set for platform and build_flags
;platform = ${core_2_3_0.platform}
;build_flags = ${core_2_3_0.build_flags}
platform = ${core_2_4_2.platform}
build_flags = ${core_2_4_2.build_flags}
;platform = ${core_2_5_0.platform}
;build_flags = ${core_2_5_0.build_flags}
;platform = ${core_stage.platform}
;build_flags = ${core_stage.build_flags}
[common]
version = -DBUILD_TAG=3.0.0
framework = arduino
board_build.flash_mode = dout
platform = ${core_active.platform}
build_flags = ${core_active.build_flags}
; *** Fix [email protected] induced undesired all warnings
build_unflags = -Wall
; set CPU frequency to 80MHz (default) or 160MHz
board_build.f_cpu = 80000000L
;board_build.f_cpu = 160000000L
monitor_speed = 115200
upload_speed = 115200
upload_resetmethod = nodemcu
; *********************************************************************
[env:emonesp]
platform = ${common.platform}
framework = ${common.framework}
board = esp01_1m
lib_deps = ${common.lib_deps}
src_build_flags = ${common.version} -DESP01 -DENABLE_DEBUG
monitor_speed = ${common.monitor_speed}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags}
monitor_speed = ${common.monitor_speed}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
# Sonoff S20 Smartplug, see 'sonoffS20.md'
[env:smartplug]
platform = ${common.platform}
framework = ${common.framework}
board = esp01_1m
lib_deps = ${common.lib_deps}
src_build_flags = ${common.version} -DESP01 -DENABLE_DEBUG -DSMARTPLUG
monitor_speed = ${common.monitor_speed}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags}
monitor_speed = ${common.monitor_speed}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
# MQTT WiFi relay https://guide.openenergymonitor.org/integrations/mqtt-relay/
[env:wifirelay]
platform = ${common.platform}
framework = ${common.framework}
board = esp01_1m
lib_deps = ${common.lib_deps}
src_build_flags = ${common.version} -DESP01 -DENABLE_DEBUG -DWIFIRELAY
monitor_speed = ${common.monitor_speed}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags}
monitor_speed = ${common.monitor_speed}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
# Heat Pump Monitor https://github.com/openenergymonitor/HeatpumpMonitor
[env:hpmon]
platform = ${common.platform}
framework = ${common.framework}
board = esp01_1m
lib_deps = ${common.lib_deps}
src_build_flags = ${common.version} -DESP01 -DENABLE_DEBUG -DHPMON
monitor_speed = ${common.monitor_speed}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags}
monitor_speed = ${common.monitor_speed}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
[env:esp12e]
platform = ${common.platform}
framework = ${common.framework}
board = esp12e
lib_deps = ${common.lib_deps}
src_build_flags = ${common.version} -DENABLE_DEBUG
monitor_speed = ${common.monitor_speed}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags}
monitor_speed = ${common.monitor_speed}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}