From 17bbf207e4ac180d6c6f5893cecceeb112102bc7 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Sat, 31 Oct 2026 16:15:00 +0100 Subject: [PATCH] Move zephyr fork configs to the nrf: and stm32: platform keys The fork's framework-zephyr rewrite drops the zephyr: key: variant and board stay on the platform key, the other options move under framework:. CI skips the Zephyr RTOS platform keys instead of zephyr:. --- .github/workflows/ci.yml | 4 +-- mcu-nrf-ant.yaml | 2 +- mcu-nrf-dk.yaml | 4 +-- mcu-stm32-blackpill.yaml | 70 ++++++++++++++++++++-------------------- mcu-stm32-nucleo.yaml | 62 +++++++++++++++++------------------ 5 files changed, 71 insertions(+), 71 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e10abc..f9a2351 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,8 @@ jobs: if: steps.changed.outputs.any_changed == 'true' run: | for f in ${{ steps.changed.outputs.all_changed_files }}; do - # zephyr: needs the esphomeplatformzephyr fork, upstream doesn't know it yet - if grep -q '^zephyr:' "$f"; then echo "Skipping $f (zephyr fork)"; continue; fi + # Zephyr RTOS platforms need the esphomeplatformzephyr fork, upstream doesn't know them yet + if grep -qE '^(nrf|stm32|nxp|renesas|silabs):' "$f"; then echo "Skipping $f (zephyr fork)"; continue; fi echo "Validating $f..." esphome config "$f" done diff --git a/mcu-nrf-ant.yaml b/mcu-nrf-ant.yaml index 9082ee7..33595c6 100644 --- a/mcu-nrf-ant.yaml +++ b/mcu-nrf-ant.yaml @@ -25,7 +25,7 @@ esphome: friendly_name: nRF ANT+ # needs the esphomeplatformzephyr fork (esphome-zephyr); RadiANT needs NCS -zephyr: +nrf: variant: NRF52 board: nrf52840dk/nrf52840 framework: diff --git a/mcu-nrf-dk.yaml b/mcu-nrf-dk.yaml index 7fc722d..c9c668b 100644 --- a/mcu-nrf-dk.yaml +++ b/mcu-nrf-dk.yaml @@ -18,8 +18,8 @@ esphome: name: mcu-nrf-dk friendly_name: nRF DK -# needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no zephyr: platform yet -zephyr: +# needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no nrf: platform yet +nrf: variant: NRF52 board: nrf52840dk/nrf52840 framework: diff --git a/mcu-stm32-blackpill.yaml b/mcu-stm32-blackpill.yaml index 9139622..366ab4e 100644 --- a/mcu-stm32-blackpill.yaml +++ b/mcu-stm32-blackpill.yaml @@ -8,47 +8,47 @@ esphome: name: mcu-stm32-blackpill friendly_name: STM32 Black Pill -# needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no zephyr: platform yet -zephyr: +# needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no stm32: platform yet +stm32: variant: STM32F4 board: blackpill_f401cc framework: type: zephyr - advanced: - runner: dfu-util - # no network, so no OTA: one image slot, MCUboot only verifies and boots it - single_slot: true - # NVS sector = flash page; needs >= 2 of them, so storage takes the two 16K pages (sectors 2-3) - kconfig_options: - SETTINGS_NVS_SECTOR_COUNT: 2 - # the stock table puts slot1 at 0x40000, past the end of the 256K flash; - # MCUboot in sectors 0-1, storage in 2-3, the app in 4-5. - # MCUboot needs the same table; the fork appends its own code-partition = &boot_partition after it - overlays: - app: &partitions | - &flash0 { - /delete-node/ partitions; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x00000000 DT_SIZE_K(32)>; - read-only; - }; - storage_partition: partition@8000 { - label = "storage"; - reg = <0x00008000 DT_SIZE_K(32)>; - }; - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 DT_SIZE_K(192)>; + advanced: + runner: dfu-util + # no network, so no OTA: one image slot, MCUboot only verifies and boots it + single_slot: true + # NVS sector = flash page; needs >= 2 of them, so storage takes the two 16K pages (sectors 2-3) + kconfig_options: + SETTINGS_NVS_SECTOR_COUNT: 2 + # the stock table puts slot1 at 0x40000, past the end of the 256K flash; + # MCUboot in sectors 0-1, storage in 2-3, the app in 4-5. + # MCUboot needs the same table; the fork appends its own code-partition = &boot_partition after it + overlays: + app: &partitions | + &flash0 { + /delete-node/ partitions; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 DT_SIZE_K(32)>; + read-only; + }; + storage_partition: partition@8000 { + label = "storage"; + reg = <0x00008000 DT_SIZE_K(32)>; + }; + slot0_partition: partition@10000 { + label = "image-0"; + reg = <0x00010000 DT_SIZE_K(192)>; + }; }; }; - }; - / { chosen { zephyr,code-partition = &slot0_partition; }; }; - mcuboot: *partitions + / { chosen { zephyr,code-partition = &slot0_partition; }; }; + mcuboot: *partitions logger: hardware_uart: USB_CDC diff --git a/mcu-stm32-nucleo.yaml b/mcu-stm32-nucleo.yaml index 5f56765..7149bd5 100644 --- a/mcu-stm32-nucleo.yaml +++ b/mcu-stm32-nucleo.yaml @@ -8,43 +8,43 @@ esphome: name: mcu-stm32-nucleo friendly_name: STM32 Nucleo -# needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no zephyr: platform yet -zephyr: +# needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no stm32: platform yet +stm32: variant: STM32F4 board: nucleo_f411re framework: type: zephyr - # no network, so no OTA: one image slot, MCUboot only verifies and boots it - single_slot: true - # NVS sector = flash page; needs >= 2 of them, so storage takes the two 16K pages (sectors 2-3) - kconfig_options: - SETTINGS_NVS_SECTOR_COUNT: 2 - # nucleo_f411re ships no partitions at all: MCUboot in sectors 0-1, storage in 2-3, the app in 4-7. - # MCUboot needs the same table; the fork appends its own code-partition = &boot_partition after it - overlays: - app: &partitions | - &flash0 { - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x00000000 DT_SIZE_K(32)>; - read-only; - }; - storage_partition: partition@8000 { - label = "storage"; - reg = <0x00008000 DT_SIZE_K(32)>; - }; - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 DT_SIZE_K(448)>; + # no network, so no OTA: one image slot, MCUboot only verifies and boots it + single_slot: true + # NVS sector = flash page; needs >= 2 of them, so storage takes the two 16K pages (sectors 2-3) + kconfig_options: + SETTINGS_NVS_SECTOR_COUNT: 2 + # nucleo_f411re ships no partitions at all: MCUboot in sectors 0-1, storage in 2-3, the app in 4-7. + # MCUboot needs the same table; the fork appends its own code-partition = &boot_partition after it + overlays: + app: &partitions | + &flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 DT_SIZE_K(32)>; + read-only; + }; + storage_partition: partition@8000 { + label = "storage"; + reg = <0x00008000 DT_SIZE_K(32)>; + }; + slot0_partition: partition@10000 { + label = "image-0"; + reg = <0x00010000 DT_SIZE_K(448)>; + }; }; }; - }; - / { chosen { zephyr,code-partition = &slot0_partition; }; }; - mcuboot: *partitions + / { chosen { zephyr,code-partition = &slot0_partition; }; }; + mcuboot: *partitions logger: