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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [tools/] [makefile] - Blame information for rev 200

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

Line No. Rev Author Line
1 137 rhoads
# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.
2
# The CC_X86 is for compiling tools on your PC.
3
# The GCC_MIPS is for compiling code on the target.
4 191 rhoads
# Convert_bin changes test.axf into code.txt which is used by the VHDL.
5 126 rhoads
 
6 179 rhoads
# Customize for Linux
7
#CC_X86 = gcc -Wall -O -g
8
#CP = cp
9
#RM = rm -rf
10 182 rhoads
#BIN_MIPS = ../../mips/sde/bin
11
#VHDL_DIR = ../vhdl
12 193 rhoads
#GCC_MIPS  = $(BIN_MIPS)/gcc $(CFLAGS)
13
#AS_MIPS   = $(BIN_MIPS)/as
14
#LD_MIPS   = $(BIN_MIPS)/ld
15
#DUMP_MIPS = $(BIN_MIPS)/objdump
16 179 rhoads
 
17
# Customize for Windows
18 137 rhoads
CC_X86 = cl /O1
19 179 rhoads
CP = copy
20
RM = del
21 193 rhoads
BIN_MIPS = ..\gccmips_elf
22 182 rhoads
VHDL_DIR = ..\vhdl
23 193 rhoads
GCC_MIPS  = $(BIN_MIPS)\gcc $(CFLAGS)
24
AS_MIPS   = $(BIN_MIPS)\as
25
LD_MIPS   = $(BIN_MIPS)\ld
26
DUMP_MIPS = $(BIN_MIPS)\objdump
27 2 rhoads
 
28 200 rhoads
CFLAGS = -O2 -Wall -c -s
29 47 rhoads
 
30 179 rhoads
 
31
all: convert_bin.exe tracehex.exe bintohex.exe ram_image.exe
32 200 rhoads
        @echo make targets = count, opcodes, pi, test, run, tohex, toimage
33 2 rhoads
 
34 137 rhoads
clean:
35 179 rhoads
        -$(RM) *.o *.obj *.map *.lst *.hex *.txt
36 137 rhoads
 
37
convert_bin.exe: convert.c
38
        @$(CC_X86) -o convert_bin.exe convert.c
39
 
40 170 rhoads
convert_le.exe: convert.c
41
        @$(CC_X86) -DLITTLE_ENDIAN -o convert_le.exe convert.c
42
 
43 41 rhoads
mlite.exe: mlite.c
44 137 rhoads
        @$(CC_X86) -o mlite.exe mlite.c -DWIN32
45 2 rhoads
 
46 7 rhoads
tracehex.exe: tracehex.c
47 137 rhoads
        @$(CC_X86) -o tracehex.exe tracehex.c
48 2 rhoads
 
49 47 rhoads
bintohex.exe: bintohex.c
50 137 rhoads
        @$(CC_X86) -o bintohex.exe bintohex.c
51 47 rhoads
 
52 137 rhoads
ram_image.exe: ram_image.c
53
        @$(CC_X86) -o ram_image.exe ram_image.c
54 47 rhoads
 
55 179 rhoads
opcodes:
56 137 rhoads
        $(AS_MIPS) -o opcodes.o opcodes.asm
57 191 rhoads
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf opcodes.o
58
        -@$(DUMP_MIPS) --disassemble test.axf > test.lst
59 179 rhoads
        convert_bin.exe
60 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
61 7 rhoads
 
62 179 rhoads
opcodes2:
63 137 rhoads
        $(AS_MIPS) -o opcodes.o opcodes.asm
64 191 rhoads
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf opcodes.o
65
        -@$(DUMP_MIPS) --disassemble test.axf > test.lst
66 179 rhoads
        convert_bin.exe
67 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
68 137 rhoads
 
69 179 rhoads
test:
70 137 rhoads
        $(AS_MIPS) -o boot.o boot.asm
71
        $(GCC_MIPS) test.c
72
        $(GCC_MIPS) no_os.c
