OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [software/] [ta_uart/] [makefile] - Diff between revs 143 and 212

Show entire file | Details | Blame | View Log

Rev 143 Rev 212
Line 1... Line 1...
# makfile configuration
# makfile configuration
NAME            = ta_uart
NAME            = ta_uart
OBJECTS         = main.o swuart.o
OBJECTS         = main.o swuart.o cprintf.o
 
 
CPU             = msp430f122
# Compiler performance option (-Os / -O2 / -O3)
ASFLAGS         = -mmcu=${CPU}  -x assembler-with-cpp -D_GNU_ASSEMBLER_ -c
PORT_CFLAGS     = -O2
CFLAGS          = -mmcu=${CPU}  -O2 -Wall -g
 
 
 
#switch the compiler (for the internal make rules)
# Choose GCC toolchain prefix ('msp430' for MSPGCC / 'msp430-elf' for GCC RedHat/TI)
CC              = msp430-gcc
ifndef MSPGCC_PFX
AS              = msp430-gcc
MSPGCC_PFX      = msp430-elf
 
endif
 
 
 
# disable some warnings specific to the Dhrystone code
 
WARNINGS        =  -Wall
 
 
 
# Select flags depending on selected toolchain
 
ifeq ($(MSPGCC_PFX),msp430-elf)
 
INCDIR          = -I /cad/ti/gcc/include
 
CFLAGS          = -D PFX_MSP430_ELF $(INCDIR) $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=msp430 -mhwmult=16bit
 
ASFLAGS         = -x assembler-with-cpp -D_GNU_ASSEMBLER_ -c -mcpu=msp430
 
else
 
CFLAGS          = -D PFX_MSP430               $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=430    -mmpy=16       -mivcnt=16
 
ASFLAGS         = -x assembler-with-cpp -D_GNU_ASSEMBLER_ -c
 
endif
 
 
 
# Toolchain executables
 
CC              = ${MSPGCC_PFX}-gcc
 
AS              = ${MSPGCC_PFX}-gcc
 
OBJCOPY         = ${MSPGCC_PFX}-objcopy
 
OBJDUMP         = ${MSPGCC_PFX}-objdump
 
OBJSIZE         = ${MSPGCC_PFX}-size
 
 
.PHONY: all FORCE clean download download-jtag download-bsl dist
 
 
.PHONY: all FORCE clean download dist
 
 
#all should be the first target. it's built when make is runwithout args
#all should be the first target. it's built when make is runwithout args
all: ${NAME}.elf ${NAME}.a43 ${NAME}.lst
all: ${NAME}.elf ${NAME}.a43 ${NAME}.lst ${NAME}.size
 
 
#confgigure the next line if you want to use the serial download
#confgigure the next line if you want to use the serial download
download: download-uart
download: download-uart
#download: download-jtag
 
#download: download-bsl
 
 
 
#additional rules for files
#additional rules for files
${NAME}.elf: ${OBJECTS}
${NAME}.elf: ${OBJECTS}
        ${CC} -mmcu=${CPU} -o $@ ${OBJECTS}
        ${CC} ${CFLAGS} -T linker.${MSPGCC_PFX}.x -o $@ ${OBJECTS}
 
 
${NAME}.a43: ${NAME}.elf
${NAME}.a43: ${NAME}.elf
        msp430-objcopy -O ihex $^ $@
        ${OBJCOPY} -O ihex $^ $@
 
 
${NAME}.lst: ${NAME}.elf
${NAME}.lst: ${NAME}.elf
        msp430-objdump -dSt $^ > $@
        ${OBJDUMP} -dSt $^ >$@
 
 
download-jtag: all
 
        msp430-jtag -e ${NAME}.elf
 
 
 
download-bsl: all
${NAME}.size: ${NAME}.elf
        msp430-bsl -e ${NAME}.elf
        ${OBJSIZE}  $^ >$@
 
 
download-uart: all
download-uart: all
        openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate 115200 ${NAME}.elf
        openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate 115200 ${NAME}.elf
 
 
clean:
clean:
        rm -f ${NAME} ${NAME}.a43 ${NAME}.lst *.o
        rm -f ${NAME}.elf ${NAME}.a43 ${NAME}.lst ${NAME}.size *.o
 
 
#backup archive
#backup archive
dist:
dist:
        tar czf dist.tgz *.c *.h *.txt makefile
        tar czf dist.tgz *.c *.h *.txt makefile
 
 
Line 51... Line 67...
 
 
#project dependencies
#project dependencies
main.o: main.c hardware.h
main.o: main.c hardware.h
fll.o: fll.s hardware.h
fll.o: fll.s hardware.h
swuart.o: swuart.s hardware.h
swuart.o: swuart.s hardware.h
 
cprintf.o: cprintf.c cprintf.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.