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

Subversion Repositories openmsp430

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

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 145 Rev 200
Line 1... Line 1...
# makfile configuration
# makfile configuration
NAME            = dhrystone_4mcu
NAME            = dhrystone_4mcu
OBJECTS         = dhry21a.o dhry21b.o omsp_func.o
OBJECTS         = dhry21a.o dhry21b.o omsp_func.o copydata.o
 
 
# disable some warnings specific to the Dhrystone code
# Compiler performance option (-Os / -O2 / -O3)
WARNINGS        =  -Wall
PORT_CFLAGS     = -O2
 
 
#CFLAGS         = -O2  ${WARNINGS} -g                                         # Old flags
# Choose GCC toolchain prefix ('msp430' for MSPGCC / 'msp430-elf' for GCC RedHat/TI)
CFLAGS          = -O2 ${WARNINGS} -g -mcpu=430 -mivcnt=16 -mmpy=16            # Uniarch flags
ifndef MSPGCC_PFX
 
MSPGCC_PFX      = msp430
 
endif
 
 
#switch the compiler (for the internal make rules)
# disable some warnings specific to the Dhrystone code
CC              = msp430-gcc
WARNINGS        =  -Wall
 
 
 
# Select flags depending on selected toolchain
 
ifeq ($(MSPGCC_PFX),msp430-elf)
 
CFLAGS          = -D PFX_MSP430_ELF $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=msp430 -mhwmult=16bit
 
else
 
CFLAGS          = -D PFX_MSP430     $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=430    -mmpy=16         -mivcnt=16
 
endif
 
 
 
# Toolchain executables
 
CC              = ${MSPGCC_PFX}-gcc
 
OBJCOPY         = ${MSPGCC_PFX}-objcopy
 
OBJDUMP         = ${MSPGCC_PFX}-objdump
 
 
.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
 
 
#confgigure the next line if you want to use the serial download
#configure 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} -T linker.x -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
 
        msp430-bsl -e ${NAME}.elf
 
 
 
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:
Line 50... Line 55...
 
 
#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
dhry_1.o: dhry_1.c
dhry_21a.o: dhry_21a.c
dhry_2.o: dhry_2.c
dhry_21b.o: dhry_21b.c
omsp_func.o: omsp_func.c
omsp_func.o: omsp_func.c
 
copydata.o: copydata.c
copydata.o: copydata.c
copydata.o: copydata.c

powered by: WebSVN 2.1.0

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