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

Subversion Repositories mlite

[/] [mlite/] [trunk/] [kernel/] [makefile] - Blame information for rev 297

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

Line No. Rev Author Line
1 246 rhoads
# Makefile for Plasma RTOS and Plasma TCP/IP stack
2
 
3 138 rhoads
# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.
4
 
5 201 rhoads
# Customize for Linux
6
#CC_X86 = gcc -Wall -O -g
7
#CP = cp
8
#RM = rm -rf
9
#BIN_MIPS = ../../mips/sde/bin
10
#VHDL_DIR = ../vhdl
11
#GCC_MIPS  = $(BIN_MIPS)/gcc $(CFLAGS)
12
#AS_MIPS   = $(BIN_MIPS)/as
13
#LD_MIPS   = $(BIN_MIPS)/ld
14
#DUMP_MIPS = $(BIN_MIPS)/objdump
15
 
16
# Customize for Windows
17 246 rhoads
CC_X86 = cl /O1 /DWIN32 /I..\tools /nologo
18 201 rhoads
CP = copy
19
RM = del
20
BIN_MIPS = ..\gccmips_elf
21
VHDL_DIR = ..\vhdl
22
GCC_MIPS  = $(BIN_MIPS)\gcc $(CFLAGS)
23
AS_MIPS   = $(BIN_MIPS)\as
24
LD_MIPS   = $(BIN_MIPS)\ld
25
DUMP_MIPS = $(BIN_MIPS)\objdump
26
 
27 198 rhoads
# Use software multiplier (don't use mult.vhd)
28
CFLAGS_SW_MULT = -mno-mul -DUSE_SW_MULT
29
 
30
# Use 16 fewer registers (make reg_bank.vhd smaller)
31
CFLAGS_FEW_REGS = -ffixed-t1 -ffixed-t2 -ffixed-t3 -ffixed-t4 -ffixed-t5 -ffixed-t6 -ffixed-t7 -ffixed-t8 -ffixed-t9 -ffixed-s2 -ffixed-s3 -ffixed-s4 -ffixed-s5 -ffixed-s6 -ffixed-s7 -ffixed-s8
32
 
33 138 rhoads
CFLAGS = -O2 -Wall -c -s -I..\tools -msoft-float
34
 
35 246 rhoads
# Build just the Plasma RTOS for Plasma CPU
36 138 rhoads
rtos:
37
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
38
        $(GCC_MIPS) rtos.c
39
        $(GCC_MIPS) libc.c
40
        $(GCC_MIPS) uart.c
41
        $(GCC_MIPS) rtos_test.c
42
        $(GCC_MIPS) math.c
43 191 rhoads
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
44 222 rhoads
        boot.o rtos.o libc.o uart.o rtos_test.o math.o
45 153 rhoads
        ..\tools\convert_bin
46
        @sort test2.map
47 191 rhoads
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
48 138 rhoads
 
49 246 rhoads
# Build the Plasma RTOS, Plasma TCP/IP stack, and web server for the Plasma CPU
50
rtos_tcpip:
51
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
52
        $(GCC_MIPS) rtos.c
53
        $(GCC_MIPS) libc.c
54
        $(GCC_MIPS) uart.c
55
        $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE
56
        $(GCC_MIPS) math.c
57
        $(GCC_MIPS) tcpip.c
58
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML
59
        $(GCC_MIPS) netutil.c
60
        $(GCC_MIPS) filesys.c
61
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
62
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
63
        http.o netutil.o filesys.o
64
        ..\tools\convert_bin
65
        @sort test2.map
66
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
67
 
68 297 rhoads
rtos_tcpip_eth:
69
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
70
        $(GCC_MIPS) rtos.c
71
        $(GCC_MIPS) libc.c
72
        $(GCC_MIPS) uart.c -DNO_PACKETS
73
        $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE
74
        $(GCC_MIPS) math.c
75
        $(GCC_MIPS) tcpip.c
76
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML
77
        $(GCC_MIPS) netutil.c
78
        $(GCC_MIPS) filesys.c
79
        $(GCC_MIPS) ethernet.c
80
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
81
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
82
        http.o netutil.o filesys.o ethernet.o
83
        ..\tools\convert_bin
84
        @sort test2.map
85
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
86
 
