mirror of https://github.com/ARMmbed/mbed-os.git
Configure memory map per target to allow multiple add_executable
parent
63eeb93a5f
commit
fd7ea7305f
|
@ -218,10 +218,10 @@ endfunction()
|
|||
# Set post build operations
|
||||
#
|
||||
function(mbed_set_post_build target)
|
||||
# The mapfile name includes the top-level target name and the
|
||||
# The mapfile name includes the top-level target name and the
|
||||
# executable suffix for all toolchains as CMake hardcodes the name of the
|
||||
# diagnostic output file for some toolchains.
|
||||
mbed_configure_memory_map(mbed-core "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map")
|
||||
mbed_configure_memory_map(${target} "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map")
|
||||
mbed_validate_application_profile(${target})
|
||||
mbed_generate_bin_hex(${target})
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ endfunction()
|
|||
# See https://gitlab.kitware.com/cmake/cmake/-/issues/21538
|
||||
function(mbed_configure_memory_map target mapfile)
|
||||
target_link_options(${target}
|
||||
INTERFACE
|
||||
PRIVATE
|
||||
"--map"
|
||||
"--list=${mapfile}"
|
||||
)
|
||||
|
|
|
@ -88,7 +88,7 @@ endfunction()
|
|||
# Add linker flags to generate a mapfile with a given name
|
||||
function(mbed_configure_memory_map target mapfile)
|
||||
target_link_options(${target}
|
||||
INTERFACE
|
||||
PRIVATE
|
||||
"-Wl,-Map=${mapfile}"
|
||||
)
|
||||
endfunction()
|
||||
|
|
Loading…
Reference in New Issue