-
Notifications
You must be signed in to change notification settings - Fork 170
Expand file tree
/
Copy pathplatformio.ini
More file actions
271 lines (260 loc) · 9.64 KB
/
platformio.ini
File metadata and controls
271 lines (260 loc) · 9.64 KB
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
; 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
[platformio]
default_envs = esp32-Rev1toRev4
; platformio.ini custom options, reused by lovyanGFX, SDL2 and in OMOTE code
; used by all environments
[env]
custom_screen_width = 240
custom_screen_height = 320
lib_deps =
lvgl/lvgl@^8.3.11
build_flags =
;-- OMOTE -----------------------------------------------------------------
-D ENABLE_WIFI_AND_MQTT=1
-D ENABLE_KEYBOARD_MQTT=0
-D ENABLE_BLUETOOTH=1
-D ENABLE_KEYBOARD_BLE=1
-D USE_SCENE_SPECIFIC_GUI_LIST=1
-D SCR_WIDTH=${env.custom_screen_width}
-D SCR_HEIGHT=${env.custom_screen_height}
;-D OMOTE_LOG_LEVEL=OMOTE_LOG_LEVEL_NONE
;-D OMOTE_LOG_LEVEL=OMOTE_LOG_LEVEL_ERROR
;-D OMOTE_LOG_LEVEL=OMOTE_LOG_LEVEL_WARN
-D OMOTE_LOG_LEVEL=OMOTE_LOG_LEVEL_INFO
;-D OMOTE_LOG_LEVEL=OMOTE_LOG_LEVEL_DEBUG
;-D OMOTE_LOG_LEVEL=OMOTE_LOG_LEVEL_VERBOSE
;-- lvgl ------------------------------------------------------------------
; lvgl variant 1:
; Don't use lv_conf.h. Tweak params via platfom.ini. See lv_conf_internal.h line 31. Don't change this line.
-D LV_CONF_SKIP=1
; Set this in specific environments below. Will be different in Arduino and Windows/Linux
;-D LV_TICK_CUSTOM=1
; dynamic memory. Takes as much as it gets from heap (DRAM). Needs approx. 25%-30% more memory than static memory.
;-D LV_MEM_CUSTOM=1
; Set this in specific environments below. 32 bit and 64 bit need differenz sizes.
;-D LV_MEM_CUSTOM=0
;-D LV_MEM_SIZE="(32U * 1024U)"
; fonts and theme
-D LV_FONT_MONTSERRAT_10=1
-D LV_FONT_MONTSERRAT_12=1
-D LV_FONT_MONTSERRAT_16=1
-D LV_FONT_MONTSERRAT_24=1
-D LV_THEME_DEFAULT_DARK=1
; don't build examples
-D LV_BUILD_EXAMPLES=0
; Enable the log module
-D LV_USE_LOG=1
-D LV_LOG_PRINTF=1
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_NONE
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_USER
-D LV_LOG_LEVEL=LV_LOG_LEVEL_ERROR
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_WARN
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_TRACE
; ---
; Enable asserts if an operation is failed or an invalid data is found.
; If LV_USE_LOG is enabled an error message will be printed on failure*/
; /*Check if the styles are properly initialized. (Very fast, recommended)*/
-D LV_USE_ASSERT_STYLE=1
; /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
;-D LV_USE_ASSERT_MEM_INTEGRITY=1
; /*Check the object's type and existence (e.g. not deleted). (Slow)*/
;-D LV_USE_ASSERT_OBJ=1
; ---------
; lvgl variant 2:
; or define where lv_conf.h is, relative to the `lvgl` folder
;-D LV_CONF_PATH=../../../../src/gui_general_and_keys/lv_conf.h
; --- interesting lvgl debug infos (OSD)
;-D LV_USE_PERF_MONITOR=1
;-D LV_USE_MEM_MONITOR=1
;-D LV_USE_REFR_DEBUG=1
; shared between esp32 and esp32-s3
; excluding the env: tag makes it not show up in the list of environments
[esp32-common]
platform = espressif32
framework = arduino
monitor_speed = 115200
upload_speed = 1000000
lib_deps =
${env.lib_deps}
lovyan03/LovyanGFX@^1.2.0
sparkfun/SparkFun LIS3DH Arduino Library@^1.0.3
crankyoldgit/IRremoteESP8266@^2.8.6
knolleary/PubSubClient@^2.8
h2zero/NimBLE-Arduino@^1.4.3
;https://github.com/h2zero/NimBLE-Arduino#master
sparkfun/SparkFun MAX1704x Fuel Gauge Arduino Library@^1.0.4
;t-vk/ESP32 BLE Keyboard@^0.3.2
build_flags =
${env.build_flags}
;-- Arduino log -----------------------------------------------------------
;-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
;-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_ERROR
;-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_WARN
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO
;-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
;-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
;-- lvgl arduino ----------------------------------------------------------
; use millis() from "Arduino.h" to tell the elapsed time in milliseconds
-D LV_TICK_CUSTOM=1
; static memory, will be allocated in static DRAM
-D LV_MEM_CUSTOM=0
-D LV_MEM_SIZE="(32U * 1024U)"
;-- GFX -------------------------------------------------------------------
-D SPI_FREQUENCY=40000000 ; 40MHz default, some displays might support 80MHz
;-- for BLE Keyboard. Set the maximum number of bonded BLE peers ----------
-D CONFIG_BT_NIMBLE_MAX_BONDS=3
; has to be 4x CONFIG_BT_NIMBLE_MAX_BONDS
-D CONFIG_BT_NIMBLE_MAX_CCCDS=12
;-- hardware abstraction, needed to find hardwareLayer.h ------------------
-I hardware
-I hardware/ESP32/lib/Keypad/src
;-I hardware/ESP32/lib/ESP32-BLE-Keyboard
build_src_filter =
+<*>
+<../hardware/ESP32/*>
;+<../hardware/ESP32/lib/ESP32-BLE-Keyboard/*>
-<../hardware/ESP32/boardtest/*>
-<devices_pool/*>
; use this is for OMOTE hardware revision 1 to 4
[env:esp32-Rev1toRev4]
extends = esp32-common
board = esp32dev
board_build.f_flash = 80000000L
board_build.partitions = huge_app.csv
lib_deps =
${esp32-common.lib_deps}
;chris--a/Keypad@^3.1.1
build_flags =
${esp32-common.build_flags}
;-- OMOTE -----------------------------------------------------------------
; 1: rev1 - Slowly charge the VSW voltage to prevent a brownout
; 2: rev2 - no special handling needed
; 3: rev3 - no special handling needed
; 4: rev4 - Switched from ADC battery monitoring to i2c fuel gauge
; please select environment esp32-s3 for later hardware revisions!
-D OMOTE_HARDWARE_REV=4
; use this is for OMOTE hardware revision 5
[env:esp32-s3-Rev5andHigher]
extends = esp32-common
board = esp32-s3-devkitc-1
; credits to https://github.com/handledexception/platform-espressif32/blob/esp32-s3-devkitc-1-n16r8v/boards/esp32-s3-devkitc-1-n16r8v.json
board_build.arduino.memory_type = qio_opi
board_build.prsam_type = opi
board_build.extra_flags = -DBOARD_HAS_PSRAM
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
; board_build.partitions = default_16MB.csv
board_build.partitions = noota_16MB_custom.csv
lib_deps =
${esp32-common.lib_deps}
adafruit/Adafruit TCA8418@^1.0.2
build_unflags =
; don't use LVGL static memory from static DRAM
-D LV_MEM_CUSTOM=0
-D LV_MEM_SIZE="(32U * 1024U)"
build_flags =
${esp32-common.build_flags}
;-- lvgl ------------------------------------------------------------------
; use memory from PSRAM
-D LV_MEM_CUSTOM=0
-D LV_MEM_SIZE="(128U * 1024U)"
'-D LV_MEM_POOL_INCLUDE=<esp32-hal-psram.h>'
-D LV_MEM_POOL_ALLOC="ps_malloc"
;-- OMOTE -----------------------------------------------------------------
; please select environment esp32 for earlier hardware revisions!
; 5: rev5 - Major overhaul: ESP32-S3 with PSRAM, 8-Bit LCD, TCA8418
-D OMOTE_HARDWARE_REV=5
; use this is for a test of the board, OMOTE hardware revision 1 to 4
[env:esp32_testboard-Rev1toRev4]
extends = env:esp32-Rev1toRev4
build_flags =
${env:esp32-Rev1toRev4.build_flags}
-D LV_SPRINTF_USE_FLOAT=1
build_src_filter =
+<../hardware/ESP32/boardtest/main_boardtest.cpp>
+<../hardware/ESP32/lib/Keypad/src/*>
; use this is for a test of the board, OMOTE hardware revision 5 and higher
[env:esp32-s3_testboard-Rev5andHigher]
extends = env:esp32-s3-Rev5andHigher
build_flags =
${env:esp32-s3-Rev5andHigher.build_flags}
-D LV_SPRINTF_USE_FLOAT=1
build_src_filter =
+<../hardware/ESP32/boardtest/main_boardtest.cpp>
; use this if you are using the simulator in Ubuntu or WSL2 (64 bit compiler)
[env:linux_64bit]
platform = native@^1.2.1
lib_deps =
${env.lib_deps}
;we need the master branch from github because of this commit https://github.com/lvgl/lv_drivers/commit/7b9dee11c93ad27e2591182457c1eba7677473be
lv_drivers=https://github.com/lvgl/lv_drivers
;lvgl/lv_drivers@^8.3.0
build_flags =
${env.build_flags}
;-- lvgl ------------------------------------------------------------------
; 64 bit needs a lot more static memory
-D LV_MEM_CUSTOM=0
-D LV_MEM_SIZE="(64U * 1024U)"
;SDL2 from msys64
-l SDL2
-l SDL2_image
; settings for lv_drivers
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_DRV_NO_CONF
-D USE_SDL
-D SDL_INCLUDE_PATH="\"SDL2/SDL.h\""
-D SDL_HOR_RES=${env.custom_screen_width}
-D SDL_VER_RES=${env.custom_screen_height}
-D SDL_ZOOM=2
;-- hardware abstraction, needed to find hardwareLayer.h ------------------
-I hardware
-I hardware/windows_linux/lib/MQTT-C/include
build_src_filter =
+<*>
+<../hardware/windows_linux/*>
-<devices_pool/*>
; use this if you are using the simulator in Windows MSYS2 MINGW64 (64 bit compiler)
[env:windows_64bit]
extends = env:linux_64bit
build_flags =
${env:linux_64bit.build_flags}
; winsock
-l ws2_32
; use this if you are using the simulator in Windows MSYS2 MINGW32 (32 bit compiler)
[env:windows_32bit]
extends = env:windows_64bit
build_unflags =
${env:windows_64bit.build_unflags}
;-- lvgl ------------------------------------------------------------------
-D LV_MEM_CUSTOM=0
-D LV_MEM_SIZE="(64U * 1024U)"
build_flags =
${env:windows_64bit.build_flags}
;-- lvgl ------------------------------------------------------------------
; 32 bit needs exact the same lvgl memory as on ESP32
-D LV_MEM_CUSTOM=0
-D LV_MEM_SIZE="(32U * 1024U)"
; Take care. If you have a 64 bit compiler, this setting will tell the compiler to cross compile to 32 bit.
; Compiling is successfull, but linker fails. So use this env only with a 32 bit compiler.
; Probably a custom linker script would be needed for cross compiling to work.
; Ubuntu and WSL2 are using 64 bit compilers! So you can only build the 32 bit simulator with Windows MSYS2 MINGW32
-m32
;linker option
-Wl,-mi386pe
; use this if you are using the simulator in macOS
[env:macOS]
extends = env:linux_64bit
build_flags =
${env:linux_64bit.build_flags}
-I/opt/homebrew/include
-L/opt/homebrew/lib
-std=c++11