File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ endif()
136136
137137#
138138# Configures the application
139+ # Note, this function will be removed in the next revisions
139140#
140141function (mbed_configure_app_target target )
141142 # We need to generate a "response file" to pass to the C preprocessor because of path length
@@ -146,6 +147,16 @@ function(mbed_configure_app_target target)
146147 # using global properties.
147148 mbed_generate_options_for_linker(${target} LINKER_PREPROCESS_DEFINITIONS)
148149 set_property (GLOBAL PROPERTY COMPILE_DEFS_RESPONSE_FILE ${LINKER_PREPROCESS_DEFINITIONS} )
150+
151+ # Gcc Arm requires memap to be set with app name, equally to ARMClang
152+ # TODO: move this to toolchain and set properly
153+ if (MBED_TOOLCHAIN STREQUAL "GCC_ARM" )
154+ message (${target} )
155+ target_link_options (mbed-core
156+ INTERFACE
157+ "-Wl,-Map=${CMAKE_BINARY_DIR} /${target}${CMAKE_EXECUTABLE_SUFFIX} .map"
158+ )
159+ endif ()
149160endfunction ()
150161
151162#
Original file line number Diff line number Diff line change @@ -35,11 +35,9 @@ function(mbed_set_linker_script input_target raw_linker_script_path)
3535 set (LinkerScriptTarget ${input_target} LinkerScript)
3636 add_custom_target (${LinkerScriptTarget} DEPENDS ${LINKER_SCRIPT_PATH} VERBATIM )
3737 add_dependencies (${input_target} ${LinkerScriptTarget} )
38- # We hardcore mmemory file to "application"
3938 target_link_options (${input_target}
4039 INTERFACE
41- "-T" "${LINKER_SCRIPT_PATH} "
42- "-Wl,-Map=${CMAKE_BINARY_DIR} /application${CMAKE_EXECUTABLE_SUFFIX} .map"
40+ "-T" "${LINKER_SCRIPT_PATH} "
4341 )
4442 elseif (MBED_TOOLCHAIN STREQUAL "ARM" )
4543 target_link_options (${input_target}
You can’t perform that action at this time.
0 commit comments