mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 13:16:45 +00:00
Add new standard board configs
This commit is contained in:
parent
05b646072d
commit
7edc2bc406
169
platformio.ini
169
platformio.ini
@ -20,6 +20,8 @@ default_envs =
|
||||
d1mini32-lolintft24
|
||||
lolind32pro-lolintft24
|
||||
esp12e-st7735
|
||||
;d132-unoshield
|
||||
;nodemcu32s-raspi
|
||||
|
||||
include_dir =
|
||||
include
|
||||
@ -63,33 +65,45 @@ 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
|
||||
;lvgl@7.0.0 - Not in library yet
|
||||
TFT_eSPI@^2.1.7 ; 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
|
||||
;AsyncTCP
|
||||
;https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip
|
||||
;https://github.com/me-no-dev/ESPAsyncTCP/archive/master.zip
|
||||
|
||||
|
||||
|
||||
; -- littlevgl config options ----------------------
|
||||
build_flags =
|
||||
;-Os ; Code Size Optimization
|
||||
;-Og ; Code Debug Optimization
|
||||
;-w ; Suppress warnings
|
||||
-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}
|
||||
|
||||
[flags]
|
||||
esp8266_flags=
|
||||
-D HTTP_UPLOAD_BUFLEN=512 ; lower http upload buffer
|
||||
-D MQTT_MAX_PACKET_SIZE=768 ; longer PubSubClient messages
|
||||
|
||||
esp32_flags=
|
||||
-D HTTP_UPLOAD_BUFLEN=1024 ; lower http upload buffer
|
||||
-D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages
|
||||
|
||||
;***************************************************
|
||||
; ESP32 build
|
||||
;***************************************************
|
||||
[env:esp32dev]
|
||||
platform = espressif32@1.11.1
|
||||
platform = espressif32
|
||||
board = esp32dev
|
||||
upload_port = COM3 ; Change to the correct port
|
||||
monitor_port = COM3 ; Change to the correct port
|
||||
@ -99,8 +113,8 @@ debug_init_break = tbreak setup
|
||||
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${flags.esp32_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}
|
||||
@ -125,6 +139,93 @@ lib_deps =
|
||||
src_filter = +<*> +<../drivers/stm32f429_disco>
|
||||
|
||||
|
||||
;***************************************************
|
||||
; NodeMCU32S with MHS-4" RPI Display-B
|
||||
;***************************************************
|
||||
[env:nodemcu32s-raspi]
|
||||
platform = espressif32
|
||||
board = nodemcu-32s
|
||||
;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}
|
||||
${flags.esp32_flags}
|
||||
; -- TFT_eSPI build options ------------------------
|
||||
-D TFT_ROTATION=${lcd.TFT_ROTATION}
|
||||
-D USER_SETUP_LOADED=1
|
||||
-D RPI_DISPLAY_TYPE=1
|
||||
-D ST7796_DRIVER=1
|
||||
${pins.vspi32}
|
||||
-D TFT_CS=5
|
||||
-D TFT_DC=4
|
||||
-D TFT_RST=-1
|
||||
-D TOUCH_CS=22
|
||||
-D SPI_FREQUENCY=80000000
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
-D TFT_WIDTH=320
|
||||
-D TFT_HEIGHT=480
|
||||
; -- Debugging options -----------------------------
|
||||
; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
|
||||
; -- Library options -------------------------------
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
|
||||
|
||||
;***************************************************
|
||||
; ESP32 build
|
||||
;***************************************************
|
||||
[env:d132-unoshield]
|
||||
platform = espressif32
|
||||
board = esp32dev
|
||||
upload_port = COM8 ; Change to the correct port
|
||||
monitor_port = COM8 ; Change to the correct port
|
||||
monitor_speed = 115200
|
||||
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${flags.esp32_flags}
|
||||
; -- TFT_eSPI build options ------------------------
|
||||
-D TFT_ROTATION=${lcd.TFT_ROTATION}
|
||||
-D TFT_WIDTH=320
|
||||
-D TFT_HEIGHT=480
|
||||
-D USER_SETUP_LOADED=1
|
||||
-D ILI9488_DRIVER=1
|
||||
${pins.vspi32}
|
||||
-D ESP32_PARALLEL=1
|
||||
-D define PSEUDO_8_BIT=1
|
||||
-D TFT_CS=34 ; Chip select control pin
|
||||
-D TFT_DC=36 ; Data Command control pin - must use a pin in the range 0-31
|
||||
-D TFT_RST=38 ; Reset pin
|
||||
-D TFT_WR=4 ; Write strobe control pin - must use a pin in the range 0-31
|
||||
-D TFT_RD=2
|
||||
-D TFT_D0=12 ; Must use pins in the range 0-31 for the data bus
|
||||
-D TFT_D1=13 ; so a single register write sets/clears all bits
|
||||
-D TFT_D2=26
|
||||
-D TFT_D3=25
|
||||
-D TFT_D4=17
|
||||
-D TFT_D5=16
|
||||
-D TFT_D6=27
|
||||
-D TFT_D7=14
|
||||
;-D TOUCH_CS=5
|
||||
;-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"
|
||||
;***************************************************
|
||||
@ -137,8 +238,8 @@ monitor_speed = 115200
|
||||
board_build.partitions = default.csv
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${flags.esp32_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}
|
||||
@ -163,14 +264,14 @@ build_flags =
|
||||
[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
|
||||
upload_port = COM14 ; Change to the correct port
|
||||
monitor_port = COM14 ; Change to the correct port
|
||||
monitor_speed = 115200
|
||||
board_build.partitions = default.csv
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${flags.esp32_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}
|
||||
@ -198,15 +299,15 @@ upload_port = COM13 ; 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 = COM13 ; Change to the correct port
|
||||
monitor_speed = 74880
|
||||
monitor_speed = 115200
|
||||
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}
|
||||
${flags.esp8266_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}
|
||||
@ -231,19 +332,20 @@ build_flags =
|
||||
[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
|
||||
upload_port = COM13 ; Change to the correct port
|
||||
monitor_port = COM13 ; Change to the correct port
|
||||
monitor_speed = 115200
|
||||
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}
|
||||
${flags.esp8266_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 TFT_WIDTH=128
|
||||
-D TFT_HEIGHT=160
|
||||
-D USER_SETUP_LOADED=1
|
||||
-D ST7735_DRIVER=1
|
||||
-D ST7735_BLACKTAB=1
|
||||
@ -262,6 +364,35 @@ lib_deps =
|
||||
${env.lib_deps}
|
||||
Ethernet@<2.0.0
|
||||
|
||||
;***************************************************
|
||||
; STM32F4 build
|
||||
;***************************************************
|
||||
[env:black_f407vg]
|
||||
platform = ststm32
|
||||
board = diymore_f407vgt
|
||||
board_build.mcu = stm32f407vgt6
|
||||
framework = arduino
|
||||
upload_protocol = dfu
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${flags.stm32_flags}
|
||||
; -- TFT_eSPI build options ------------------------
|
||||
-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
|
||||
|
||||
|
||||
;***************************************************
|
||||
; Native build
|
||||
@ -284,7 +415,7 @@ build_flags =
|
||||
-D USE_KEYBOARD
|
||||
lib_deps =
|
||||
;lvgl=https://github.com/littlevgl/lvgl/archive/master.zip
|
||||
lvgl@^6.1.0
|
||||
;lvgl@^6.1.0
|
||||
;lv_drivers=https://github.com/littlevgl/lv_drivers/archive/master.zip
|
||||
lv_drivers@^6.0.2
|
||||
src_filter = +<*> +<../drivers/sdl2>
|
||||
|
Loading…
x
Reference in New Issue
Block a user