aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorTTornblom <thomas.tornblom@iar.com>2020-06-22 08:44:41 +0200
committerKen Liu <ken.liu@arm.com>2020-07-31 01:25:44 +0000
commitefc7f29fff0ee406a8e6cc0ae9fe56b8e04c5ae7 (patch)
tree7e5a7ba4fef1cff487170279c90057c3035ab704 /cmake
parent4ac167e7769c0fd079854b2b3c7cb30a73fd78cb (diff)
downloadtrusted-firmware-m-efc7f29fff0ee406a8e6cc0ae9fe56b8e04c5ae7.tar.gz
Build: Create hex and elf files of executables (IAR)
Implements 762415cf for IAR Signed-off-by: TTornblom <thomas.tornblom@iar.com> Change-Id: Ib72af40eed27b8030a3a8b4d30e420f920292cc2
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Common/CompilerIarArmCommon.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/Common/CompilerIarArmCommon.cmake b/cmake/Common/CompilerIarArmCommon.cmake
index 78cbdd7bf..002ead024 100644
--- a/cmake/Common/CompilerIarArmCommon.cmake
+++ b/cmake/Common/CompilerIarArmCommon.cmake
@@ -185,6 +185,14 @@ function(compiler_generate_binary_output TARGET)
add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_IARARM_IELFTOOL} ARGS --silent --bin $<TARGET_FILE:${TARGET}> $<TARGET_FILE_DIR:${TARGET}>/${TARGET}.bin)
endfunction()
+function(compiler_generate_hex_output TARGET)
+ add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_IARARM_IELFTOOL} ARGS --silent --ihex $<TARGET_FILE:${TARGET}> $<TARGET_FILE_DIR:${TARGET}>/${TARGET}.hex)
+endfunction()
+
+function(compiler_generate_elf_output TARGET)
+ add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_IARARM_IELFTOOL} ARGS --silent $<TARGET_FILE:${TARGET}> $<TARGET_FILE_DIR:${TARGET}>/${TARGET}.elf)
+endfunction()
+
# Function for creating a new target that preprocesses a .c file
#INPUTS:
# SRC - (mandatory) - file to be preprocessed