Merge pull request #13985 from 0xc0170/cmake-fix-13983

CMake: fix memory map generation
pull/14001/head
Martin Kojtal 2020-12-03 09:00:46 +00:00 committed by GitHub
commit a847ab3708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -141,12 +141,18 @@ function(mbed_set_mbed_target_linker_script target)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
BYPRODUCTS "${CMAKE_BINARY_DIR}/${target}.link_script.ld"
)
target_link_options(mbed-core
INTERFACE
"-T" "${CMAKE_BINARY_DIR}/${target}.link_script.ld"
"-Wl,-Map=${CMAKE_BINARY_DIR}/${target}.map"
)
elseif(MBED_TOOLCHAIN STREQUAL "ARM")
set(CMAKE_PRE_BUILD_COMMAND COMMAND "")
target_link_options(mbed-core
INTERFACE
"--scatter=${mbed_target_linker_script}"
"--predefine=${_linker_preprocess_definitions}"
"--map"
)
endif()
add_custom_command(

View File

@ -39,10 +39,6 @@ function(mbed_set_toolchain_options target)
$<$<COMPILE_LANGUAGE:ASM>:--target=arm-arm-none-eabi -masm=auto>
)
list(APPEND link_options
"--map"
)
# Add linking time preprocessor macro for TFM targets
if(MBED_CPU_CORE MATCHES "\-NS$")
list(APPEND link_options

View File

@ -19,8 +19,6 @@ function(mbed_set_toolchain_options target)
"-lnosys"
"-Wl,--end-group"
"-specs=nosys.specs"
"-T" "${CMAKE_BINARY_DIR}/${APP_TARGET}.link_script.ld"
"-Wl,-Map=${CMAKE_BINARY_DIR}/${APP_TARGET}.map"
"-Wl,--cref"
)