aboutsummaryrefslogtreecommitdiff
path: root/utils/cmake/toolchains/XTENSA_GCC/bin-generator.cmake
blob: 74fdb35a3f9c8fe5928278ef8491a3a85e52e788 (plain) (blame)
1
2
3
4
5
6
7
8
9
add_custom_command(
    OUTPUT "${PROJECT_SOURCE_DIR}/${codal.output_folder}/${device.device}.bin"
    COMMAND "${XTENSA_OBJCOPY}" -O binary "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${device.device}" "${PROJECT_SOURCE_DIR}/${codal.output_folder}/${device.device}.bin"
    DEPENDS  ${device.device}
    COMMENT "converting to bin file."
)

#specify a dependency on the elf file so that bin is automatically rebuilt when elf is changed.
add_custom_target(${device.device}_bin ALL DEPENDS "${PROJECT_SOURCE_DIR}/${codal.output_folder}/${device.device}.bin")