Announcement ESPHome running on Adafruit 52840 over Thread mesh networking using ZephyrRTOS

Ok, sorry for the delay again. I though I had flashing with out a debugger working for the adafruit board, but it turns out it was working by accident. I have properly fixed it now. Unfortunately I have used the afternoon I was going to write up the script to do it. I will try to get to it this evening, or tomorrow sometime.

As of now there is good support for:

and

(and the sense variety with extra sensors)

The nrf52840 dongle theoretically works, but I constantly need to fiddle with it to get it to work (it is really space constrained) and I think right now it is not in a working state, it needs a custom patch for the bootloader now. After I get the guide and script I will probably go back and revisit it.

@aaaaa I am sorry I forgot to answer your question about the battery powered display. Basically I would say right now it is acceptable (with a big battery) but not ideal. The way ESPHome works is it basically has an event loop that wakes up every so often to run check to see if there is work to do (or network traffic). I have adapted things so I can push this wakeup time frame through configuration, but things can get weird with HA if you go for too long. For now my display is pull only, in that it pulls data from HA and displays it, but it does not show up as a device itself. This all helps with the draw.

What I would really like to do though is get in an rework the scheduler a bit, to see if I can make use of the zephyr scheduler system hooking into the hardware interrupts for things like GPIO and timers so the thing stays in deep sleep for much longer.

I have begun an initial write up here. I have not tested it at all, and probably has typos and such, but I wanted to give everyone a heads up in case they wanted to start poking at it and working through things. I am happy for anyone to make issues and pull requests to that repo if they discover things or want to leave more info for others.

Thanks, NateLust. Started, but havenā€™t gone very far yet. Will advise.

Ran the script and got errors. Opened Issue #1.

Corrected errors and reran script. Further errors. See addition to Issue #1.

Hi Nate.

Have we lost you?

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.

1 Like

Iā€™ve attempted to get this building and running but it seems the issues Iā€™m hitting are due to this being primarily tested on Mac. Beyond correcting the mac-specific toolchain, it references a repository that isnā€™t publicly available- I assumed ā€œesphomeZephyrā€ was what was required, but the commit ID selected by the later git checkout is not present there. In the end, 16.0 was unsuccessful due to quad-enable-bit not being in some ā€œpropertiesā€ specification for in zephyr/dts. With earlier versions of zephyr, we hit a lack of blobs, which I couldnā€™t find mentioned in prior post. With the 15.2 toolchain you used, quad-enable-bit was still the blocking issue. Iā€™m hoping to get a dockerfile which successfully builds the whole sequence from an image, but Iā€™m currently blocked as I have no idea whatā€™s going on for most of this process to enable debugging it @NateLust. Iā€™ll note that these issues occur when compiling the finalized .yaml spec for the chip, and installer.sh technically finishes after the series of corrections mentioned above.

Hey yā€™all! Iā€™m joining onto this super late, this I mostly wanted to shout out everyone (to my understanding, basically just Nate Lust) who has worked on this project. I actually did a research project last summer involving building out a HA-based smart home system with custom components, and we wanted to use Thread but couldnā€™t see how to put it together without a crazy investment of development time; I wish I had found this thread then! I am so happy to see that there is still some recent activity here as well.

Iā€™m finishing up my spring semester in the next month or so, and I definitely plan on fully testing this system out then. I would love to also give back and help in any way I can. Not sure @NateLust if youā€™re looking to go full open source maintainer on this, and I totally understand if youā€™re not, but if you want any help building out testing, documentation, new features, working on specific issues, or anything really, give me a shout :slight_smile:

4 Likes

Just discovered this thread after looking to get an NRF52840 working on ESPHome. Is this still current or did the project move? Many thanks.

This is absolutely incredible!

Not seen @NateLust here in over a year, so check out this project by tomaszduda23 on GitHub:

@NateLust from comment on pull request sounds like youā€™re thinking of picking up this project again?

1 Like

@natelust what would motivate you to continue? Name your price.

1 Like