mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Add ESP32S2
This commit is contained in:
parent
76257add50
commit
175f579a38
101
platformio.ini
101
platformio.ini
@ -182,6 +182,107 @@ hspi =
|
||||
-D TFT_MOSI=13
|
||||
-D TFT_SCLK=14
|
||||
|
||||
; -- Platform specific build flags
|
||||
[esp32s2]
|
||||
framework = arduino
|
||||
#platform = espressif32@^3.3.2
|
||||
|
||||
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||
platform_packages =
|
||||
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0
|
||||
|
||||
board_build.mcu = esp32s2
|
||||
board_build.f_cpu = 240000000L
|
||||
board_upload.flash_size=4MB
|
||||
board_upload.maximum_size = 4194304
|
||||
board_build.partitions = user_setups/esp32s2/no_ota.csv
|
||||
board_build.filesystem = littlefs
|
||||
;board_build.embed_files =
|
||||
; data/edit.htm.gz
|
||||
|
||||
; ----- crash reporter
|
||||
monitor_filters = esp32_exception_decoder
|
||||
|
||||
; ----- debugger
|
||||
; check_tool = cppcheck
|
||||
; check_flags = --enable=all
|
||||
; debug_tool = esp-prog
|
||||
; debug_init_break = tbreak setup
|
||||
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-D ESP32S2
|
||||
-D HTTP_UPLOAD_BUFLEN=1024 ; lower http upload buffer
|
||||
-D MQTT_MAX_PACKET_SIZE=2048 ; longer PubSubClient messages
|
||||
-D HASP_CONSOLE_BUFFER=256 ; maximum length of a console/telnet command
|
||||
-D NO_GLOBAL_HTTPUPDATE ; dont instantiate httpUpdate
|
||||
;-D CONFIG_NEWLIB_NANO_FORMAT
|
||||
; -- lvgl build options -----------------------------
|
||||
-D LV_MEM_SIZE=20480U ; 20kB lvgl memory
|
||||
-D LV_ATTRIBUTE_FAST_MEM=IRAM_ATTR
|
||||
-D LV_ATTRIBUTE_TASK_HANDLER=IRAM_ATTR
|
||||
;-D LV_FS_PC_PATH="//littlefs" ; this needs to match the vfs mount pount
|
||||
; -- ArduinoJson build options ----------------------------
|
||||
-D ARDUINOJSON_ENABLE_PROGMEM=1 ; for PROGMEM arguments
|
||||
; -- tft_espi build options ------------------------
|
||||
;-D USE_DMA_TO_TFT
|
||||
; -- openHASP build options ------------------------
|
||||
-D HASP_ATTRIBUTE_FAST_MEM=IRAM_ATTR
|
||||
-D HASP_USE_TELNET=1
|
||||
;-D HASP_USE_SPIFFS=1
|
||||
-D HASP_USE_LITTLEFS=1
|
||||
;-D HASP_USE_EEPROM=1
|
||||
-D HASP_USE_CONFIG=1 ; Native application, not library
|
||||
-D LV_LOG_TRACE_TIMER=1
|
||||
-D HASP_USE_PNGDECODE=1
|
||||
-D HASP_USE_BMPDECODE=0
|
||||
-D HASP_USE_JPGDECODE=0
|
||||
-D HASP_USE_GIFDECODE=0
|
||||
; -- LittleFS build options ------------------------
|
||||
;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
|
||||
|
||||
lib_ignore =
|
||||
GxTFT
|
||||
XPT2046_Touchscreen
|
||||
Adafruit TouchScreen
|
||||
Adafruit BusIO
|
||||
Adafruit GFX Library
|
||||
sstaub/Ticker
|
||||
lv_drv_fsmc_ili9341
|
||||
lv_drivers
|
||||
AXP192
|
||||
bodmer/TFT_eSPI
|
||||
LittleFS_esp32
|
||||
|
||||
lib_deps =
|
||||
ESP Async WebServer
|
||||
git+https://github.com/lvgl/lv_lib_png.git#release/v7
|
||||
;git+https://github.com/lvgl/lv_lib_bmp.git#release/v7
|
||||
;git+https://github.com/lvgl/lv_lib_gif.git#release/v7
|
||||
;git+https://github.com/lvgl/lv_lib_split_jpg.git
|
||||
|
||||
ps_ram =
|
||||
-DBOARD_HAS_PSRAM
|
||||
; -mfix-esp32-psram-cache-issue ; uses 24kB
|
||||
|
||||
extra_scripts =
|
||||
tools/littlefsbuilder.py
|
||||
tools/esp_merge_bin.py
|
||||
tools/analyze_elf.py
|
||||
; ${env.extra_scripts}
|
||||
; tools/copy_partitions.py
|
||||
|
||||
; -- The ESP32S2 has 2 SPI Hardware Busses available to use:
|
||||
fspi =
|
||||
-D TFT_MISO=19
|
||||
-D TFT_MOSI=23
|
||||
-D TFT_SCLK=18
|
||||
hspi =
|
||||
-D TFT_MISO=12
|
||||
-D TFT_MOSI=13
|
||||
-D TFT_SCLK=14
|
||||
|
||||
|
||||
[esp8266]
|
||||
framework = arduino
|
||||
platform = espressif8266
|
||||
|
51
user_setups/esp32s2/esp32s2-featherwing-24.ini
Normal file
51
user_setups/esp32s2/esp32s2-featherwing-24.ini
Normal file
@ -0,0 +1,51 @@
|
||||
;***************************************************;
|
||||
; HUZZAH32 ESP32 with Featherwing TFT 2.4" ;
|
||||
; - HUZZAH32 esp32 board ;
|
||||
; - ili9341 TFT Featherwing 2.4" ;
|
||||
; - STMPE610 touch controller ;
|
||||
;***************************************************;
|
||||
|
||||
[env:esp32s2-featherwing-24]
|
||||
extends = esp32s2
|
||||
board = featheresp32
|
||||
|
||||
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||
platform_packages =
|
||||
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0
|
||||
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${esp32s2.build_flags}
|
||||
-D HASP_MODEL="Adafruit ESP32-S2 Featherwing 2.4"
|
||||
|
||||
;region -- TFT_eSPI build options ------------------------
|
||||
-D ILI9341_DRIVER=1
|
||||
-D TFT_WIDTH=240
|
||||
-D TFT_HEIGHT=320
|
||||
-D TFT_ROTATION=0 ; Use default, see TFT_ROTATION values
|
||||
-D SPI_FREQUENCY=27000000
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
-D SPI_READ_FREQUENCY=20000000
|
||||
; -D USER_SETUP_LOADED=1
|
||||
-D TOUCH_DRIVER=610 ;STMPE610
|
||||
-D LGFX_USE_V1=1
|
||||
-D TFT_MISO=19
|
||||
-D TFT_MOSI=18
|
||||
-D TFT_SCLK=5
|
||||
-D TFT_DC=33
|
||||
-D TFT_CS=15
|
||||
-D TFT_RST=-1 ; RST
|
||||
-D TFT_BCKL=-1 ; Solder the LITE pad to a PWM enabled pin of the ESP.
|
||||
-D TOUCH_CS=32
|
||||
;endregion
|
||||
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
${esp32s2.lib_deps}
|
||||
adafruit/Adafruit STMPE610@^1.1.3 ;STMPE610 touch controller
|
||||
lovyan03/LovyanGFX @ ^0.4.4
|
||||
|
||||
lib_ignore =
|
||||
${env.lib_ignore}
|
||||
${esp32s2.lib_ignore}
|
||||
TFT_eSPI
|
Loading…
x
Reference in New Issue
Block a user