mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #15117 from JojoS62/fix-memap-diff
CLI2: copy mapfile for diff statisticspull/15141/head
commit
2cd6c70c94
|
@ -58,8 +58,6 @@ function(mbed_generate_map_file target)
|
||||||
COMMAND ${Python3_EXECUTABLE} ${mbed-os_SOURCE_DIR}/tools/memap.py -t ${MBED_TOOLCHAIN} ${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map
|
COMMAND ${Python3_EXECUTABLE} ${mbed-os_SOURCE_DIR}/tools/memap.py -t ${MBED_TOOLCHAIN} ${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT
|
|
||||||
"Displaying memory map for ${target}"
|
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
@ -87,6 +85,18 @@ 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
|
# executable suffix for all toolchains as CMake hardcodes the name of the
|
||||||
# diagnostic output file for some toolchains.
|
# diagnostic output file for some toolchains.
|
||||||
|
|
||||||
|
# copy mapfile .map to .map.old for ram/rom statistics diff in memap.py
|
||||||
|
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET
|
||||||
|
${target}
|
||||||
|
PRE_BUILD
|
||||||
|
COMMAND
|
||||||
|
${CMAKE_COMMAND} -E rename "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map" "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map.old"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
mbed_configure_memory_map(${target} "${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_validate_application_profile(${target})
|
||||||
mbed_generate_bin_hex(${target})
|
mbed_generate_bin_hex(${target})
|
||||||
|
|
Loading…
Reference in New Issue