From 8be5da261991f27dd05e9d3efa3e2b169a3c8dce Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Wed, 10 Feb 2021 12:44:26 +0000 Subject: [PATCH] CMake: hardcode mem map name to "application" for Gcc Arm We need to fix linker script differently, it should not need APP_TARGET. This is a series of commits fixing APP_TARGET in our tree. We should not require it. The linker script preprocessing will be fixed differently. "application" prefix is temporary until we clean this up completely. --- tools/cmake/set_linker_script.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cmake/set_linker_script.cmake b/tools/cmake/set_linker_script.cmake index 0c2a38a6ef..acbae3d774 100644 --- a/tools/cmake/set_linker_script.cmake +++ b/tools/cmake/set_linker_script.cmake @@ -35,10 +35,11 @@ function(mbed_set_linker_script input_target raw_linker_script_path) set(LinkerScriptTarget ${input_target}LinkerScript) add_custom_target(${LinkerScriptTarget} DEPENDS ${LINKER_SCRIPT_PATH} VERBATIM) add_dependencies(${input_target} ${LinkerScriptTarget}) + # We hardcore mmemory file to "application" target_link_options(${input_target} INTERFACE "-T" "${LINKER_SCRIPT_PATH}" - "-Wl,-Map=${CMAKE_BINARY_DIR}/${APP_TARGET}${CMAKE_EXECUTABLE_SUFFIX}.map" + "-Wl,-Map=${CMAKE_BINARY_DIR}/application${CMAKE_EXECUTABLE_SUFFIX}.map" ) elseif(MBED_TOOLCHAIN STREQUAL "ARM") target_link_options(${input_target}