source: avrstuff/test_uart/Makefile@ 7d84448

main
Last change on this file since 7d84448 was e5dd493, checked in by Adrien Destugues <pulkomandy@…>, 5 years ago

usart: some cleanups.

  • Property mode set to 100644
File size: 633 bytes
RevLine 
[e5dd493]1MCU=atmega8
2BAUD=57600
3FCPU=16000000
4PROG=avr109 -P /dev/ports/usb0 -b $(BAUD) -u
5
[bb69525]6testusart.hex: testusart.bin
7 avr-objcopy -j .text -j .data -O ihex testusart.bin testusart.hex
8
9testusart.bin: usart.o main.o
[e5dd493]10 avr-gcc usart.o main.o -o testusart.bin -mmcu=$(MCU) -Os
[bb69525]11
12main.o: testuart.c ../libs/usart/usart.h
[e5dd493]13 avr-gcc -c testuart.c -mmcu=$(MCU) -Os -o main.o
[bb69525]14
15usart.o: ../libs/usart/usart.c ../libs/usart/usart.h
[e5dd493]16 avr-gcc -c ../libs/usart/usart.c -o usart.o -mmcu=$(MCU) -DBAUD=$(BAUD) -DF_CPU=$(FCPU) -Os
17
18flash: testusart.hex
19 avrdude -c $(PROG) -p $(MCU) -Uflash:w:testusart.hex
20
21clean:
22 rm *.bin *.o *.hex
Note: See TracBrowser for help on using the repository browser.