# makfile configuration
NAME = vqc10disp
OBJECTS = main.o font.o led.o
# irgendein MSP430 mit Multiplizierer, der MSPGCC3 kennt MSP430X55xx nicht
CPU = msp430x5418
CFLAGS = -mmcu=${CPU} -O2 -Wall -g
CFLAGS += -std=gnu99 -mno-stack-init
LDFLAGS += -T msp430x5524.x
#switch the compiler (for the internal make rules)
CC = msp430-gcc
.PHONY: all FORCE clean download download-jtag download-bsl dist
#all should be the first target. it's built when make is run without args
all: $(NAME).elf $(NAME).hex $(NAME).lst
#confgigure the next line if you want to use the serial download
#program: download-jtag
program: download-bsl
#additional rules for files
$(NAME).elf: $(OBJECTS) msp430x5524.x
${CC} -mmcu=${CPU} -o $@ $(OBJECTS) $(LDFLAGS)
msp430-ram-usage $@
$(NAME).hex: $(NAME).elf
msp430-objcopy -O ihex $^ $@
ihex2titext $@ >$(NAME).txt
$(NAME).lst: $(NAME).elf
msp430-objdump -dSt $^ >$@
download-jtag: all
msp430-jtag -e $(NAME).elf
download-bsl: all
msp430-usbbsl $(NAME).hex
clean:
rm -f $(NAME).elf $(NAME).hex $(NAME).txt $(NAME).lst $(OBJECTS)
#dummy target as dependecy if something has to be build everytime
FORCE:
#project dependencies
main.o: main.c led.h msp430x552x.h makefile
led.o: led.c led.h msp430x552x.h makefile
font.o: font.c makefile
Vorgefundene Kodierung: ASCII (7 bit) | 2
|