Skip to content

Commit

Permalink
Circumvent quirk in Atmel Studio and other Windows tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeitmerg committed Jun 1, 2016
1 parent fc7cf06 commit 2b73cc5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -199,7 +199,11 @@ stub.o: added/stub.S
avr-gcc -c -Wa,-adhlns=stub.lst $(CFLAGS) $< -o $@

%.hex: %.elf
avr-objcopy -O ihex $< $@
# avr-objcopy might put a 0x03 record type into the resulting ihex
# file. Atmel Studio and other Windows tools might not like this.
# Circumvent by converting to binary first, then to ihex.
avr-objcopy -O binary $< $(<:.elf=.bin)
avr-objcopy -I binary -O ihex $(<:.elf=.bin) $@

.PHONY: clean dbg

Expand Down

0 comments on commit 2b73cc5

Please sign in to comment.