Adapting to Changing Hardware: Devicetree Overlays
Introduction We showed off the "Devicetree" in the Zephyr Project RTOS in the earlier blogs. We can tell the OS about the hardware in our system thanks to the Devicetree. Zephyr supports a large number of well-known System-On-Chips (SoCs) and related development boards, as was evident in the first blog post. For every board and associated SoC, Zephyr already has a Devicetree. A development board with the SoC that will be utilized in the finished product design is the first thing I aim for when I start writing firmware for a new project. That being said, the development board's configuration—including pinouts and other peripheral features—usually differs from the final design. I use "Devicetree overlays," a Zephyr-supported method of overriding an existing Devicetree's configuration, to address these discrepancies. I'll walk through how to use a Devicetree overlay in this blog post. I2C On A Nordic nRF52840 An example is the most effective w...