From acdd758e56e28f22846e7d34d87f5533c8682574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 8 Oct 2015 20:59:26 +0200 Subject: Add implementation of USART and more ground changes --- examples/usartecho/makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 examples/usartecho/makefile (limited to 'examples/usartecho/makefile') 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 $@ $< -- cgit v1.2.3