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#
@@ -231,6 +216,10 @@ endfunction()
231216# Set post build operations
232217#
233218function (mbed_set_post_build target )
219+ # The mapfile name includes the top-level target name and the
220+ # executable suffix for all toolchains as CMake hardcodes the name of the
221+ # diagnostic output file for some toolchains.
222+ mbed_configure_memory_map(mbed-core "${CMAKE_CURRENT_BINARY_DIR} /${target}${CMAKE_EXECUTABLE_SUFFIX} .map" )
234223 mbed_validate_application_profile(${target} )
235224 mbed_generate_bin_hex(${target} )
236225
@@ -247,3 +236,7 @@ if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
247236 set (CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "" )
248237 endif ()
249238endif ()
239+
240+ # TODO: Remove once all example applications have removed it
241+ function (mbed_configure_app_target target )
242+ endfunction ()
0 commit comments