From 6440bba43e6842047c8b7ef1e48b786a3c1c2e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85strand?= Date: Mon, 29 Mar 2021 15:58:16 +0200 Subject: Output .map files for executable targets Generate the map file for each executable target added with the helper function ethosu_add_executable. Change-Id: Ib8b26508f7c439c8cd12b90061cc42eb771d9fd5 --- cmake/helpers.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/helpers.cmake b/cmake/helpers.cmake index 8676cd3..21d3a24 100644 --- a/cmake/helpers.cmake +++ b/cmake/helpers.cmake @@ -90,6 +90,12 @@ function(ethosu_add_executable target) ethosu_eval_link_options(${target}) + if (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") + target_link_options(${target} PRIVATE --map --list=${target}.map) + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_link_options(${target} PRIVATE -Xlinker -Map=${target}.map) + endif() + ethosu_add_binaries(${target}) endfunction() -- cgit v1.2.1