[an error occurred while processing this directive]
|
MCU_TARGET = at90s2313
PRG = testrs
OPTIMIZE = -O2
CC = $(AVR_BIN)\avr-gcc.exe
OBJCOPY = $(AVR_BIN)\avr-objcopy.exe
OBJDUMP = $(AVR_BIN)\avr-objdump.exe
AVREAL = E:\atmeltools\Avreal\avreal32.exe# Convert ELF to COFF for use in debugging / simulating in
# AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
LDFLAGS = -Wl,-Map,$(PRG).map
all: $(PRG).hex $(PRG).cof$(PRG).hex: $(PRG).elf
$(PRG).cof: $(PRG).elf
$(PRG).lst: $(PRG).elf
$(PRG).elf: $(PRG).c
$(PRG).cof: $(PRG).elf
$(COFFCONVERT) -O coff-ext-avr $< $(PRG).cof%.hex: %.elf
$(OBJCOPY) -j .text -j .data -O ihex $< $@%.elf: %.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)%.lst: %.elf
$(OBJDUMP) -h -S $< > $@clean:
cmd.exe /C del $(PRG).elf $(PRG).hex $(PRG).cof $(PRG).mapprog: $(PRG).hex do_prog
do_prog:
$(AVREAL) +90S2313 -p1 -ab -o8000 -- -e -b -c $(PRG).hex -w -v
E-mail: info@telesys.ru