devicetree: s/devicetree_unfixed/devicetree_generated
Because the fixup files do not exist anymore, stop using "unfixed" naming in favor of "generated". Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
b2520b09a7
commit
d322adc66f
|
@ -10,7 +10,7 @@ include(generic_toolchain)
|
|||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/generated)
|
||||
|
||||
# Zephyr code can configure itself based on a KConfig'uration with the
|
||||
# header file autoconf.h. There exists an analogous file devicetree_unfixed.h
|
||||
# header file autoconf.h. There exists an analogous file devicetree_generated.h
|
||||
# that allows configuration based on information encoded in DTS.
|
||||
#
|
||||
# Here we call on dtc, the gcc preprocessor and
|
||||
|
@ -27,7 +27,7 @@ set(ZEPHYR_DTS ${PROJECT_BINARY_DIR}/zephyr.dts)
|
|||
# use of the devicetree by processes that run later on in the build,
|
||||
# and should not be made part of the documentation.
|
||||
set(EDT_PICKLE ${PROJECT_BINARY_DIR}/edt.pickle)
|
||||
set(DEVICETREE_UNFIXED_H ${PROJECT_BINARY_DIR}/include/generated/devicetree_unfixed.h)
|
||||
set(DEVICETREE_GENERATED_H ${PROJECT_BINARY_DIR}/include/generated/devicetree_generated.h)
|
||||
set(DEVICE_EXTERN_H ${PROJECT_BINARY_DIR}/include/generated/device_extern.h)
|
||||
set(DTS_POST_CPP ${PROJECT_BINARY_DIR}/zephyr.dts.pre)
|
||||
set(DTS_DEPS ${PROJECT_BINARY_DIR}/zephyr.dts.d)
|
||||
|
@ -160,7 +160,7 @@ if(SUPPORTS_DTS)
|
|||
endif()
|
||||
|
||||
# TODO: Cut down on CMake configuration time by avoiding
|
||||
# regeneration of devicetree_unfixed.h on every configure. How
|
||||
# regeneration of devicetree_generated.h on every configure. How
|
||||
# challenging is this? What are the dts dependencies? We run the
|
||||
# preprocessor, and it seems to be including all kinds of
|
||||
# directories with who-knows how many header files.
|
||||
|
@ -213,7 +213,7 @@ if(SUPPORTS_DTS)
|
|||
--dts ${DTS_POST_CPP}
|
||||
--dtc-flags '${EXTRA_DTC_FLAGS_RAW}'
|
||||
--bindings-dirs ${DTS_ROOT_BINDINGS}
|
||||
--header-out ${DEVICETREE_UNFIXED_H}.new
|
||||
--header-out ${DEVICETREE_GENERATED_H}.new
|
||||
--dts-out ${ZEPHYR_DTS}.new # for debugging and dtc
|
||||
--edt-pickle-out ${EDT_PICKLE}
|
||||
${EXTRA_GEN_DEFINES_ARGS}
|
||||
|
@ -229,12 +229,12 @@ if(SUPPORTS_DTS)
|
|||
message(FATAL_ERROR "gen_defines.py failed with return code: ${ret}")
|
||||
else()
|
||||
zephyr_file_copy(${ZEPHYR_DTS}.new ${ZEPHYR_DTS} ONLY_IF_DIFFERENT)
|
||||
zephyr_file_copy(${DEVICETREE_UNFIXED_H}.new ${DEVICETREE_UNFIXED_H} ONLY_IF_DIFFERENT)
|
||||
zephyr_file_copy(${DEVICETREE_GENERATED_H}.new ${DEVICETREE_GENERATED_H} ONLY_IF_DIFFERENT)
|
||||
file(WRITE ${DEVICE_EXTERN_H}
|
||||
"#error The contents of this file are now implemented directly in zephyr/device.h.")
|
||||
file(REMOVE ${ZEPHYR_DTS}.new ${DEVICETREE_UNFIXED_H}.new)
|
||||
file(REMOVE ${ZEPHYR_DTS}.new ${DEVICETREE_GENERATED_H}.new)
|
||||
message(STATUS "Generated zephyr.dts: ${ZEPHYR_DTS}")
|
||||
message(STATUS "Generated devicetree_unfixed.h: ${DEVICETREE_UNFIXED_H}")
|
||||
message(STATUS "Generated devicetree_generated.h: ${DEVICETREE_GENERATED_H}")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -308,5 +308,5 @@ if(SUPPORTS_DTS)
|
|||
endif(DTC)
|
||||
else()
|
||||
set(header_template ${ZEPHYR_BASE}/misc/generated/generated_header.template)
|
||||
zephyr_file_copy(${header_template} ${DEVICETREE_UNFIXED_H} ONLY_IF_DIFFERENT)
|
||||
zephyr_file_copy(${header_template} ${DEVICETREE_GENERATED_H} ONLY_IF_DIFFERENT)
|
||||
endif(SUPPORTS_DTS)
|
||||
|
|
4
doc/build/cmake/build-config-phase.svg
generated
vendored
4
doc/build/cmake/build-config-phase.svg
generated
vendored
|
@ -417,7 +417,7 @@
|
|||
<xhtml:font
|
||||
style="font-size: 16px ; font-family: "courier new" ; color: #000000 ; direction: ltr ; letter-spacing: 0px ; line-height: 120% ; opacity: 1">
|
||||
<xhtml:br />
|
||||
<xhtml:i>devicetree_unfixed.h<xhtml:br />
|
||||
<xhtml:i>devicetree_generated.h<xhtml:br />
|
||||
</xhtml:i>
|
||||
<xhtml:br />
|
||||
</xhtml:font>
|
||||
|
@ -432,7 +432,7 @@
|
|||
font-family="Helvetica"
|
||||
font-size="12px"
|
||||
text-anchor="middle"
|
||||
id="text76">devicetree_unfixed.h...</text>
|
||||
id="text76">devicetree_generated.h...</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path
|
||||
|
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
4
doc/build/cmake/index.rst
vendored
4
doc/build/cmake/index.rst
vendored
|
@ -88,12 +88,12 @@ Devicetree
|
|||
|
||||
The preprocessed devicetree sources are parsed by
|
||||
:zephyr_file:`gen_defines.py <scripts/dts/gen_defines.py>` to generate a
|
||||
:file:`build/zephyr/include/generated/devicetree_unfixed.h` header with
|
||||
:file:`build/zephyr/include/generated/devicetree_generated.h` header with
|
||||
preprocessor macros.
|
||||
|
||||
Source code should access preprocessor macros generated from devicetree by
|
||||
including the :zephyr_file:`devicetree.h <include/zephyr/devicetree.h>` header,
|
||||
which includes :file:`devicetree_unfixed.h`.
|
||||
which includes :file:`devicetree_generated.h`.
|
||||
|
||||
:file:`gen_defines.py` also writes the final devicetree to
|
||||
:file:`build/zephyr/zephyr.dts` in the build directory. This file's contents
|
||||
|
|
2
doc/build/dts/api-usage.rst
vendored
2
doc/build/dts/api-usage.rst
vendored
|
@ -376,7 +376,7 @@ Generated macros
|
|||
|
||||
While the :file:`devicetree.h` API is not generated, it does rely on a
|
||||
generated C header which is put into every application build directory:
|
||||
:ref:`devicetree_unfixed.h <dt-outputs>`. This file contains macros with
|
||||
:ref:`devicetree_generated.h <dt-outputs>`. This file contains macros with
|
||||
devicetree data.
|
||||
|
||||
These macros have tricky naming conventions which the :ref:`devicetree_api` API
|
||||
|
|
2
doc/build/dts/bindings.rst
vendored
2
doc/build/dts/bindings.rst
vendored
|
@ -72,7 +72,7 @@ What the build system does with bindings
|
|||
========================================
|
||||
|
||||
The build system uses bindings both to validate devicetree nodes and to convert
|
||||
the devicetree's contents into the generated :ref:`devicetree_unfixed.h
|
||||
the devicetree's contents into the generated :ref:`devicetree_generated.h
|
||||
<dt-outputs>` header file.
|
||||
|
||||
For example, the build system would use the above binding to check that the
|
||||
|
|
4
doc/build/dts/howtos.rst
vendored
4
doc/build/dts/howtos.rst
vendored
|
@ -42,11 +42,11 @@ CMake prints the input and output file locations like this:
|
|||
|
||||
-- Found BOARD.dts: .../zephyr/boards/arm/qemu_cortex_m3/qemu_cortex_m3.dts
|
||||
-- Generated zephyr.dts: .../zephyr/build/zephyr/zephyr.dts
|
||||
-- Generated devicetree_unfixed.h: .../zephyr/build/zephyr/include/generated/devicetree_unfixed.h
|
||||
-- Generated devicetree_generated.h: .../zephyr/build/zephyr/include/generated/devicetree_generated.h
|
||||
|
||||
The :file:`zephyr.dts` file is the final devicetree in DTS format.
|
||||
|
||||
The :file:`devicetree_unfixed.h` file is the corresponding generated header.
|
||||
The :file:`devicetree_generated.h` file is the corresponding generated header.
|
||||
|
||||
See :ref:`devicetree-in-out-files` for details about these files.
|
||||
|
||||
|
|
4
doc/build/dts/intro.rst
vendored
4
doc/build/dts/intro.rst
vendored
|
@ -636,9 +636,9 @@ These are created in your application's build directory.
|
|||
:file:`<build>/zephyr/zephyr.dts.pre`
|
||||
The preprocessed DTS source. This is an intermediate output file, which is
|
||||
input to :file:`gen_defines.py` and used to create :file:`zephyr.dts` and
|
||||
:file:`devicetree_unfixed.h`.
|
||||
:file:`devicetree_generated.h`.
|
||||
|
||||
:file:`<build>/zephyr/include/generated/devicetree_unfixed.h`
|
||||
:file:`<build>/zephyr/include/generated/devicetree_generated.h`
|
||||
The generated macros and additional comments describing the devicetree.
|
||||
Included by ``devicetree.h``.
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ typedef int16_t device_handle_t;
|
|||
* size.
|
||||
*
|
||||
* The ordinal used in this name can be mapped to the path by
|
||||
* examining zephyr/include/generated/devicetree_unfixed.h.
|
||||
* examining zephyr/include/generated/devicetree_generated.h.
|
||||
*/
|
||||
#define Z_DEVICE_DT_DEV_NAME(node_id) _CONCAT(dts_ord_, DT_DEP_ORD(node_id))
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef DEVICETREE_H
|
||||
#define DEVICETREE_H
|
||||
|
||||
#include <devicetree_unfixed.h>
|
||||
#include <devicetree_generated.h>
|
||||
|
||||
#include <zephyr/sys/util.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue