Skip to content

Invoking IAR binary utilities

Felipe Torrezan edited this page Nov 26, 2024 · 11 revisions

Starting from CMake v3.31.0, it is possible to invoke the following IAR binary utilities from within a CMake project.

Variable Description
CMAKE_IAR_ELFDUMP IAR ELF Dumper
CMAKE_IAR_ELFTOOL IAR ELF Tool
CMAKE_IAR_EXE2OBJ IAR ELF Exe to Object Tool
CMAKE_IAR_OBJMANIP IAR Object File Manipulator
CMAKE_IAR_SYMEXPORT IAR Absolute Symbol Exporter

Important

Please notice that these references expects their respective tools being available in the installed toolchain.

Example

add_custom_command(TARGET myTarget POST_BUILD 
                   COMMAND ${CMAKE_IAR_ELFTOOL} --silent --ihex $<TARGET_FILE:myTarget> myTarget.hex)
Clone this wiki locally