cmake: DTS post-processing of ELF file depends on CONFIG_HAS_DTS
Only run gen_handles.py if CONFIG_HAS_DTS is set. This enables vendors without device tree implementations to compile without the generated dependencies. Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
parent
8e9884f937
commit
a846e726b5
1 changed files with 15 additions and 13 deletions
|
@ -768,19 +768,21 @@ if(CONFIG_GEN_ISR_TABLES)
|
||||||
set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES isr_tables.c)
|
set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES isr_tables.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# dev_handles.c is generated from ${ZEPHYR_PREBUILT_EXECUTABLE} by
|
if(CONFIG_HAS_DTS)
|
||||||
# gen_handles.py
|
# dev_handles.c is generated from ${ZEPHYR_PREBUILT_EXECUTABLE} by
|
||||||
add_custom_command(
|
# gen_handles.py
|
||||||
OUTPUT dev_handles.c
|
add_custom_command(
|
||||||
COMMAND
|
OUTPUT dev_handles.c
|
||||||
${PYTHON_EXECUTABLE}
|
COMMAND
|
||||||
${ZEPHYR_BASE}/scripts/gen_handles.py
|
${PYTHON_EXECUTABLE}
|
||||||
--output-source dev_handles.c
|
${ZEPHYR_BASE}/scripts/gen_handles.py
|
||||||
--kernel $<TARGET_FILE:${ZEPHYR_PREBUILT_EXECUTABLE}>
|
--output-source dev_handles.c
|
||||||
--zephyr-base ${ZEPHYR_BASE}
|
--kernel $<TARGET_FILE:${ZEPHYR_PREBUILT_EXECUTABLE}>
|
||||||
DEPENDS ${ZEPHYR_PREBUILT_EXECUTABLE}
|
--zephyr-base ${ZEPHYR_BASE}
|
||||||
)
|
DEPENDS ${ZEPHYR_PREBUILT_EXECUTABLE}
|
||||||
set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES dev_handles.c)
|
)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES dev_handles.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_CODE_DATA_RELOCATION)
|
if(CONFIG_CODE_DATA_RELOCATION)
|
||||||
# @Intent: Linker script to relocate .text, data and .bss sections
|
# @Intent: Linker script to relocate .text, data and .bss sections
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue