From e92e24c355b7e3c90cdf9ab5cc771ea456dd05ce Mon Sep 17 00:00:00 2001 From: schodet Date: Thu, 24 Jun 2004 23:22:57 +0000 Subject: Nouveau Makefile. Ajout Doc. --- n/avr/rs232/Makefile | 17 ++++++++++++----- n/avr/rs232/rs232.txt | 8 ++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 n/avr/rs232/rs232.txt diff --git a/n/avr/rs232/Makefile b/n/avr/rs232/Makefile index 8aec9f8..3b0ea0f 100644 --- a/n/avr/rs232/Makefile +++ b/n/avr/rs232/Makefile @@ -1,7 +1,10 @@ PRG = test_rs232 -OBJ = test_rs232.o rs232.o +OBJECTS = test_rs232.o rs232.o +DOC = rs232.html # atmega8, atmega8535, atmega128... MCU_TARGET = atmega8 +# -O2 : speed +# -Os : size OPTIMIZE = -O2 DEFS = @@ -11,7 +14,8 @@ LIBS = CC = avr-gcc -CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) +CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) +CPPFLAGS = $(DEFS) LDFLAGS = -Wl,-Map,$(PRG).map OBJCOPY = avr-objcopy @@ -22,20 +26,23 @@ all: elf lst hex elf: $(PRG).elf lst: $(PRG).lst -$(PRG).elf: $(OBJ) +$(PRG).elf: $(OBJECTS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) %.lst: %.elf $(OBJDUMP) -h -S $< > $@ clean: - rm -f *.o $(PRG).elf *.bak + rm -f *.o $(PRG).elf *.bak $(DOC) rm -f *.lst *.map $(EXTRA_CLEAN_FILES) rm -f $(PRG).hex $(PRG).bin $(PRG).srec $(PRG)_eeprom.hex $(PRG)_eeprom.bin $(PRG)_eeprom.srec # Rules for building the doc. -doc: +doc: $(DOC) + +%.html: %.txt + aft $< # Rules for building the .text rom images. diff --git a/n/avr/rs232/rs232.txt b/n/avr/rs232/rs232.txt new file mode 100644 index 0000000..3bd8315 --- /dev/null +++ b/n/avr/rs232/rs232.txt @@ -0,0 +1,8 @@ +*Title: Module AVR RS232 +*Author: Ni + +* Utilisation + +Rien de plus simple. Appeler la fonction |rs232_init| au démarrage, puis +|rs232_putc| pour envoyer un caractère, +|rs232_getc| pour en recevoir. -- cgit v1.2.3