main
Last change
on this file since e5dd493 was e5dd493, checked in by Adrien Destugues <pulkomandy@…>, 5 years ago |
usart: some cleanups.
|
-
Property mode
set to
100644
|
File size:
633 bytes
|
Line | |
---|
1 | MCU=atmega8
|
---|
2 | BAUD=57600
|
---|
3 | FCPU=16000000
|
---|
4 | PROG=avr109 -P /dev/ports/usb0 -b $(BAUD) -u
|
---|
5 |
|
---|
6 | testusart.hex: testusart.bin
|
---|
7 | avr-objcopy -j .text -j .data -O ihex testusart.bin testusart.hex
|
---|
8 |
|
---|
9 | testusart.bin: usart.o main.o
|
---|
10 | avr-gcc usart.o main.o -o testusart.bin -mmcu=$(MCU) -Os
|
---|
11 |
|
---|
12 | main.o: testuart.c ../libs/usart/usart.h
|
---|
13 | avr-gcc -c testuart.c -mmcu=$(MCU) -Os -o main.o
|
---|
14 |
|
---|
15 | usart.o: ../libs/usart/usart.c ../libs/usart/usart.h
|
---|
16 | avr-gcc -c ../libs/usart/usart.c -o usart.o -mmcu=$(MCU) -DBAUD=$(BAUD) -DF_CPU=$(FCPU) -Os
|
---|
17 |
|
---|
18 | flash: testusart.hex
|
---|
19 | avrdude -c $(PROG) -p $(MCU) -Uflash:w:testusart.hex
|
---|
20 |
|
---|
21 | clean:
|
---|
22 | rm *.bin *.o *.hex
|
---|
Note:
See
TracBrowser
for help on using the repository browser.