diff --git a/doc/build/dts/intro-input-output.rst b/doc/build/dts/intro-input-output.rst index d069ae4660c..8da215ab800 100644 --- a/doc/build/dts/intro-input-output.rst +++ b/doc/build/dts/intro-input-output.rst @@ -112,6 +112,9 @@ this: list(APPEND EXTRA_DTC_FLAGS "-Wno-simple_bus_reg") +Shield directories can contain a file named :file:`pre_dt_shield.cmake` which +has the same functionality as the aforementioned :file:`pre_dt_board.cmake`. + .. _dt-outputs: Output files diff --git a/doc/hardware/porting/shields.rst b/doc/hardware/porting/shields.rst index 6f3dff1be5f..d93a4354063 100644 --- a/doc/hardware/porting/shields.rst +++ b/doc/hardware/porting/shields.rst @@ -19,7 +19,8 @@ under :zephyr_file:`boards/shields`: boards/shields/ ├── .overlay ├── Kconfig.shield - └── Kconfig.defconfig + ├── Kconfig.defconfig + └── pre_dt_shield.cmake These files provides shield configuration as follows: @@ -37,6 +38,9 @@ These files provides shield configuration as follows: shield configuration should be done by keeping in mind that features activation is application responsibility. +* **pre_dt_shield.cmake**: This optional file can be used to pass additional + arguments to the devicetree compiler ``dtc``. + Besides, in order to avoid name conflicts with devices that may be defined at board level, it is advised, specifically for shields devicetree descriptions, to provide a device nodelabel is the form _, for instance: