diff options
author | rodri <rgl@antares-labs.eu> | 2021-06-05 11:10:23 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2021-06-05 11:10:23 +0000 |
commit | edf5f145013aa28ffbc7f19f874cd489a92f8449 (patch) | |
tree | 05a7dfdae1b63a79bdfbb1fab84af35a51b5b99c /asm/blinkdelay2/makefile | |
download | avrtoys-edf5f145013aa28ffbc7f19f874cd489a92f8449.tar.gz avrtoys-edf5f145013aa28ffbc7f19f874cd489a92f8449.tar.bz2 avrtoys-edf5f145013aa28ffbc7f19f874cd489a92f8449.zip |
Diffstat (limited to 'asm/blinkdelay2/makefile')
-rw-r--r-- | asm/blinkdelay2/makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/asm/blinkdelay2/makefile b/asm/blinkdelay2/makefile new file mode 100644 index 0000000..063bd39 --- /dev/null +++ b/asm/blinkdelay2/makefile @@ -0,0 +1,19 @@ +AS=avr-as +LD=avr-ld +LDSCRIPT=link.ld + +PORT=/dev/ttyACM0 +TARG=blink + +all: build + +build: + $(AS) -mmcu=atmega328p -c -o $(TARG).o $(TARG).s + $(LD) -T$(LDSCRIPT) -o $(TARG).elf $(TARG).o + avr-objcopy -j .text -j .data -O ihex $(TARG).elf $(TARG).hex + +burn: + avrdude -v -p atmega328p -c arduino -P $(PORT) -b 115200 -D -U flash:w:$(TARG).hex + +clean: + rm -f $(TARG).elf $(TARG).o $(TARG).hex |