Hi Nate,
I finally came around to try this fantastic project of yours!
I got the installation to work and was able to start the compiling of the provided example yaml.
But with either of your supported boards defined I run into building errors:
Adafruit:
[138/297] Building C object CMakeFiles/app.dir/main.c.obj
FAILED: CMakeFiles/app.dir/main.c.obj
ccache /opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52840_XXAA -D__PROGRAM_START -D__ZEPHYR__=1 -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/targets -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/include -IESPHomeZephyr/zephyrproject/zephyr/include -IESPHomeZephyr/.esphome/build/zephyrboard/boot/build/zephyr/include/generated -IESPHomeZephyr/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -IESPHomeZephyr/zephyrproject/zephyr/soc/arm/nordic_nrf/common/. -IESPHomeZephyr/zephyrproject/zephyr/subsys/usb/device -IESPHomeZephyr/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -IESPHomeZephyr/zephyrproject/modules/hal/nordic/nrfx -IESPHomeZephyr/zephyrproject/modules/hal/nordic/nrfx/drivers/include -IESPHomeZephyr/zephyrproject/modules/hal/nordic/nrfx/mdk -IESPHomeZephyr/zephyrproject/zephyr/modules/hal_nordic/nrfx/. -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/boot_serial/include -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src -IESPHomeZephyr/zephyrproject/modules/crypto/mbedtls/include -IESPHomeZephyr/zephyrproject/modules/crypto/mbedtls/library -IESPHomeZephyr/zephyrproject/zephyr/modules/mbedtls/configs -IESPHomeZephyr/zephyrproject/zephyr/modules/mbedtls/include -IESPHomeZephyr/zephyrproject/bootloader/mcuboot/boot/bootutil/zephyr/.. -IESPHomeZephyr/zephyrproject/bootloader/mcuboot/boot/bootutil/zephyr/../include -IESPHomeZephyr/zephyrproject/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem ESPHomeZephyr/zephyrproject/zephyr/lib/libc/minimal/include -isystem /opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem /opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -fno-strict-aliasing -Os -imacros ESPHomeZephyr/.esphome/build/zephyrboard/boot/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/arm-zephyr-eabi -imacros ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=ESPHomeZephyr/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=ESPHomeZephyr/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/main.c.obj -MF CMakeFiles/app.dir/main.c.obj.d -o CMakeFiles/app.dir/main.c.obj -c ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c:140:2: error: #error "Unsupported board: led0 devicetree alias is not defined"
140 | #error "Unsupported board: led0 devicetree alias is not defined"
| ^~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c: In function 'led_init':
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c:145:26: error: 'led0' undeclared (first use in this function)
145 | if (!device_is_ready(led0.port)) {
| ^~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c:145:26: note: each undeclared identifier is reported only once for each function it appears in
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c: In function 'main':
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/main.c:532:26: error: 'led0' undeclared (first use in this function)
532 | gpio_pin_set_dt(&led0, 1);
| ^~~~
[147/297] Building C object zephyr/dri...ers__usb__device.dir/usb_dc_nrfx.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build ESPHomeZephyr/.esphome/build/zephyrboard/boot/build
Xiao:
[169/306] Building C object CMakeFiles/app.dirESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c.obj
FAILED: CMakeFiles/app.dirESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c.obj
ccache /opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52840_XXAA -D__PROGRAM_START -D__ZEPHYR__=1 -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/targets -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/include -IESPHomeZephyr/zephyrproject/zephyr/include -IESPHomeZephyr/.esphome/build/zephyrboard/boot/build/zephyr/include/generated -IESPHomeZephyr/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf52 -IESPHomeZephyr/zephyrproject/zephyr/soc/arm/nordic_nrf/common/. -IESPHomeZephyr/zephyrproject/zephyr/subsys/usb/device -IESPHomeZephyr/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -IESPHomeZephyr/zephyrproject/modules/hal/nordic/nrfx -IESPHomeZephyr/zephyrproject/modules/hal/nordic/nrfx/drivers/include -IESPHomeZephyr/zephyrproject/modules/hal/nordic/nrfx/mdk -IESPHomeZephyr/zephyrproject/zephyr/modules/hal_nordic/nrfx/. -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/boot_serial/include -IESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src -IESPHomeZephyr/zephyrproject/modules/crypto/mbedtls/include -IESPHomeZephyr/zephyrproject/modules/crypto/mbedtls/library -IESPHomeZephyr/zephyrproject/zephyr/modules/mbedtls/configs -IESPHomeZephyr/zephyrproject/zephyr/modules/mbedtls/include -IESPHomeZephyr/zephyrproject/bootloader/mcuboot/boot/bootutil/zephyr/.. -IESPHomeZephyr/zephyrproject/bootloader/mcuboot/boot/bootutil/zephyr/../include -IESPHomeZephyr/zephyrproject/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem ESPHomeZephyr/zephyrproject/zephyr/lib/libc/minimal/include -isystem /opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem /opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -fno-strict-aliasing -Og -imacros ESPHomeZephyr/.esphome/build/zephyrboard/boot/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/opt/zephyr-sdk-0.15.2/arm-zephyr-eabi/arm-zephyr-eabi -imacros ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=ESPHomeZephyr/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=ESPHomeZephyr/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dirESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c.obj -MF CMakeFiles/app.dirESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c.obj.d -o CMakeFiles/app.dirESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c.obj -c ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c
In file included from ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include/mcuboot_config/mcuboot_config.h:12,
from ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/include/bootutil/fault_injection_hardening.h:57,
from ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/include/bootutil/bootutil.h:32,
from ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c:24:
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c: In function 'swap_status_source':
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:36: error: 'DT_N_NODELABEL_slot0_partition_PARTITION_ID' undeclared (first use in this function)
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:3901:24: note: in definition of macro 'DT_CAT'
3901 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:35: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:29: note: in expansion of macro 'DT_CAT'
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:57: note: in expansion of macro 'DT_NODELABEL'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include/sysflash/sysflash.h:18:42: note: in expansion of macro 'FIXED_PARTITION_ID'
18 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c:278:37: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
278 | rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_PRIMARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:36: note: each undeclared identifier is reported only once for each function it appears in
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:3901:24: note: in definition of macro 'DT_CAT'
3901 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:35: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:29: note: in expansion of macro 'DT_CAT'
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:57: note: in expansion of macro 'DT_NODELABEL'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include/sysflash/sysflash.h:18:42: note: in expansion of macro 'FIXED_PARTITION_ID'
18 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c:278:37: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
278 | rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_PRIMARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:36: error: 'DT_N_NODELABEL_slot1_partition_PARTITION_ID' undeclared (first use in this function)
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:3901:24: note: in definition of macro 'DT_CAT'
3901 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:35: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:29: note: in expansion of macro 'DT_CAT'
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:57: note: in expansion of macro 'DT_NODELABEL'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include/sysflash/sysflash.h:21:42: note: in expansion of macro 'FIXED_PARTITION_ID'
21 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c:284:37: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
284 | rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SECONDARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c: In function 'swap_run':
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:36: error: 'DT_N_NODELABEL_slot0_partition_PARTITION_ID' undeclared (first use in this function)
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:3901:24: note: in definition of macro 'DT_CAT'
3901 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:35: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:29: note: in expansion of macro 'DT_CAT'
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:57: note: in expansion of macro 'DT_NODELABEL'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include/sysflash/sysflash.h:18:42: note: in expansion of macro 'FIXED_PARTITION_ID'
18 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c:495:26: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
495 | rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY(image_index), &fap_pri);
| ^~~~~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:36: error: 'DT_N_NODELABEL_slot1_partition_PARTITION_ID' undeclared (first use in this function)
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:3901:24: note: in definition of macro 'DT_CAT'
3901 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:35: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~~~~~~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/devicetree.h:190:29: note: in expansion of macro 'DT_CAT'
190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
ESPHomeZephyr/zephyrproject/zephyr/include/zephyr/storage/flash_map.h:290:57: note: in expansion of macro 'DT_NODELABEL'
290 | #define FIXED_PARTITION_ID(label) DT_FIXED_PARTITION_ID(DT_NODELABEL(label))
| ^~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/zephyr/include/sysflash/sysflash.h:21:42: note: in expansion of macro 'FIXED_PARTITION_ID'
21 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~~~~
ESPHomeZephyr/.esphome/build/zephyrboard/boot/mcuboot/boot/bootutil/src/swap_move.c:498:26: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
498 | rc = flash_area_open(FLASH_AREA_IMAGE_SECONDARY(image_index), &fap_sec);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build ESPHomeZephyr/.esphome/build/zephyrboard/boot/build
On the Xiao build are more errors before this final one.
If you want me to open this as an issue on the github page, please let me know.
I would love to see this project get off the ground and even get upstream in ESPHome.
If there is something I can help you with, please let me know.