From 5a11af3ce2707c22a41ea5a989e19c687c921cd3 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 3 Feb 2021 14:10:43 -0600 Subject: [PATCH] cmake: dts: Fix passing multiple EXTRA_DTC_FLAGS to gen_defines.py Since EXTRA_DTC_FLAGS will be ';' seperated if we pass that as is if there are multiple items in the list we'll get an error. Sanitize EXTRA_DTC_FLAGS by replacing ';' with ' ' before we call gen_defines.py Signed-off-by: Kumar Gala --- cmake/dts.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/dts.cmake b/cmake/dts.cmake index 18d7ef4a27..91f4a6aa92 100644 --- a/cmake/dts.cmake +++ b/cmake/dts.cmake @@ -210,9 +210,10 @@ if(SUPPORTS_DTS) # Run gen_defines.py to create a header file, zephyr.dts, and edt.pickle. # + string(REPLACE ";" " " EXTRA_DTC_FLAGS_RAW "${EXTRA_DTC_FLAGS}") set(CMD_EXTRACT ${PYTHON_EXECUTABLE} ${GEN_DEFINES_SCRIPT} --dts ${BOARD}.dts.pre.tmp - --dtc-flags '${EXTRA_DTC_FLAGS}' + --dtc-flags '${EXTRA_DTC_FLAGS_RAW}' --bindings-dirs ${DTS_ROOT_BINDINGS} --header-out ${DEVICETREE_UNFIXED_H} --device-header-out ${DEVICE_EXTERN_H}