mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-04-21 13:57:20 +00:00
236 lines
7.4 KiB
INI
236 lines
7.4 KiB
INI
; 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
|
|
; http://docs.platformio.org/page/projectconf.html
|
|
|
|
|
|
;***************************************************
|
|
; Common project settings
|
|
;***************************************************
|
|
[platformio]
|
|
extra_configs =
|
|
lcd_config.ini
|
|
pin_config.ini
|
|
; -- Add customizations to this file only:
|
|
platformio_override.ini
|
|
; -- Put active [env] files in this dir to be included in the build menu
|
|
user_setups/active/*.ini
|
|
user_setups/*/*.ini
|
|
|
|
default_envs =
|
|
; Uncomment the needed environments in platformio_override.ini
|
|
; You can also create new environments in in platformio_override.ini
|
|
${override.extra_default_envs}
|
|
|
|
; -- Location of the configuration files
|
|
;include_dir =
|
|
;include
|
|
;lv_lib_zifont
|
|
;lvgl
|
|
;png_decoder
|
|
|
|
|
|
;***************************************************
|
|
; Common environment settings
|
|
;***************************************************
|
|
[env]
|
|
framework = arduino
|
|
upload_speed = 921600
|
|
monitor_speed = 115200
|
|
; -- Shared library dependencies in all environments
|
|
lib_deps =
|
|
;lvgl@7.0.0 ; Not in library yet
|
|
https://github.com/netwizeBE/TFT_eSPI.git
|
|
;TFT_eSPI@^2.2.2 ; Tft SPI drivers
|
|
;TFT_eSPI@^1.4.20 ; Tft SPI drivers
|
|
PubSubClient@^2.7.0 ; MQTT client
|
|
ArduinoJson@^6.15.1,>6.15.0 ; needs at least 6.15.0
|
|
StreamUtils@^1.4.0
|
|
Syslog@^2.0.0
|
|
AceButton@^1.4.0
|
|
;AsyncTCP
|
|
;https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip
|
|
;https://github.com/me-no-dev/ESPAsyncTCP/archive/master.zip
|
|
https://github.com/andrethomas/TasmotaSlave.git
|
|
|
|
lib_ignore =
|
|
https://github.com/littlevgl/lvgl.git
|
|
|
|
|
|
; -- littlevgl config options ----------------------
|
|
build_flags =
|
|
;-Os ; Code Size Optimization
|
|
-Og ; Code Debug Optimization
|
|
;-w ; Suppress warnings
|
|
-D CORE_DEBUG_LEVEL=1 ; Errors
|
|
-D LV_CONF_INCLUDE_SIMPLE
|
|
-D SPIFFS_TEMPORAL_FD_CACHE ; speedup opening recent files
|
|
-D ARDUINOJSON_DECODE_UNICODE=1 ; for utf-8 symbols
|
|
-D ARDUINOJSON_ENABLE_PROGMEM=1 ; for PROGMEM arguments
|
|
-D STREAMUTILS_ENABLE_EEPROM=1 ; for STM32, it also supports EEPROM
|
|
;-D DISABLE_LOGGING
|
|
-I include ; include lv_conf.h and hasp_conf.h
|
|
${override.build_flags}
|
|
|
|
src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/> -<stm32f4/>
|
|
|
|
; -- Platform specific build flags
|
|
[flags]
|
|
esp8266_flags=
|
|
${env.build_flags}
|
|
-D HTTP_UPLOAD_BUFLEN=640 ; lower http upload buffer
|
|
-D MQTT_MAX_PACKET_SIZE=1024 ; longer PubSubClient messages
|
|
|
|
esp32_flags=
|
|
${env.build_flags}
|
|
-D HTTP_UPLOAD_BUFLEN=1024 ; lower http upload buffer
|
|
-D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages
|
|
|
|
stm32_flags=
|
|
${env.build_flags}
|
|
-I include/stm32f4
|
|
-D IRAM_ATTR= ; No IRAM_ATTR available on STM32
|
|
-D STM32
|
|
-D STREAMUTILS_USE_EEPROM_UPDATE=1 ; update cell only when changed
|
|
-D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages
|
|
|
|
[libs]
|
|
stm32_deps=
|
|
${env.lib_deps}
|
|
SPIMemory@^3.4.0
|
|
Ticker@^3.1.5
|
|
; STM32duino LwIP@^2.1.2
|
|
https://github.com/stm32duino/LwIP.git
|
|
https://github.com/khoih-prog/EthernetWebServer_STM32
|
|
|
|
; -- By default there are no ${override.build_flags} set
|
|
; -- to use it, copy platformio_override.ini from the template
|
|
[override]
|
|
build_flags =
|
|
extra_default_envs =
|
|
|
|
;***************************************************
|
|
; Hardware options
|
|
;***************************************************
|
|
; -- The SPI Hardware Busses available to use
|
|
[pins]
|
|
vspi32 =
|
|
-D TFT_MISO=19
|
|
-D TFT_MOSI=23
|
|
-D TFT_SCLK=18
|
|
hspi32 =
|
|
-D TFT_MISO=12
|
|
-D TFT_MOSI=13
|
|
-D TFT_SCLK=14
|
|
|
|
; Rotation params:
|
|
; 0 - 0 deg
|
|
; 1 - 90 deg anti-clockwise (from 0 deg)
|
|
; 2 - 180 deg anti-clockwise
|
|
; 3 - 270 deg anti-clockwise
|
|
; 4 - mirror content, and rotate 180 deg anti-clockwise
|
|
; 5 - mirror content, and rotate 270 deg anti-clockwise
|
|
; 6 - mirror content, and rotate 0 deg anti-clockwise
|
|
; 7 - mirror content, and rotate 90 deg anti-clockwise
|
|
|
|
|
|
;***************************************************
|
|
; D1 Mini ESP32 with Lolin TFT 2.4"
|
|
;***************************************************
|
|
[env:d1mini32-lolintft24]
|
|
platform = espressif32@^1.12.0
|
|
board = wemos_d1_mini32
|
|
upload_port = COM5 ; To change the port, use platform_override.ini
|
|
monitor_port = COM5 ; To change the port, use platform_override.ini
|
|
board_build.partitions = default.csv
|
|
build_flags =
|
|
${flags.esp32_flags}
|
|
; -- TFT_eSPI build options ------------------------
|
|
${lcd.lolin24}
|
|
${pins.vspi32}
|
|
-D TFT_DC=5
|
|
-D TFT_CS=26
|
|
-D TFT_RST=-1 ; RST
|
|
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
|
|
-D TOUCH_CS=17 ; (can also be 22 or 16)
|
|
|
|
|
|
;***************************************************
|
|
; Lolin D32 Pro with Lolin TFT 2.4"
|
|
;***************************************************
|
|
; !! This board already defines TFT_CS, TFT_DC and TFT_RST !!
|
|
[env:lolind32pro-lolintft24]
|
|
platform = espressif32
|
|
board = lolin_d32_pro
|
|
upload_port = COM6 ; To change the port, use platform_override.ini
|
|
monitor_port = COM6 ; To change the port, use platform_override.ini
|
|
board_build.partitions = default.csv
|
|
build_flags =
|
|
${flags.esp32_flags}
|
|
; -- TFT_eSPI build options ------------------------
|
|
${lcd.lolin24}
|
|
${pins.vspi32}
|
|
;-D TFT_DC=5 ; Defined by board, don't redefine
|
|
;-D TFT_CS=26 ; Defined by board, don't redefine
|
|
;-D TFT_RST=-1 ; Defined by board, don't redefine
|
|
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
|
|
-D TOUCH_CS=17 ; (can also be 22 or 16)
|
|
|
|
|
|
;***************************************************
|
|
; D1 Mini ESP8266 with Lolin TFT 2.4"
|
|
;***************************************************
|
|
[env:d1mini-lolintft24]
|
|
platform = espressif8266@^2.4.0 ;@2.3.2
|
|
board = d1_mini
|
|
upload_port = COM7 ; To change the port, use platform_override.ini
|
|
monitor_port = COM7 ; To change the port, use platform_override.ini
|
|
board_build.f_flash = 40000000L
|
|
board_build.flash_mode = dout
|
|
board_build.ldscript = eagle.flash.4m2m.ld ; 2Mb Spiffs
|
|
board_build.f_cpu = 160000000L ; set frequency to 160MHz
|
|
build_flags =
|
|
${flags.esp8266_flags}
|
|
; -- TFT_eSPI build options ------------------------
|
|
${lcd.lolin24}
|
|
;-D TFT_MISO=12 ;D6 Use default HSPI
|
|
;-D TFT_MOSI=13 ;D7 Use default HSPI
|
|
;-D TFT_SCLK=14 ;D5 Use default HSPI
|
|
-D TFT_DC=15 ;D8
|
|
-D TFT_CS=16 ;D0
|
|
-D TFT_BCKL=-1 ;None, configurable via web UI (e.g. 2 for D4)
|
|
-D TOUCH_CS=0 ;D3 (can also be D1 or D2)
|
|
-D TFT_RST=-1 ;RST
|
|
|
|
|
|
;***************************************************
|
|
; Native build
|
|
;***************************************************
|
|
[env:native]
|
|
platform = native
|
|
build_flags =
|
|
-D LV_CONF_INCLUDE_SIMPLE
|
|
; -I src Required to find lv_conf.h
|
|
-I src
|
|
-I drivers/sdl2
|
|
-lSDL2
|
|
; SDL drivers options
|
|
-D LV_LVGL_H_INCLUDE_SIMPLE
|
|
-D LV_DRV_NO_CONF
|
|
-D USE_MONITOR
|
|
-D MONITOR_ZOOM=2
|
|
-D USE_MOUSE
|
|
-D USE_MOUSEWHEEL
|
|
-D USE_KEYBOARD
|
|
lib_deps =
|
|
;lvgl=https://github.com/littlevgl/lvgl/archive/master.zip
|
|
;lvgl@^6.1.0
|
|
;lv_drivers=https://github.com/littlevgl/lv_drivers/archive/master.zip
|
|
lv_drivers@^6.0.2
|
|
src_filter = +<*> +<../drivers/sdl2>
|