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)
141141            WORKING_DIRECTORY  ${CMAKE_CURRENT_SOURCE_DIR} 
142142            BYPRODUCTS  "${CMAKE_BINARY_DIR} /${target} .link_script.ld" 
143143        )
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+         )
144149    elseif (MBED_TOOLCHAIN STREQUAL  "ARM" )
145150        set (CMAKE_PRE_BUILD_COMMAND COMMAND  "" )
146151        target_link_options (mbed-core
147152            INTERFACE 
148153                "--scatter=${mbed_target_linker_script} " 
149154                "--predefine=${_linker_preprocess_definitions} " 
155+                 "--map" 
150156        )
151157    endif ()
152158    add_custom_command (
Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ function(mbed_set_toolchain_options target)
3939            $<$<COMPILE_LANGUAGE:ASM>:--target =arm-arm-none-eabi -masm=auto>
4040    )
4141
42-     list (APPEND  link_options
43-         "--map" 
44-     )
45- 
4642    # Add linking time preprocessor macro for TFM targets 
4743    if (MBED_CPU_CORE MATCHES  "\- NS$" )
4844        list (APPEND  link_options
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ function(mbed_set_toolchain_options target)
1919            "-lnosys" 
2020        "-Wl,--end-group" 
2121        "-specs=nosys.specs" 
22-         "-T"  "${CMAKE_BINARY_DIR} /${APP_TARGET} .link_script.ld" 
23-         "-Wl,-Map=${CMAKE_BINARY_DIR} /${APP_TARGET} .map" 
2422        "-Wl,--cref" 
2523    )
2624
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments