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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src-c/] [sandbox/] [makefile] - Diff between revs 200 and 211

Show entire file | Details | Blame | View Log

Rev 200 Rev 211
Line 1... Line 1...
# makfile configuration
# makfile configuration
NAME            = sandbox
NAME            = sandbox
OBJECTS         = main.o copydata.o
OBJECTS         = main.o mylib/copydata.o
 
 
# Choose GCC toolchain prefix ('msp430' for MSPGCC / 'msp430-elf' for GCC RedHat/TI)
# Choose GCC toolchain prefix ('msp430' for MSPGCC / 'msp430-elf' for GCC RedHat/TI)
 
MSPGCC_PFX      = msp430-elf
ifndef MSPGCC_PFX
ifndef MSPGCC_PFX
MSPGCC_PFX      = msp430
MSPGCC_PFX      = msp430
endif
endif
 
 
# Select flags depending on selected toolchain
# Select flags depending on selected toolchain
Line 16... Line 17...
 
 
# Toolchain executables
# Toolchain executables
CC              = ${MSPGCC_PFX}-gcc
CC              = ${MSPGCC_PFX}-gcc
OBJCOPY         = ${MSPGCC_PFX}-objcopy
OBJCOPY         = ${MSPGCC_PFX}-objcopy
OBJDUMP         = ${MSPGCC_PFX}-objdump
OBJDUMP         = ${MSPGCC_PFX}-objdump
 
OBJSIZE         = ${MSPGCC_PFX}-size
 
 
.PHONY: all FORCE clean download download-jtag download-bsl dist
.PHONY: all FORCE clean download download-jtag download-bsl 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
 
 
#additional rules for files
#additional rules for files
Line 36... Line 37...
        ${OBJCOPY} -O ihex $^ $@
        ${OBJCOPY} -O ihex $^ $@
 
 
${NAME}.lst: ${NAME}.elf
${NAME}.lst: ${NAME}.elf
        ${OBJDUMP} -dSt $^ >$@
        ${OBJDUMP} -dSt $^ >$@
 
 
 
${NAME}.size: ${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 ${NAME}.elf *.o
        rm -f ${NAME} ${NAME}.a43 ${NAME}.lst ${NAME}.elf ${NAME}.size *.o mylib/*.o
 
 
#backup archive
#backup archive
dist:
dist:
        tar czf dist.tgz *.c *.h *.txt makefile
        tar czf dist.tgz *.c *.h *.txt makefile
 
 
#dummy target as dependecy if something has to be build everytime
#dummy target as dependecy if something has to be build everytime
FORCE:
FORCE:
 
 
#project dependencies
#project dependencies
main.o: main.c
main.o: main.c
copydata.o: copydata.c
mylib/copydata.o: mylib/copydata.c
mylib/copydata.o: mylib/copydata.c
mylib/copydata.o: mylib/copydata.c

powered by: WebSVN 2.1.0

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