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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [software/] [hw_uart/] [makefile] - Blame information for rev 136

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

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

powered by: WebSVN 2.1.0

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