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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [software/] [leds/] [makefile] - Blame information for rev 135

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

Line No. Rev Author Line
1 2 olivier.gi
# makfile configuration
2
NAME            = leds
3
OBJECTS         = main.o 7seg.o
4
CPU             = msp430x1121
5
 
6 106 olivier.gi
CFLAGS          = -mmcu=${CPU} -mforce-hwmul -O0 -Wall -g
7 2 olivier.gi
 
8
#switch the compiler (for the internal make rules)
9
CC              = msp430-gcc
10
 
11
 
12
.PHONY: all FORCE clean download download-jtag download-bsl dist
13
 
14
#all should be the first target. it's built when make is runwithout args
15
all: ${NAME}.elf ${NAME}.a43 ${NAME}.lst
16
 
17
#confgigure the next line if you want to use the serial download
18
download: download-uart
19
#download: download-jtag
20
#download: download-bsl
21
 
22
#additional rules for files
23
${NAME}.elf: ${OBJECTS}
24
        ${CC} -mmcu=${CPU} -o $@ ${OBJECTS}
25
 
26
${NAME}.a43: ${NAME}.elf
27
        msp430-objcopy -O ihex $^ $@
28
 
29
${NAME}.lst: ${NAME}.elf
30
        msp430-objdump -dSt $^ >$@
31
 
32
download-jtag: all
33
        msp430-jtag -e ${NAME}.elf
34
 
35
download-bsl: all
36
        msp430-bsl -e ${NAME}.elf
37
 
38
download-uart: all
39
        openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate 115200 ${NAME}.elf
40
 
41
clean:
42
        rm -f ${NAME} ${NAME}.a43 ${NAME}.lst *.o
43
 
44
#backup archive
45
dist:
46
        tar czf dist.tgz *.c *.h *.txt makefile
47
 
48
#dummy target as dependecy if something has to be build everytime
49
FORCE:
50
 
51
#project dependencies
52
main.o: main.c hardware.h 7seg.h
53
7seg.o: 7seg.c 7seg.h

powered by: WebSVN 2.1.0

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