Changeset e5dd493 in avrstuff for test_uart/Makefile


Ignore:
Timestamp:
Sep 8, 2019, 9:09:42 AM (5 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
c956fd4
Parents:
6f22754
Message:

usart: some cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test_uart/Makefile

    r6f22754 re5dd493  
     1MCU=atmega8
     2BAUD=57600
     3FCPU=16000000
     4PROG=avr109 -P /dev/ports/usb0 -b $(BAUD) -u
     5
    16testusart.hex: testusart.bin
    27        avr-objcopy -j .text -j .data -O ihex testusart.bin testusart.hex
    38
    49testusart.bin: usart.o main.o
    5         avr-gcc usart.o main.o -o testusart.bin -mmcu=atmega8 -Os
     10        avr-gcc usart.o main.o -o testusart.bin -mmcu=$(MCU) -Os
    611
    712main.o: testuart.c ../libs/usart/usart.h
    8         avr-gcc -c testuart.c -mmcu=atmega8 -Os -o main.o -mmcu=atmega8 -Os
     13        avr-gcc -c testuart.c -mmcu=$(MCU) -Os -o main.o
    914
    1015usart.o: ../libs/usart/usart.c ../libs/usart/usart.h
    11         avr-gcc -c ../libs/usart/usart.c -o usart.o -mmcu=atmega8 -Os
     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 TracChangeset for help on using the changeset viewer.