73 191 rhoads
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
74 137 rhoads
                boot.o test.o no_os.o
75 191 rhoads
        -@$(DUMP_MIPS) --disassemble test.axf > test.lst
76 179 rhoads
        convert_bin.exe
77 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
78 22 rhoads
 
79 179 rhoads
count:
80 137 rhoads
        $(AS_MIPS) -o boot.o boot.asm
81
        $(GCC_MIPS) count.c
82
        $(GCC_MIPS) no_os.c
83 191 rhoads
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
84 137 rhoads
                boot.o count.o no_os.o
85 191 rhoads
        -$(DUMP_MIPS) --disassemble test.axf > test.lst
86 179 rhoads
        convert_bin.exe
87 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
88 32 rhoads
 
89 179 rhoads
count2:
90 137 rhoads
        $(AS_MIPS) -o boot.o boot.asm
91
        $(GCC_MIPS) count.c
92
        $(GCC_MIPS) no_os.c
93 191 rhoads
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
94 137 rhoads
                boot.o count.o no_os.o
95 191 rhoads
        -$(DUMP_MIPS) --disassemble test.axf > test.lst
96 179 rhoads
        convert_bin.exe
97 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
98 137 rhoads
 
99 179 rhoads
pi:
100 137 rhoads
        $(AS_MIPS) -o boot.o boot.asm
101
        $(GCC_MIPS) pi.c
102 191 rhoads
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
103 137 rhoads
                boot.o pi.o
104 191 rhoads
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
105 179 rhoads
        convert_bin.exe
106 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
107 32 rhoads
 
108 179 rhoads
pi2:
109 137 rhoads
        $(AS_MIPS) -o boot.o boot.asm
110
        $(GCC_MIPS) pi.c
111 191 rhoads
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
112 137 rhoads
                boot.o pi.o
113 191 rhoads
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
114 179 rhoads
        convert_bin.exe
115 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
116 137 rhoads
 
117 179 rhoads
bootldr:
118 137 rhoads
        $(AS_MIPS) -o boot.o boot.asm
119
        $(GCC_MIPS) bootldr.c
120
        $(GCC_MIPS) no_os.c
121 191 rhoads
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
122 137 rhoads
                boot.o bootldr.o no_os.o
123 191 rhoads
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
124 179 rhoads
        convert_bin.exe
125 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
126 137 rhoads
 
127 179 rhoads
bootldr_little_endian: convert_le.exe
128 170 rhoads
        $(AS_MIPS) -EL -o boot.o boot.asm
129
        $(GCC_MIPS) -EL bootldr.c
130
        $(GCC_MIPS) -EL no_os.c
131 191 rhoads
        $(LD_MIPS) -EL -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
132 170 rhoads
                boot.o bootldr.o no_os.o
133 191 rhoads
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
134 179 rhoads
        convert_le.exe
135 182 rhoads
        $(CP) code.txt $(VHDL_DIR)
136 170 rhoads
 
137 137 rhoads
# Run a MIPS opcode simulator
138 41 rhoads
run: mlite.exe
139 179 rhoads
        @mlite.exe test.bin
140 22 rhoads
 
141 170 rhoads
run_little_endian: mlite.exe
142 179 rhoads
        @mlite.exe test.bin L
143 170 rhoads
 
144 137 rhoads
disassemble:
145 179 rhoads
        -@mlite.exe test.bin BD > test.txt
146 22 rhoads
 
147 137 rhoads
# Used by Altera FPGAs for ram image
148
tohex:
149 179 rhoads
        bintohex.exe test2.exe
150 182 rhoads
        $(CP) code*.hex $(VHDL_DIR)
151 137 rhoads
 
152
# Used by Xilinx FPGAs for ram image
153
toimage:
154 179 rhoads
        ram_image.exe ../vhdl/ram_xilinx.vhd ../vhdl/code.txt ../vhdl/ram_image.vhd
155 137 rhoads
 
156
 

powered by: WebSVN 2.1.0

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