diff --git a/CMakeLists.txt b/CMakeLists.txt index f95c97ba3de..5087be083de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -802,6 +802,7 @@ if(CONFIG_HAS_DTS) --kernel $ --zephyr-base ${ZEPHYR_BASE} --start-symbol "$" + VERBATIM DEPENDS ${ZEPHYR_LINK_STAGE_EXECUTABLE} ) set_property(GLOBAL APPEND PROPERTY GENERATED_APP_SOURCE_FILES dev_handles.c) diff --git a/cmake/linker/armlink/target.cmake b/cmake/linker/armlink/target.cmake index 561faab5cb9..912a72353b9 100644 --- a/cmake/linker/armlink/target.cmake +++ b/cmake/linker/armlink/target.cmake @@ -1,13 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -# In order to ensure that the armlink symbol name is correctly passed to -# gen_handles.py, we must first ensure that it is properly escaped. -# For Python to work, the `$` must be passed as `\$` on command line. -# In order to pass a single `\` to command line it must first be escaped, that is `\\`. -# In ninja build files, a `$` is not accepted but must be passed as `$$`. -# CMake, Python and Ninja combined results in `\\$$` in order to pass a sing `\$` to Python, -# so `$$` thus becomes: `\\$$\\$$`. -set_property(TARGET linker PROPERTY devices_start_symbol "Image\\$$\\$$device\\$$\\$$Base") +set_property(TARGET linker PROPERTY devices_start_symbol "Image$$device$$Base") find_program(CMAKE_LINKER ${CROSS_COMPILE}armlink PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)