Re: per app device tree overlay

Kumar Gala

On Dec 15, 2017, at 3:33 AM, Wagenknecht, Daniel <> wrote:


I haven’t found any Documentation, how to make changes to a boards device tree from inside my app.
I’m neither really familiar with device tree or cmake, so looking thorugh the source didn’t help me much either.

Goal is to change zephyr console from usart1 to usart2 without touching the zephyr repo pulled from upstream. So changes should reside in my app directory alongside prj.conf etc.

The boards .dts file contains this:
chosen {
zephyr,console = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;

Can someone point me at to helpful information?

Daniel Wagenknecht
You should be able to use an device tree overlap file. There’s examples in ./samples/bluetooth/hci_uart. The overlay file needs to be named BOARD_NAME.overlay.

I opened up Issue #5408 in GitHub to work on improving the docs & sample for overlays.

- k

Join to automatically receive all group messages.