87 246 rhoads
# Build full test application
88 297 rhoads
rtosuart:
89 222 rhoads
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
90
        $(GCC_MIPS) rtos.c
91
        $(GCC_MIPS) libc.c
92
        $(GCC_MIPS) uart.c
93
        $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE
94
        $(GCC_MIPS) math.c
95
        $(GCC_MIPS) tcpip.c
96 236 rhoads
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS
97 222 rhoads
        $(GCC_MIPS) netutil.c
98
        $(GCC_MIPS) filesys.c
99
        $(GCC_MIPS) -I. ..\app\html.c -DMainThread=HtmlThread
100
        $(GCC_MIPS) -I. ..\app\image.c
101
        $(GCC_MIPS) -I. ..\app\tictac.c
102
        $(GCC_MIPS) -I. ..\app\tic3d.c
103
        $(GCC_MIPS) -I. ..\app\connect4.c
104
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
105
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
106 297 rhoads
        http.o netutil.o filesys.o html.o image.o tictac.o tic3d.o connect4.o
107 222 rhoads
        ..\tools\convert_bin
108
        @sort test2.map
109
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
110
 
111 297 rhoads
# Build full test application
112
rtosfull:
113
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
114
        $(GCC_MIPS) rtos.c
115
        $(GCC_MIPS) libc.c
116
        $(GCC_MIPS) uart.c -DNO_PACKETS
117
        $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE
118
        $(GCC_MIPS) math.c
119
        $(GCC_MIPS) tcpip.c
120
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS
121
        $(GCC_MIPS) netutil.c
122
        $(GCC_MIPS) filesys.c
123
        $(GCC_MIPS) ethernet.c
124
        $(GCC_MIPS) flash.c
125
        $(GCC_MIPS) -I. ..\app\html.c -DMainThread=HtmlThread
126
        $(GCC_MIPS) -I. ..\app\image.c
127
        $(GCC_MIPS) -I. ..\app\tictac.c
128
        $(GCC_MIPS) -I. ..\app\tic3d.c
129
        $(GCC_MIPS) -I. ..\app\connect4.c
130
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
131
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
132
        http.o netutil.o filesys.o ethernet.o flash.o \
133
        html.o image.o tictac.o tic3d.o connect4.o
134
        ..\tools\convert_bin
135
        @sort test2.map
136
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
137
 
138 246 rhoads
# Test the RTOS running on a PC
139
testrtos:
140
        @$(CC_X86) /c rtos.c
141
        @$(CC_X86) /c libc.c
142
        @$(CC_X86) /c uart.c
143
        @$(CC_X86) /c rtos_test.c
144
        @$(CC_X86) /c math.c
145
        @$(CC_X86) -o testrtos.exe rtos.obj libc.obj uart.obj rtos_test.obj math.obj
146
        testrtos.exe
147
 
148
# Test the TCP/IP protocol stack running on a PC
149
testip:
150
        @$(CC_X86) /c tcpip.c
151
        @$(CC_X86) /c http.c /DEXAMPLE_HTML
152
        @$(CC_X86) /c netutil.c
153
        @$(CC_X86) /c filesys.c
154
        @$(CC_X86) /c libc.c /I..\tools
155
        @$(CC_X86) /c /DSIMULATE_PLASMA ..\tools\etermip.c
156
        @$(CC_X86) -o testip.exe etermip.obj ..\tools\wpcap.lib \
157
        tcpip.obj http.obj netutil.obj filesys.obj libc.c
158
        @echo Try http://plasmb/.  Try telnet plasmb.  Try ftp plasmb.
159
        testip.exe
160
 
161 145 rhoads
clean:
162 246 rhoads
        -$(RM) *.o *.obj *.axf *.map *.lst *.hex *.txt *.bin *.exe
163 138 rhoads
 
164 246 rhoads
# Run a Plasma CPU opcode simulator (can execute rtos target)
165 138 rhoads
run:
166
        @..\tools\mlite test.bin
167
 
168
disassemble:
169
        -@..\tools\mlite test.bin BD > test.txt
170
 
171 246 rhoads
# Start the EtermIP terminal program to download the code to the Plasma CPU
172
# and permit an Ethernet packets to be transfered.
173
download:
174
        @echo Reset board before downloading code
175
        ..\tools\etermip
176 138 rhoads
 
177 246 rhoads
 

powered by: WebSVN 2.1.0

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