From d17bc0fc4bb057378fadf3f9feb0de1df60d611a Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Mon, 11 Jan 2021 13:41:18 +0100 Subject: :sparkles: Add working bluetooth receiver --- utils/cmake/toolchains/AVR_GCC/bin-generator.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 utils/cmake/toolchains/AVR_GCC/bin-generator.cmake (limited to 'utils/cmake/toolchains/AVR_GCC/bin-generator.cmake') diff --git a/utils/cmake/toolchains/AVR_GCC/bin-generator.cmake b/utils/cmake/toolchains/AVR_GCC/bin-generator.cmake new file mode 100644 index 0000000..a3a1c01 --- /dev/null +++ b/utils/cmake/toolchains/AVR_GCC/bin-generator.cmake @@ -0,0 +1,9 @@ +add_custom_command( + OUTPUT "${PROJECT_SOURCE_DIR}/${codal.output_folder}/${device.device}.bin" + COMMAND "${AVR_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") -- cgit v1.2.3