mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add support for LilyGo T3 with SX1276 module
- Add custom partition table for fitting larger firmware - Create LilyGoT3S3Board.h for board-specific functionality - Update all example files to support the T3 board with SX1276 - Configure build environment for optimizing firmware size - Set up the right pin configuration for SX1276 on LilyGo T3
This commit is contained in:
parent
7b92e045a6
commit
e1022791e8
7 changed files with 412 additions and 48 deletions
183
platformio.ini
183
platformio.ini
|
|
@ -320,6 +320,48 @@ lib_deps =
|
|||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
; =============
|
||||
[LilyGo_T3_sx1276]
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v1 ; TTGO/LilyGo T3 V1 ESP32 with SX1276
|
||||
board_build.partitions = default_4MB.csv ; Use the 4MB partition to allocate more space for firmware
|
||||
build_unflags = -Os
|
||||
build_type = release ; Set build type to release
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-Os -ffunction-sections -fdata-sections ; Optimize for size
|
||||
-D LILYGO_T3
|
||||
-D HELTEC_LORA_V2 ; Needed for CustomSX1276 support
|
||||
-D P_LORA_DIO_0=26 ; SX1276 DIO0 interrupt pin
|
||||
-D P_LORA_DIO_1=33 ; SX1276 DIO1 interrupt pin
|
||||
-D P_LORA_NSS=18 ; Chip select - SS pin
|
||||
-D P_LORA_RESET=14 ; Reset pin
|
||||
-D P_LORA_SCLK=5 ; SPI clock
|
||||
-D P_LORA_MISO=19 ; SPI MISO
|
||||
-D P_LORA_MOSI=27 ; SPI MOSI
|
||||
-D P_LORA_TX_LED=2 ; LED pin for TX indication
|
||||
-D PIN_VBAT_READ=35 ; Battery voltage reading (analog pin)
|
||||
-D RADIO_CLASS=CustomSX1276
|
||||
-D WRAPPER_CLASS=CustomSX1276Wrapper
|
||||
-D LORA_TX_POWER=20
|
||||
|
||||
[LilyGo_T3S3_sx1276]
|
||||
extends = esp32_base
|
||||
board = t3_s3_v1_x ; ESP32-S3 specific board
|
||||
build_flags = ${esp32_base.build_flags}
|
||||
-D LILYGO_T3S3
|
||||
-D P_LORA_DIO_1=33 ; DIO1 interrupt pin
|
||||
-D P_LORA_DIO_0=34 ; DIO0 interrupt pin (replaces BUSY which is for SX126x)
|
||||
-D P_LORA_NSS=7 ; Chip select
|
||||
-D P_LORA_RESET=8 ; Reset pin
|
||||
-D P_LORA_SCLK=5 ; SPI clock
|
||||
-D P_LORA_MISO=3 ; SPI MISO
|
||||
-D P_LORA_MOSI=6 ; SPI MOSI
|
||||
-D P_LORA_TX_LED=37 ; TX LED
|
||||
-D PIN_VBAT_READ=1 ; Battery voltage reading
|
||||
-D RADIO_CLASS=CustomSX1276
|
||||
-D WRAPPER_CLASS=CustomSX1276Wrapper
|
||||
-D LORA_TX_POWER=20
|
||||
|
||||
[LilyGo_T3S3_sx1262]
|
||||
extends = esp32_base
|
||||
board = t3_s3_v1_x
|
||||
|
|
@ -398,6 +440,147 @@ lib_deps =
|
|||
${LilyGo_T3S3_sx1262.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
; === LilyGo T3S3 with SX1276 environments ===
|
||||
[env:LilyGo_T3_sx1276_Repeater]
|
||||
extends = LilyGo_T3_sx1276
|
||||
build_src_filter = ${LilyGo_T3_sx1276.build_src_filter} +<../examples/simple_repeater/main.cpp>
|
||||
build_flags =
|
||||
${LilyGo_T3_sx1276.build_flags}
|
||||
-D ADVERT_NAME="\"T3-1276 Repeater\""
|
||||
-D ADVERT_LAT=-37.0
|
||||
-D ADVERT_LON=145.0
|
||||
-D ADMIN_PASSWORD="\"password\""
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
|
||||
[env:LilyGo_T3S3_sx1276_Repeater]
|
||||
extends = LilyGo_T3S3_sx1276
|
||||
build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} +<../examples/simple_repeater/main.cpp>
|
||||
build_flags =
|
||||
${LilyGo_T3S3_sx1276.build_flags}
|
||||
-D ADVERT_NAME="\"T3S3-1276 Repeater\""
|
||||
-D ADVERT_LAT=-37.0
|
||||
-D ADVERT_LON=145.0
|
||||
-D ADMIN_PASSWORD="\"password\""
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
|
||||
[env:LilyGo_T3_sx1276_terminal_chat]
|
||||
extends = LilyGo_T3_sx1276
|
||||
build_flags =
|
||||
${LilyGo_T3_sx1276.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${LilyGo_T3_sx1276.build_src_filter} +<../examples/simple_secure_chat/main.cpp>
|
||||
lib_deps =
|
||||
${LilyGo_T3_sx1276.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:LilyGo_T3S3_sx1276_terminal_chat]
|
||||
extends = LilyGo_T3S3_sx1276
|
||||
build_flags =
|
||||
${LilyGo_T3S3_sx1276.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} +<../examples/simple_secure_chat/main.cpp>
|
||||
lib_deps =
|
||||
${LilyGo_T3S3_sx1276.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:LilyGo_T3_sx1276_companion_radio_usb]
|
||||
extends = LilyGo_T3_sx1276
|
||||
build_flags =
|
||||
${LilyGo_T3_sx1276.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
; -D ENABLE_PRIVATE_KEY_IMPORT=1
|
||||
; -D ENABLE_PRIVATE_KEY_EXPORT=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||
build_src_filter = ${LilyGo_T3_sx1276.build_src_filter} +<../examples/companion_radio/main.cpp>
|
||||
lib_deps =
|
||||
${LilyGo_T3_sx1276.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:LilyGo_T3S3_sx1276_companion_radio_usb]
|
||||
extends = LilyGo_T3S3_sx1276
|
||||
build_flags =
|
||||
${LilyGo_T3S3_sx1276.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
; -D ENABLE_PRIVATE_KEY_IMPORT=1
|
||||
; -D ENABLE_PRIVATE_KEY_EXPORT=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||
build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} +<../examples/companion_radio/main.cpp>
|
||||
lib_deps =
|
||||
${LilyGo_T3S3_sx1276.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:LilyGo_T3_sx1276_companion_radio_ble]
|
||||
extends = LilyGo_T3_sx1276
|
||||
build_flags =
|
||||
${LilyGo_T3_sx1276.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
-D BLE_PIN_CODE=123456
|
||||
-D BLE_DEBUG_LOGGING=1
|
||||
; -D ENABLE_PRIVATE_KEY_IMPORT=1
|
||||
; -D ENABLE_PRIVATE_KEY_EXPORT=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${LilyGo_T3_sx1276.build_src_filter} +<helpers/esp32/*.cpp> +<../examples/companion_radio/main.cpp>
|
||||
lib_deps =
|
||||
${LilyGo_T3_sx1276.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:LilyGo_T3_sx1276_room_server]
|
||||
extends = LilyGo_T3_sx1276
|
||||
build_src_filter = ${LilyGo_T3_sx1276.build_src_filter} +<../examples/simple_room_server/main.cpp>
|
||||
build_flags =
|
||||
${LilyGo_T3_sx1276.build_flags}
|
||||
-D ADVERT_NAME="\"T3-1276 Room\""
|
||||
-D ADVERT_LAT=-37.0
|
||||
-D ADVERT_LON=145.0
|
||||
-D ADMIN_PASSWORD="\"password\""
|
||||
-D ROOM_PASSWORD="\"hello\""
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
|
||||
[env:LilyGo_T3S3_sx1276_companion_radio_ble]
|
||||
extends = LilyGo_T3S3_sx1276
|
||||
build_flags =
|
||||
${LilyGo_T3S3_sx1276.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
-D BLE_PIN_CODE=123456
|
||||
-D BLE_DEBUG_LOGGING=1
|
||||
; -D ENABLE_PRIVATE_KEY_IMPORT=1
|
||||
; -D ENABLE_PRIVATE_KEY_EXPORT=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} +<helpers/esp32/*.cpp> +<../examples/companion_radio/main.cpp>
|
||||
lib_deps =
|
||||
${LilyGo_T3S3_sx1276.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:LilyGo_T3S3_sx1276_room_server]
|
||||
extends = LilyGo_T3S3_sx1276
|
||||
build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} +<../examples/simple_room_server/main.cpp>
|
||||
build_flags =
|
||||
${LilyGo_T3S3_sx1276.build_flags}
|
||||
-D ADVERT_NAME="\"T3S3-1276 Room\""
|
||||
-D ADVERT_LAT=-37.0
|
||||
-D ADVERT_LON=145.0
|
||||
-D ADMIN_PASSWORD="\"password\""
|
||||
-D ROOM_PASSWORD="\"hello\""
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
|
||||
; ----------------- NRF52 ---------------------
|
||||
[nrf52_base]
|
||||
extends = arduino_base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue