From 31eda550b95434277e3f148db31d153a55e13d1f Mon Sep 17 00:00:00 2001 From: "R. Sid Shaytay" <352722946+r-sidshaytay@users.noreply.github.com> Date: Sat, 14 Nov 2026 18:35:23 -0800 Subject: [PATCH] Rename the Plus-only LILYGO profile to the T-Embed CC1101 names The profile was named for the Plus model only, but the standard T-Embed CC1101 is expected to run the same firmware. Rename the macro to ESPSOMFY_LILYGO_T_EMBED_CC1101, the PlatformIO environment to lilygo-t-embed-cc1101, and the release files to SomfyController.{ino,littlefs,onboard}.lilygo-t-embed-cc1101.*, so later merges with downstream builds match by name. The matrix entry reads "LILYGO T-Embed CC1101 / Plus". Behavior and partitions are unchanged. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build.yaml | 12 ++++++------ README.md | 10 +++++----- platformio.ini | 6 +++--- src/BoardProfile.cpp | 4 ++-- src/BoardProfile.h | 6 +++--- tools/test-board-profile.sh | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5f8bda1..827205e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -188,15 +188,15 @@ jobs: elfname: SomfyController.ino.esp32s3.elf fsname: SomfyController.littlefs.esp32s3.bin obname: SomfyController.onboard.esp32s3.bin - - env: lilygo-t-embed-cc1101-plus - name: LILYGO T-Embed CC1101 Plus + - env: lilygo-t-embed-cc1101 + name: LILYGO T-Embed CC1101 / Plus chip: ESP32-S3 addr_bootloader: "0x0" addr_fs: "0x670000" - fwname: SomfyController.ino.lilygo-t-embed-cc1101-plus.bin - elfname: SomfyController.ino.lilygo-t-embed-cc1101-plus.elf - fsname: SomfyController.littlefs.lilygo-t-embed-cc1101-plus.bin - obname: SomfyController.onboard.lilygo-t-embed-cc1101-plus.bin + fwname: SomfyController.ino.lilygo-t-embed-cc1101.bin + elfname: SomfyController.ino.lilygo-t-embed-cc1101.elf + fsname: SomfyController.littlefs.lilygo-t-embed-cc1101.bin + obname: SomfyController.onboard.lilygo-t-embed-cc1101.bin - env: esp32c3 name: ESP32-C3 chip: ESP32-C3 diff --git a/README.md b/README.md index 6ce10a5..dc13adc 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,9 @@ In either mode the socket refuses an upgrade whose `Origin` header doesn't name ## Building The firmware builds on [pioarduino](https://github.com/pioarduino/platform-espressif32) (Arduino 3.x on ESP-IDF 5.5), not the stock PlatformIO platform. In VS Code use the **pioarduino IDE** extension instead of PlatformIO IDE. On the command line, `pip install pioarduino` gives you `pio`. Run the unit tests with `pio test -e native`. [ADR 0003](docs/adr/0003-pioarduino-idf55.md) explains why. -### Build for LILYGO T-Embed CC1101 Plus +### Build for LILYGO T-Embed CC1101 / Plus -The headless Plus profile uses the board's integrated CC1101 on the 433 MHz RF path, +The headless T-Embed CC1101 profile, for both the Plus and the standard model, uses the board's integrated CC1101 on the 433 MHz RF path, 16 MB flash and 8 MB OPI PSRAM. It fixes the radio pins and reserves the shared peripheral, USB and flash/PSRAM pins; the display and encoder are not used. @@ -110,11 +110,11 @@ your board revision and any problems. This refers to the T-Embed CC1101, not the plain T-Embed without the radio. ```bash -pio run -e lilygo-t-embed-cc1101-plus -pio run -e lilygo-t-embed-cc1101-plus -t buildfs +pio run -e lilygo-t-embed-cc1101 +pio run -e lilygo-t-embed-cc1101 -t buildfs ``` -The images are in `.pio/build/lilygo-t-embed-cc1101-plus/`. This environment reuses +The images are in `.pio/build/lilygo-t-embed-cc1101/`. This environment reuses `default_8MB.csv`, matching the generic S3 release: two 3.1875 MiB firmware slots and a 1.5 MiB filesystem. The upper 8 MiB stays unallocated. A device with another partition layout needs USB provisioning with a fresh recovery backup and current rolling codes; firmware-only OTA cannot migrate diff --git a/platformio.ini b/platformio.ini index 385d47a..df35719 100644 --- a/platformio.ini +++ b/platformio.ini @@ -98,8 +98,8 @@ build_flags = ${dualcore.build_flags} -DCORE_DEBUG_LEVEL=2 -; Headless LILYGO T-Embed CC1101 Plus with its integrated 433 MHz radio. -[env:lilygo-t-embed-cc1101-plus] +; Headless LILYGO T-Embed CC1101 / Plus with its integrated 433 MHz radio. +[env:lilygo-t-embed-cc1101] extends = esp32 board = esp32-s3-devkitc1-n16r8 build_type = release @@ -114,7 +114,7 @@ build_flags = -DCORE_DEBUG_LEVEL=2 -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 - -DESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS + -DESPSOMFY_LILYGO_T_EMBED_CC1101 [env:esp32c3] extends = esp32 diff --git a/src/BoardProfile.cpp b/src/BoardProfile.cpp index a920a6b..802e715 100644 --- a/src/BoardProfile.cpp +++ b/src/BoardProfile.cpp @@ -1,11 +1,11 @@ #include "BoardProfile.h" #include -#if defined(ESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS) +#if defined(ESPSOMFY_LILYGO_T_EMBED_CC1101) #include #endif namespace BoardProfile { -#if defined(ESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS) +#if defined(ESPSOMFY_LILYGO_T_EMBED_CC1101) static bool initialized = false; static void output(uint8_t pin, uint8_t level) { diff --git a/src/BoardProfile.h b/src/BoardProfile.h index cce53dc..0e547e6 100644 --- a/src/BoardProfile.h +++ b/src/BoardProfile.h @@ -2,16 +2,16 @@ #include namespace BoardProfile { -#if defined(ESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS) +#if defined(ESPSOMFY_LILYGO_T_EMBED_CC1101) #if !defined(CONFIG_IDF_TARGET_ESP32S3) -#error "The LILYGO T-Embed CC1101 Plus profile requires an ESP32-S3 target" +#error "The LILYGO T-Embed CC1101 / Plus profile requires an ESP32-S3 target" #endif constexpr bool integratedRadio = true; #else constexpr bool integratedRadio = false; #endif -// LILYGO T-Embed CC1101 wiring, hardware-tested on the Plus model. +// LILYGO T-Embed CC1101 wiring, hardware-tested on the Plus model; the standard model is expected to match. constexpr uint8_t power = 15; constexpr uint8_t sck = 11; constexpr uint8_t mosi = 9; diff --git a/tools/test-board-profile.sh b/tools/test-board-profile.sh index cbeb336..748eab0 100755 --- a/tools/test-board-profile.sh +++ b/tools/test-board-profile.sh @@ -6,7 +6,7 @@ trap 'rm -rf -- "$scratch"' EXIT compiler="${CXX:-c++}" common=(-std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -I"$repo/tests/board-profile" -I"$repo/src") sources=("$repo/tests/board-profile/board-profile-test.cpp" "$repo/src/BoardProfile.cpp") -"$compiler" "${common[@]}" -DESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS -DCONFIG_IDF_TARGET_ESP32S3 \ +"$compiler" "${common[@]}" -DESPSOMFY_LILYGO_T_EMBED_CC1101 -DCONFIG_IDF_TARGET_ESP32S3 \ "${sources[@]}" -o "$scratch/lilygo-test" "$scratch/lilygo-test" "$compiler" "${common[@]}" "${sources[@]}" -o "$scratch/generic-test" @@ -14,13 +14,13 @@ sources=("$repo/tests/board-profile/board-profile-test.cpp" "$repo/src/BoardProf for profile in generic lilygo; do flags=() if [[ "$profile" == lilygo ]]; then - flags=(-DESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS -DCONFIG_IDF_TARGET_ESP32S3) + flags=(-DESPSOMFY_LILYGO_T_EMBED_CC1101 -DCONFIG_IDF_TARGET_ESP32S3) fi "$compiler" "${common[@]}" "${flags[@]}" \ "$repo/tests/board-profile/shade-gpio-test.cpp" "$repo/src/BoardProfile.cpp" -o "$scratch/shade-gpio-$profile" "$scratch/shade-gpio-$profile" done -if "$compiler" "${common[@]}" -DESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS \ +if "$compiler" "${common[@]}" -DESPSOMFY_LILYGO_T_EMBED_CC1101 \ "${sources[@]}" -o "$scratch/wrong-target" > "$scratch/wrong-target.log" 2>&1; then echo 'LILYGO profile incorrectly accepted a non-S3 target' >&2 exit 1 @@ -32,7 +32,7 @@ python3 "$repo/tests/board-profile/extract-radio-setup.py" "$repo/src/Transceive for profile in generic lilygo; do flags=() if [[ "$profile" == lilygo ]]; then - flags=(-DESPSOMFY_LILYGO_T_EMBED_CC1101_PLUS -DCONFIG_IDF_TARGET_ESP32S3) + flags=(-DESPSOMFY_LILYGO_T_EMBED_CC1101 -DCONFIG_IDF_TARGET_ESP32S3) fi "$compiler" "${common[@]}" -I"$scratch" -I"$repo/lib/SmartRC-CC1101-Driver-Lib" "${flags[@]}" \ "$repo/tests/board-profile/radio-setup-test.cpp" "$repo/src/BoardProfile.cpp" \