diff options
author | Karel Kočí <cynerd@email.cz> | 2015-10-08 20:59:26 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-10-08 20:59:26 +0200 |
commit | acdd758e56e28f22846e7d34d87f5533c8682574 (patch) | |
tree | d8fda0b554e99d6ace98a9300ecb5835b5bf50e0 /examples/usartecho/makefile | |
parent | 0b534d81ac39eb5bbf2b9a0691519f6f7f0eaa13 (diff) | |
download | avr-ioe-acdd758e56e28f22846e7d34d87f5533c8682574.tar.gz avr-ioe-acdd758e56e28f22846e7d34d87f5533c8682574.tar.bz2 avr-ioe-acdd758e56e28f22846e7d34d87f5533c8682574.zip |
Add implementation of USART and more ground changes
Diffstat (limited to 'examples/usartecho/makefile')
-rw-r--r-- | examples/usartecho/makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/usartecho/makefile b/examples/usartecho/makefile new file mode 100644 index 0000000..343addc --- /dev/null +++ b/examples/usartecho/makefile @@ -0,0 +1,29 @@ +MAKEFLAGS += --no-builtin-rules + +MMCU = atmega328p +F_CPU = 16000000L +IOE_PREFIX = ../.. +IOE_CFLAGS = -Os -ffunction-sections -fdata-sections -fshort-enums -Wall -g \ + -DCONFIG_IOE_USART_OUTBUFFER_SIZE=64 \ + -DCONFIG_IOE_USART_OUTBUFFER_MODE=0 + +all: usart.hex + @echo Flash usart.hex to chip + +install: usart.hex + # TODO + +clean: ioeclean + $(RM) echo.o + $(RM) usart.elf usart.hex + +include ../../avr-ioe.mk + +usart.elf: %.elf: $(IOE_OBJ_USART) echo.o + avr-gcc -mmcu=$(MMCU) $^ -o $@ + +usart.hex: %.hex: %.elf + avr-objcopy -O ihex -R .eeprom $< $@ + +echo.o: %.o: %.c + avr-gcc $(IOE_CFLAGS) -c -o $@ $< |