Use cmake's binutils paths for custom targets
Again, this fixes the build when multiple versions of binutils/avr toolchains are avalable.pull/21/head
parent
f30c009304
commit
070552200a
|
|
@ -166,11 +166,15 @@ if(CMAKE_CROSSCOMPILING)
|
||||||
|
|
||||||
# produce ASM listing
|
# produce ASM listing
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET firmware POST_BUILD COMMAND avr-objdump ARGS -CSd firmware > firmware.asm
|
TARGET firmware POST_BUILD
|
||||||
)
|
COMMAND ${CMAKE_OBJDUMP} -CSd firmware > firmware.asm
|
||||||
|
)
|
||||||
|
|
||||||
# inform about the firmware's size in terminal
|
# inform about the firmware's size in terminal
|
||||||
add_custom_command(TARGET firmware POST_BUILD COMMAND avr-size ARGS -C --mcu=atmega32u4 firmware)
|
add_custom_command(
|
||||||
|
TARGET firmware POST_BUILD
|
||||||
|
COMMAND ${CMAKE_SIZE_UTIL} -C --mcu=atmega32u4 firmware
|
||||||
|
)
|
||||||
report_size(firmware)
|
report_size(firmware)
|
||||||
|
|
||||||
# generate linker map file
|
# generate linker map file
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue