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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src-c/] [dhrystone_4mcu/] [makefile] - Blame information for rev 200

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 olivier.gi
# makfile configuration
2
NAME            = dhrystone_4mcu
3 200 olivier.gi
OBJECTS         = dhry21a.o dhry21b.o omsp_func.o copydata.o
4 145 olivier.gi
 
5 200 olivier.gi
# Compiler performance option (-Os / -O2 / -O3)
6
PORT_CFLAGS     = -O2
7
 
8
# Choose GCC toolchain prefix ('msp430' for MSPGCC / 'msp430-elf' for GCC RedHat/TI)
9
ifndef MSPGCC_PFX
10
MSPGCC_PFX      = msp430
11
endif
12
 
13 145 olivier.gi
# disable some warnings specific to the Dhrystone code
14
WARNINGS        =  -Wall
15
 
16 200 olivier.gi
# Select flags depending on selected toolchain
17
ifeq ($(MSPGCC_PFX),msp430-elf)
18
CFLAGS          = -D PFX_MSP430_ELF $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=msp430 -mhwmult=16bit
19
else
20
CFLAGS          = -D PFX_MSP430     $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=430    -mmpy=16         -mivcnt=16
21
endif
22 145 olivier.gi
 
23 200 olivier.gi
# Toolchain executables
24
CC              = ${MSPGCC_PFX}-gcc
25
OBJCOPY         = ${MSPGCC_PFX}-objcopy
26
OBJDUMP         = ${MSPGCC_PFX}-objdump
27 145 olivier.gi
 
28 200 olivier.gi
.PHONY: all FORCE clean download dist
29 145 olivier.gi
 
30
#all should be the first target. it's built when make is runwithout args
31
all: ${NAME}.elf ${NAME}.a43 ${NAME}.lst
32
 
33 200 olivier.gi
#configure the next line if you want to use the serial download
34 145 olivier.gi
download: download-uart
35
 
36
#additional rules for files
37
${NAME}.elf: ${OBJECTS}
38 200 olivier.gi
        ${CC} ${CFLAGS} -T linker.${MSPGCC_PFX}.x -o $@ ${OBJECTS}
39 145 olivier.gi
 
40
${NAME}.a43: ${NAME}.elf
41 200 olivier.gi
        ${OBJCOPY} -O ihex $^ $@
42 145 olivier.gi
 
43
${NAME}.lst: ${NAME}.elf
44 200 olivier.gi
        ${OBJDUMP} -dSt $^ >$@
45 145 olivier.gi
 
46
download-uart: all
47
        openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate 115200 ${NAME}.elf
48
 
49
clean:
50
        rm -f ${NAME} ${NAME}.a43 ${NAME}.lst ${NAME}.elf *.o
51
 
52
#backup archive
53
dist:
54
        tar czf dist.tgz *.c *.h *.txt makefile
55
 
56
#dummy target as dependecy if something has to be build everytime
57
FORCE:
58
 
59
#project dependencies
60 200 olivier.gi
dhry_21a.o: dhry_21a.c
61
dhry_21b.o: dhry_21b.c
62 145 olivier.gi
omsp_func.o: omsp_func.c
63 200 olivier.gi
copydata.o: copydata.c

powered by: WebSVN 2.1.0

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