File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,18 @@ function(mbed_set_mbed_target_linker_script target)
141
141
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
142
142
BYPRODUCTS "${CMAKE_BINARY_DIR} /${target} .link_script.ld"
143
143
)
144
+ target_link_options (mbed-core
145
+ INTERFACE
146
+ "-T" "${CMAKE_BINARY_DIR} /${target} .link_script.ld"
147
+ "-Wl,-Map=${CMAKE_BINARY_DIR} /${target} .map"
148
+ )
144
149
elseif (MBED_TOOLCHAIN STREQUAL "ARM" )
145
150
set (CMAKE_PRE_BUILD_COMMAND COMMAND "" )
146
151
target_link_options (mbed-core
147
152
INTERFACE
148
153
"--scatter=${mbed_target_linker_script} "
149
154
"--predefine=${_linker_preprocess_definitions} "
155
+ "--map"
150
156
)
151
157
endif ()
152
158
add_custom_command (
Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ function(mbed_set_toolchain_options target)
39
39
$< $< COMPILE_LANGUAGE:ASM> :--target=arm-arm-none-eabi -masm=auto>
40
40
)
41
41
42
- list (APPEND link_options
43
- "--map"
44
- )
45
-
46
42
# Add linking time preprocessor macro for TFM targets
47
43
if (MBED_CPU_CORE MATCHES "\- NS$" )
48
44
list (APPEND link_options
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ function(mbed_set_toolchain_options target)
19
19
"-lnosys"
20
20
"-Wl,--end-group"
21
21
"-specs=nosys.specs"
22
- "-T" "${CMAKE_BINARY_DIR} /${APP_TARGET} .link_script.ld"
23
- "-Wl,-Map=${CMAKE_BINARY_DIR} /${APP_TARGET} .map"
24
22
"-Wl,--cref"
25
23
)
26
24
You can’t perform that action at this time.
0 commit comments