1- # Copyright (c) 2020 ARM Limited. All rights reserved.
1+ # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22# SPDX-License-Identifier: Apache-2.0
33
44# This is the boilerplate for Mbed OS
@@ -139,21 +139,6 @@ string(PREPEND MBED_TARGET_CONVERTED "mbed-")
139139
140140target_link_libraries (mbed-core INTERFACE ${MBED_TARGET_CONVERTED} )
141141
142- #
143- # Configures the application
144- # Note, this function will be removed in the next revisions
145- #
146- function (mbed_configure_app_target target )
147- # Gcc Arm requires memap to be set with app name, equally to ARMClang
148- # TODO: move this to toolchain and set properly
149- if (MBED_TOOLCHAIN STREQUAL "GCC_ARM" )
150- target_link_options (mbed-core
151- INTERFACE
152- "-Wl,-Map=${CMAKE_CURRENT_BINARY_DIR} /${target}${CMAKE_EXECUTABLE_SUFFIX} .map"
153- )
154- endif ()
155- endfunction ()
156-
157142#
158143# Converts output file of `target` to binary file and to Intel HEX file.
159144#
@@ -233,6 +218,10 @@ endfunction()
233218# Set post build operations
234219#
235220function (mbed_set_post_build target )
221+ # The mapfile name includes the top-level target name and the
222+ # executable suffix for all toolchains as CMake hardcodes the name of the
223+ # diagnostic output file for some toolchains.
224+ mbed_configure_memory_map(mbed-core "${CMAKE_CURRENT_BINARY_DIR} /${target}${CMAKE_EXECUTABLE_SUFFIX} .map" )
236225 mbed_validate_application_profile(${target} )
237226 mbed_generate_bin_hex(${target} )
238227
@@ -249,3 +238,7 @@ if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
249238 set (CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "" )
250239 endif ()
251240endif ()
241+
242+ # TODO: Remove once all example applications have removed it
243+ function (mbed_configure_app_target target )
244+ endfunction ()
0 commit comments