|
| 1 | +--- |
| 2 | +tags: smart home, matter, thread, zephyr, esp32, esp-idf, espressif, clanguru |
| 3 | +category: learning |
| 4 | +date: 2026-01-25 |
| 5 | +title: Smarty - Matter on ESP32 with Zephyr - Part 2 |
| 6 | +--- |
| 7 | + |
| 8 | +# Smarty - Matter on ESP32 with Zephyr - Part 2 |
| 9 | + |
| 10 | + |
| 11 | +```{admonition} Disclaimer |
| 12 | +:class: dropdown, warning |
| 13 | +
|
| 14 | +I am an engineer who knows his sh*t and prioritizes learning and innovation to getting certifications for tinkering with hardware. To follow along with the hardware portions of this guide, you should either: |
| 15 | +
|
| 16 | +- Be an engineer who also knows their sh*t. |
| 17 | +- Accept that you are responsible for your own components and safety. |
| 18 | +- Or just sit back and enjoy the read. |
| 19 | +
|
| 20 | +Reading is still learning, and you are more than welcome to just follow the code without touching a single wire. However, if you do decide to dive into the hardware and things go sideways, whether it's a fried ESP32, a tripped breaker, or a "spicy" encounter with mains power, I am not to be held accountable. I take no responsibility for your hardware, your home, or yourself. You are the captain of your own (hopefully well-insulated) ship. |
| 21 | +``` |
| 22 | + |
| 23 | +In the [previous part](smarty_p1.md) we built the `Hello World` Zephyr sample project and analyzed the build environment, dependencies and generated artifacts. |
| 24 | + |
| 25 | +Now I will setup a [yanga](https://github.com/cuinixam/yanga) project to build the same example. The goal is to configure in `yanga`: |
| 26 | + |
| 27 | +- the two external dependencies `zephyr` and `hal_espressif` |
| 28 | +- the toolchain `riscv64-zephyr-elf` |
| 29 | +- the platform `esp32h2_devkitm` |
| 30 | +- a `hello_world` component |
| 31 | + |
| 32 | +One shall be able to clone the repository and build it using `yanga` on both Ubuntu and Windows by running a single command. |
| 33 | +No extra steps to install toolchains or other dependencies. |
| 34 | + |
| 35 | + |
| 36 | +## PART 2: Hello World on ESP32-H2 with Yanga |
| 37 | + |
| 38 | +I followed the [yanga getting started guide](https://yanga.readthedocs.io/en/latest/getting_started/hello_yanga.html) to setup my project. This project has two variants, `English` and `German`, which greet the user in their language (e.g. "Hello World" or "Hallo Welt"). |
| 39 | + |
| 40 | +I pushed the code to github [cuinixam/smarty](https://github.com/cuinixam/smarty). |
| 41 | + |
| 42 | +Next steps are to add a new [platform](https://yanga.readthedocs.io/en/latest/features/platform.html) for ESP32-H2 and Zephyr. |
| 43 | + |
| 44 | +The new platform `esp32h2-zephyr` will: |
| 45 | + |
| 46 | +- use the `riscv64-zephyr-elf` toolchain |
| 47 | +- define two dependencies: `zephyr` and `hal_espressif` |
| 48 | + |
| 49 | +To be continued... |
0 commit comments