diff options
author | Karel Kočí <cynerd@email.cz> | 2015-10-11 13:06:28 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-10-11 13:06:28 +0200 |
commit | bab75a6068ab0a64fe22395ad11efafccbf0d842 (patch) | |
tree | 59344457d25c2e72904acac20118eb16633908fe /examples/spiblink/makefile | |
parent | 1b0b3cb1b61759be5c2e100d08c84e5eec924a58 (diff) | |
download | avr-ioe-bab75a6068ab0a64fe22395ad11efafccbf0d842.tar.gz avr-ioe-bab75a6068ab0a64fe22395ad11efafccbf0d842.tar.bz2 avr-ioe-bab75a6068ab0a64fe22395ad11efafccbf0d842.zip |
Implement SPI and remove files
Diffstat (limited to 'examples/spiblink/makefile')
-rw-r--r-- | examples/spiblink/makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/spiblink/makefile b/examples/spiblink/makefile new file mode 100644 index 0000000..a831f86 --- /dev/null +++ b/examples/spiblink/makefile @@ -0,0 +1,30 @@ +MAKEFLAGS += --no-builtin-rules + +MMCU = atmega328p +F_CPU = 16000000L +IOE_PREFIX = ../.. +IOE_CFLAGS ?= -Os -ffunction-sections -fdata-sections -fshort-enums -g -Wall + +.PHONY: all +all: master.hex slave.hex + @echo + @echo Flash master.hex and slave.hex to two chips and... TODO + +.PHONY: all +clean: ioeclean + $(RM) master.o slave.o + $(RM) master.elf master.hex + $(RM) slave.elf slave.hex + +include ../../avr-ioe.mk + +master.elf: master.o +slave.elf: slave.o +master.elf slave.elf: %.elf: $(IOE_OBJ_SPI) + avr-gcc -Os -mmcu=$(MMCU) $^ -o $@ + +master.hex slave.hex: %.hex: %.elf + avr-objcopy -O ihex -R .eeprom $< $@ + +master.o slave.o: %.o: %.c + avr-gcc $(IOE_CFLAGS) -c -o $@ $< |