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
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 @@
 
     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()