; 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 settings ;*************************************************** [platformio] default_envs = ; Comment unneeded environments or create extra esp32dev d1mini-lolintft24 d1mini32-lolintft24 lolind32pro-lolintft24 esp12e-st7735 include_dir = include ;lv_lib_zifont ;lvgl ;png_decoder extra_configs = platformio_override.ini ; -- By default there are no ${override.build_flags} set ; -- to use it, copy platformio_override.ini from the template [override] build_flags = [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 [lcd] TFT_WIDTH = 240 TFT_HEIGHT = 320 TFT_ROTATION = 0 ; 0=0, 1=90, 2=180 or 3=270 degree ; 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 [env] framework = arduino upload_speed = 921600 ; -- Shared library dependencies in all environments lib_deps = https://github.com/littlevgl/lvgl.git ;lvgl@6.1.2 - Not in library yet TFT_eSPI@^2.1.6 ; Tft SPI drivers ;TFT_eSPI@^1.4.20 ; Tft SPI drivers PubSubClient@^2.7.0 ; MQTT client ArduinoJson@^6.14.1,>6.14.0 ; needs at least 6.14.1 Syslog@^2.0.0 AceButton@^1.4.0 ; -- littlevgl config options ---------------------- build_flags = ;-Os ; Code Size Optimization -Og ; Code Debug Optimization ;-w ; Suppress warnings -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 HTTP_UPLOAD_BUFLEN=1024 ; lower http upload buffer -I include ; include lv_conf.h and hasp_conf.h ${override.build_flags} ;*************************************************** ; ESP32 build ;*************************************************** [env:esp32dev] platform = espressif32@1.11.1 board = esp32dev upload_port = COM3 ; Change to the correct port monitor_port = COM3 ; Change to the correct port monitor_speed = 115200 debug_tool = esp-prog debug_init_break = tbreak setup build_flags = ${env.build_flags} ; -- TFT_eSPI build options ------------------------ -D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages -D TFT_ROTATION=${lcd.TFT_ROTATION} -D TFT_WIDTH=${lcd.TFT_WIDTH} -D TFT_HEIGHT=${lcd.TFT_HEIGHT} -D USER_SETUP_LOADED=1 -D ILI9341_DRIVER=1 ${pins.vspi32} -D TFT_CS=5 -D TFT_BCKL=21 -D TFT_DC=2 -D TFT_RST=4 -D TOUCH_CS=21 -D SPI_FREQUENCY=40000000 -D SPI_TOUCH_FREQUENCY=2500000 -D SPI_READ_FREQUENCY=20000000 ; -- Debugging options ----------------------------- ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG ; -- Library options ------------------------------- lib_deps = ${env.lib_deps} src_filter = +<*> +<../drivers/stm32f429_disco> ;*************************************************** ; D1 Mini ESP32 with Lolin TFT 2.4" ;*************************************************** [env:d1mini32-lolintft24] platform = espressif32 board = wemos_d1_mini32 upload_port = COM6 ; Change to the correct port monitor_port = COM6 ; Change to the correct port monitor_speed = 115200 board_build.partitions = default.csv build_flags = ${env.build_flags} ; -- TFT_eSPI build options ------------------------ -D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages -D TFT_ROTATION=${lcd.TFT_ROTATION} -D TFT_WIDTH=${lcd.TFT_WIDTH} -D TFT_HEIGHT=${lcd.TFT_HEIGHT} -D USER_SETUP_LOADED -D ILI9341_DRIVER ${pins.vspi32} -D TFT_DC=5 -D TFT_CS=26 -D TFT_BCKL=21 -D TFT_RST=-1 ;RST -D TOUCH_CS=17 ;(can also be 22 or 16) -D SPI_FREQUENCY=40000000 -D SPI_TOUCH_FREQUENCY=2500000 -D SPI_READ_FREQUENCY=20000000 -D SUPPORT_TRANSACTIONS ;*************************************************** ; 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 = COM8 ; Change to the correct port monitor_port = COM8 ; Change to the correct port monitor_speed = 115200 board_build.partitions = default.csv build_flags = ${env.build_flags} ; -- TFT_eSPI build options ------------------------ -D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages -D TFT_ROTATION=${lcd.TFT_ROTATION} -D TFT_WIDTH=${lcd.TFT_WIDTH} -D TFT_HEIGHT=${lcd.TFT_HEIGHT} -D USER_SETUP_LOADED -D ILI9341_DRIVER ${pins.vspi32} ;-D TFT_DC=5 ;-D TFT_CS=26 -D TFT_BCKL=21 ;-D TFT_RST=-1 ;RST -D TOUCH_CS=17 ;(can also be 22 or 16) -D SPI_FREQUENCY=40000000 -D SPI_TOUCH_FREQUENCY=2500000 -D SPI_READ_FREQUENCY=20000000 -D SUPPORT_TRANSACTIONS ;*************************************************** ; D1 Mini ESP8266 with Lolin TFT 2.4" ;*************************************************** [env:d1mini-lolintft24] platform = espressif8266@2.3.2 board = d1_mini ;upload_port = COM4 ; Change to the correct port upload_protocol = espota ; Use ArduinoOTA after flashing over serial upload_port = 10.1.0.148 ; IP of the ESP monitor_port = COM4 ; Change to the correct port monitor_speed = 74880 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 = ${env.build_flags} ; -- TFT_eSPI build options ------------------------ -D MQTT_MAX_PACKET_SIZE=1024 ; longer PubSubClient messages -D TFT_ROTATION=${lcd.TFT_ROTATION} -D TFT_WIDTH=${lcd.TFT_WIDTH} -D TFT_HEIGHT=${lcd.TFT_HEIGHT} -D USER_SETUP_LOADED -D ILI9341_DRIVER -D TFT_MISO=12 ;D6 -D TFT_MOSI=13 ;D7 -D TFT_SCLK=14 ;D5 -D TFT_DC=15 ;D8 -D TFT_CS=16 ;D0 -D TFT_BCKL=2 ;D4 (can also be D1 or D2) -D TOUCH_CS=0 ;D3 (can also be D1 or D2) -D TFT_RST=-1 ;RST -D SPI_FREQUENCY=40000000 -D SPI_TOUCH_FREQUENCY=2500000 -D SPI_READ_FREQUENCY=20000000 -D SUPPORT_TRANSACTIONS ;*************************************************** ; ESP-12 build ;*************************************************** [env:esp12e-st7735] platform = espressif8266 ;@2.2.3 board = esp12e upload_port = COM5 ; Change to the correct port monitor_port = COM5 ; Change to the correct port monitor_speed = 74880 board_build.f_flash = 40000000L board_build.flash_mode = dout board_build.ldscript = eagle.flash.4m2m.ld ; 2Mb Spiffs build_flags = ${env.build_flags} ; -- TFT_eSPI build options ------------------------ -D MQTT_MAX_PACKET_SIZE=1024 ; longer PubSubClient messages -D TFT_ROTATION=${lcd.TFT_ROTATION} -D TFT_WIDTH=${lcd.TFT_WIDTH} -D TFT_HEIGHT=${lcd.TFT_HEIGHT} -D USER_SETUP_LOADED=1 -D ST7735_DRIVER=1 -D ST7735_BLACKTAB=1 -D TFT_MISO=-1 ;NC -D TFT_MOSI=13 ;D7 -D TFT_SCLK=14 ;D5 -D TFT_CS=15 ;D8 -D TFT_DC=0 ;D3 -D TFT_BCKL=2 ;D4 (can also be D1 or D2) -D TOUCH_CS=-1 ;NC -D TFT_RST=2 ;D4 -D SPI_FREQUENCY=27000000 ; -- Library options ------------------------------- lib_deps = ${env.lib_deps} Ethernet@<2.0.0 ;*************************************************** ; 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>