OMOTE/Platformio/platformio.ini

210 lines
7.3 KiB
INI
Raw Normal View History

2023-06-28 14:26:56 -04:00
; 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
2024-03-10 14:27:46 -04:00
[platformio]
default_envs = esp32
[env]
;-- platformio.ini custom options, reused by TFT_eSPI, SDL2 and in OMOTE code -
custom_screen_width = 240
custom_screen_heigth = 320
2023-06-28 14:26:56 -04:00
lib_deps =
2024-04-08 04:27:52 -04:00
lvgl/lvgl@^9.1.0
2024-03-10 14:27:46 -04:00
build_flags =
;-- OMOTE -----------------------------------------------------------------
-D ENABLE_WIFI_AND_MQTT=1
-D ENABLE_KEYBOARD_MQTT=0
-D ENABLE_BLUETOOTH=1
2024-03-10 14:27:46 -04:00
-D ENABLE_KEYBOARD_BLE=1
2024-03-25 17:08:51 -04:00
-D USE_SCENE_SPECIFIC_GUI_LIST=1
2024-03-10 14:27:46 -04:00
-D SCR_WIDTH=${env.custom_screen_width}
-D SCR_HEIGHT=${env.custom_screen_heigth}
2024-05-10 06:33:35 -04:00
;-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:
2024-04-08 04:27:52 -04:00
; Don't use lv_conf.h. Tweak params via platfom.ini. See lv_conf_internal.h line 49. Don't change this line.
-D LV_CONF_SKIP=1
; dynamic memory. Takes as much as it gets from heap (DRAM). Needs approx. 25%-30% more memory than static memory.
2024-04-08 04:27:52 -04:00
;-D LV_USE_STDLIB_MALLOC=1
2024-03-10 14:27:46 -04:00
; Set this in specific environments below. 32 bit and 64 bit need differenz sizes.
2024-04-08 04:27:52 -04:00
;-D LV_USE_STDLIB_MALLOC=0
2024-03-10 14:27:46 -04:00
;-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
2024-05-10 06:33:35 -04:00
;-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
2024-04-08 04:27:52 -04:00
;-D LV_CONF_PATH=../../../../src/gui/lv_conf.h
2024-03-25 17:08:51 -04:00
; --- interesting lvgl debug infos (OSD)
2024-04-08 04:27:52 -04:00
; LV_USE_SYSMON needs to be set for LV_USE_PERF_MONITOR and LV_USE_MEM_MONITOR to work
;-D LV_USE_SYSMON=1
2024-03-25 17:08:51 -04:00
;-D LV_USE_PERF_MONITOR=1
;-D LV_USE_MEM_MONITOR=1
;-D LV_USE_REFR_DEBUG=1
2024-03-10 14:27:46 -04:00
[env:esp32]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
board_build.f_flash = 80000000L
board_build.f_cpu = 240000000L
board_build.partitions = huge_app.csv
upload_speed = 1000000
lib_deps =
${env.lib_deps}
bodmer/TFT_eSPI@^2.5.43
adafruit/Adafruit BusIO@^1.15.0
adafruit/Adafruit FT6206 Library@^1.1.0
sparkfun/SparkFun LIS3DH Arduino Library@^1.0.3
crankyoldgit/IRremoteESP8266@^2.8.6
knolleary/PubSubClient@^2.8
h2zero/NimBLE-Arduino@^1.4.1
sparkfun/SparkFun MAX1704x Fuel Gauge Arduino Library@^1.0.4
2024-03-10 14:27:46 -04:00
;chris--a/Keypad@^3.1.1
;t-vk/ESP32 BLE Keyboard@^0.3.2
build_flags =
${env.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
2024-03-10 14:27:46 -04:00
-D OMOTE_HARDWARE_REV=3
;-- 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 ----------------------------------------------------------
; static memory, will be allocated in static DRAM
2024-04-08 04:27:52 -04:00
-D LV_USE_STDLIB_MALLOC=0
-D LV_MEM_SIZE="(44U * 1024U)"
;-- TFT_eSPI --------------------------------------------------------------
-D DISABLE_ALL_LIBRARY_WARNINGS=1
2023-06-28 14:26:56 -04:00
; The following lines replace the TFT_eSPI User_setup.h-file
-D USER_SETUP_LOADED=1
-D ILI9341_DRIVER=1
2024-03-10 14:27:46 -04:00
-D TFT_WIDTH=${env.custom_screen_width}
-D TFT_HEIGHT=${env.custom_screen_heigth}
;-D TFT_MISO not connected
2023-06-28 14:26:56 -04:00
-D TFT_MOSI=23
-D TFT_SCLK=18
-D TFT_CS=5
-D TFT_DC=9
-D TFT_RST=-1
-D SPI_FREQUENCY=40000000 ; 40MHz default, some displays might support 80MHz
2023-06-28 14:26:56 -04:00
; TFT_eSPI fonts are disabled by default
;-D LOAD_GLCD=1
;-D LOAD_FONT2=1
;-D LOAD_FONT4=1
;-D LOAD_FONT6=1
;-D LOAD_FONT7=1
;-D LOAD_FONT8=1
;-D LOAD_GFXFF=1
;-D SMOOTH_FONT=1
2024-03-10 14:27:46 -04:00
;-- for BLE Keyboard. Don't change this line! -----------------------------
-D USE_NIMBLE=1
2024-03-10 14:27:46 -04:00
;-- 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/*>
2024-04-16 08:21:16 -04:00
-<devices_pool/*>
2024-03-10 14:27:46 -04:00
2024-03-18 15:20:59 -04:00
; use this if you are using Ubuntu or WSL2 (64 bit compiler)
[env:linux_64bit]
2024-03-10 14:27:46 -04:00
platform = native@^1.2.1
build_flags =
${env.build_flags}
;-- lvgl ------------------------------------------------------------------
2024-04-08 04:27:52 -04:00
; in lvgl 9, lv_drivers is not needed anymore
-D LV_USE_SDL=1
2024-03-10 14:27:46 -04:00
; 64 bit needs a lot more static memory
2024-04-08 04:27:52 -04:00
-D LV_USE_STDLIB_MALLOC=0
-D LV_MEM_SIZE="(88U * 1024U)"
;-- OMOTE -----------------------------------------------------------------
2024-03-10 14:27:46 -04:00
-D SDL_HOR_RES=${env.custom_screen_width}
-D SDL_VER_RES=${env.custom_screen_heigth}
-D SDL_ZOOM=2
;-- hardware abstraction, needed to find hardwareLayer.h ------------------
-I hardware
2024-03-18 15:20:59 -04:00
-I hardware/windows_linux/lib/MQTT-C/include
2024-04-08 04:27:52 -04:00
;SDL2 from msys64
-l SDL2
2024-03-10 14:27:46 -04:00
build_src_filter =
+<*>
+<../hardware/windows_linux/*>
2024-04-16 08:21:16 -04:00
-<devices_pool/*>
2024-03-10 14:27:46 -04:00
2024-03-18 15:20:59 -04:00
; use this if you are using 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 Windows MSYS2 MINGW32 (32 bit compiler)
[env:windows_32bit]
extends = env:windows_64bit
2024-03-10 14:27:46 -04:00
build_unflags =
2024-03-18 15:20:59 -04:00
${env:windows_64bit.build_unflags}
2024-03-10 14:27:46 -04:00
;-- lvgl ------------------------------------------------------------------
2024-04-08 04:27:52 -04:00
-D LV_USE_STDLIB_MALLOC=0
-D LV_MEM_SIZE="(88U * 1024U)"
2024-03-10 14:27:46 -04:00
build_flags =
2024-03-18 15:20:59 -04:00
${env:windows_64bit.build_flags}
2024-03-10 14:27:46 -04:00
;-- lvgl ------------------------------------------------------------------
; 32 bit needs exact the same lvgl memory as on ESP32
-D LV_MEM_CUSTOM=0
2024-04-08 04:27:52 -04:00
-D LV_MEM_SIZE="(44U * 1024U)"
2024-03-10 14:27:46 -04:00
; 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