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
|
Rev | Line | |
---|
[e5dd493] | 1 | MCU=atmega8
|
---|
| 2 | BAUD=57600
|
---|
| 3 | FCPU=16000000
|
---|
| 4 | PROG=avr109 -P /dev/ports/usb0 -b $(BAUD) -u
|
---|
| 5 |
|
---|
[bb69525] | 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
|
---|
[e5dd493] | 10 | avr-gcc usart.o main.o -o testusart.bin -mmcu=$(MCU) -Os
|
---|
[bb69525] | 11 |
|
---|
| 12 | main.o: testuart.c ../libs/usart/usart.h
|
---|
[e5dd493] | 13 | avr-gcc -c testuart.c -mmcu=$(MCU) -Os -o main.o
|
---|
[bb69525] | 14 |
|
---|
| 15 | usart.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 |
|
---|
| 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.