openHASP/platformio.ini
2020-11-09 01:04:51 +01:00

235 lines
7.2 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
; -- Put active [env] files in this dir to be included in the build menu
user_setups/*/*.ini
user_setups/active/*.ini
; -- Add customizations to this file only:
platformio_override.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.8.0 ; MQTT client
ArduinoJson@^6.16.1 ; JSON Parser
StreamUtils@^1.4.0
Syslog@^2.0.0
AceButton@^1.6.1
;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 LV_LVGL_H_INCLUDE_SIMPLE ; for lv_drivers
-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/>
extra_scripts = pre:extra_script.py
; -- 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
-D HASP_USE_WIFI=1
-D HASP_USE_MQTT=1
-D HASP_USE_HTTP=1
-D HASP_USE_MDNS=1
-D HASP_USE_SYSLOG=0
-D HASP_USE_TELNET=0
-D HASP_USE_SPIFFS=1
-D HASP_USE_EEPROM=1
-D HASP_USE_GPIO=1
-D HASP_USE_ETHERNET=0
esp32_flags=
${env.build_flags}
-D HTTP_UPLOAD_BUFLEN=1024 ; lower http upload buffer
-D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages
-D HASP_USE_WIFI=1
-D HASP_USE_MQTT=1
-D HASP_USE_HTTP=1
-D HASP_USE_MDNS=1
-D HASP_USE_SYSLOG=0
-D HASP_USE_TELNET=0
-D HASP_USE_SPIFFS=1
-D HASP_USE_EEPROM=1
-D HASP_USE_GPIO=1
-D HASP_USE_ETHERNET=0
stm32_flags=
${env.build_flags}
-D IRAM_ATTR= ; No IRAM_ATTR available on STM32
-D ICACHE_RAM_ATTR=
-D STM32
-D STREAMUTILS_USE_EEPROM_UPDATE=1 ; update cell only when changed
-D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages
; -- 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
;***************************************************
; Lolin D32 Pro with Lolin TFT 2.4"
;***************************************************
; !! This board already defines TFT_CS, TFT_DC and TFT_RST !!
[env:lolind32pro-lolintft24]
platform = espressif32@^2.0.0
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 = esp32_partition_app1280k_spiffs1472k.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)
lib_ignore =
GxTFT
XPT2046_Touchscreen
;***************************************************
; D1 Mini ESP8266 with Lolin TFT 2.4"
;***************************************************
[env:d1mini-lolintft24]
platform = espressif8266@^2.6.2
board = d1_mini
;upload_port = To change the port, use platform_override.ini
;monitor_port = 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
lib_ignore =
GxTFT
XPT2046_Touchscreen
;***************************************************
; 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>