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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [makefile] - Diff between revs 302 and 308

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 308
# Makefile for Plasma RTOS and Plasma TCP/IP stack
# Makefile for Plasma RTOS and Plasma TCP/IP stack
# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.
# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.
# Customize for Linux
# Customize for Linux
#CC_X86 = gcc -Wall -O -g
#CC_X86 = gcc -Wall -O -g
#CP = cp
#CP = cp
#RM = rm -rf
#RM = rm -rf
#BIN_MIPS = ../../mips/sde/bin
#BIN_MIPS = ../../mips/sde/bin
#VHDL_DIR = ../vhdl
#VHDL_DIR = ../vhdl
#GCC_MIPS  = $(BIN_MIPS)/gcc $(CFLAGS)
#GCC_MIPS  = $(BIN_MIPS)/gcc $(CFLAGS)
#AS_MIPS   = $(BIN_MIPS)/as
#AS_MIPS   = $(BIN_MIPS)/as
#LD_MIPS   = $(BIN_MIPS)/ld
#LD_MIPS   = $(BIN_MIPS)/ld
#DUMP_MIPS = $(BIN_MIPS)/objdump
#DUMP_MIPS = $(BIN_MIPS)/objdump
# Customize for Windows
# Customize for Windows
CC_X86 = cl /O1 /DWIN32 /I..\tools /nologo
CC_X86 = cl /O1 /DWIN32 /I..\tools /nologo
CP = copy
CP = copy
RM = del
RM = del
BIN_MIPS = ..\gccmips_elf
BIN_MIPS = ..\gccmips_elf
VHDL_DIR = ..\vhdl
VHDL_DIR = ..\vhdl
GCC_MIPS  = $(BIN_MIPS)\gcc $(CFLAGS)
GCC_MIPS  = $(BIN_MIPS)\gcc $(CFLAGS)
AS_MIPS   = $(BIN_MIPS)\as
AS_MIPS   = $(BIN_MIPS)\as
LD_MIPS   = $(BIN_MIPS)\ld
LD_MIPS   = $(BIN_MIPS)\ld
DUMP_MIPS = $(BIN_MIPS)\objdump
DUMP_MIPS = $(BIN_MIPS)\objdump
# Use software multiplier (don't use mult.vhd)
# Use software multiplier (don't use mult.vhd)
CFLAGS_SW_MULT = -mno-mul -DUSE_SW_MULT
CFLAGS_SW_MULT = -mno-mul -DUSE_SW_MULT
# Use 16 fewer registers (make reg_bank.vhd smaller)
# Use 16 fewer registers (make reg_bank.vhd smaller)
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
CFLAGS_FEW_REGS = -ffixed-t0 -ffixed-t1 -ffixed-t2 -ffixed-t3 -ffixed-t4 -ffixed-t5 -ffixed-t6 -ffixed-t7 -ffixed-s0 -ffixed-s1 -ffixed-s2 -ffixed-s3 -ffixed-s4 -ffixed-s5 -ffixed-s6 -ffixed-s7
 
 
CFLAGS = -O2 -Wall -c -s -I..\tools -msoft-float
CFLAGS = -O2 -Wall -c -s -I..\tools -msoft-float
 
#CFLAGS += $(CFLAGS_SW_MULT)
 
#CFLAGS += $(CFLAGS_FEW_REGS)
 
 
# Build just the Plasma RTOS for Plasma CPU
# Build just the Plasma RTOS for Plasma CPU
rtos:
rtos:
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) uart.c
        $(GCC_MIPS) uart.c
        $(GCC_MIPS) rtos_test.c
        $(GCC_MIPS) rtos_test.c
        $(GCC_MIPS) math.c
        $(GCC_MIPS) math.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o
        boot.o rtos.o libc.o uart.o rtos_test.o math.o
        ..\tools\convert_bin
        ..\tools\convert_bin
        @sort test2.map
        @sort test2.map
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
 
 
 
rtos_nomult:
 
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
 
        $(AS_MIPS) -o mult_sim.o ..\tools\mult_sim.asm
 
        $(GCC_MIPS) rtos.c
 
        $(GCC_MIPS) libc.c
 
        $(GCC_MIPS) uart.c
 
        $(GCC_MIPS) rtos_test.c
 
        $(GCC_MIPS) math.c
 
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
 
        boot.o rtos.o libc.o uart.o rtos_test.o math.o mult_sim.o
 
        @sort test2.map
 
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
 
        ..\tools\nomult test.axf test.lst test.map
 
        @$(DUMP_MIPS) --disassemble test.axf > test2.lst
 
        ..\tools\convert_bin
 
 
# Build the Plasma RTOS, Plasma TCP/IP stack, and web server for the Plasma CPU
# Build the Plasma RTOS, Plasma TCP/IP stack, and web server for the Plasma CPU
rtos_tcpip:
rtos_tcpip:
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) uart.c
        $(GCC_MIPS) uart.c
        $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE
        $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE
        $(GCC_MIPS) math.c
        $(GCC_MIPS) math.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML
        $(GCC_MIPS) netutil.c
        $(GCC_MIPS) netutil.c
        $(GCC_MIPS) filesys.c
        $(GCC_MIPS) filesys.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        http.o netutil.o filesys.o
        http.o netutil.o filesys.o
        ..\tools\convert_bin
        ..\tools\convert_bin
        @sort test2.map
        @sort test2.map
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
rtos_tcpip_eth:
rtos_tcpip_eth:
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) uart.c -DNO_PACKETS
        $(GCC_MIPS) uart.c -DNO_PACKETS
        $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE
        $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE
        $(GCC_MIPS) math.c
        $(GCC_MIPS) math.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML
        $(GCC_MIPS) netutil.c
        $(GCC_MIPS) netutil.c
        $(GCC_MIPS) filesys.c
        $(GCC_MIPS) filesys.c
        $(GCC_MIPS) ethernet.c
        $(GCC_MIPS) ethernet.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        http.o netutil.o filesys.o ethernet.o
        http.o netutil.o filesys.o ethernet.o
        ..\tools\convert_bin
        ..\tools\convert_bin
        @sort test2.map
        @sort test2.map
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
# Build full test application
# Build full test application
rtosuart:
rtosuart:
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) uart.c
        $(GCC_MIPS) uart.c
        $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE
        $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE
        $(GCC_MIPS) math.c
        $(GCC_MIPS) math.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS
        $(GCC_MIPS) netutil.c
        $(GCC_MIPS) netutil.c
        $(GCC_MIPS) filesys.c
        $(GCC_MIPS) filesys.c
        $(GCC_MIPS) -I. ..\app\html.c -DMainThread=HtmlThread
        $(GCC_MIPS) -I. ..\app\html.c -DMainThread=HtmlThread
        $(GCC_MIPS) -I. ..\app\image.c
        $(GCC_MIPS) -I. ..\app\image.c
        $(GCC_MIPS) -I. ..\app\tictac.c
        $(GCC_MIPS) -I. ..\app\tictac.c
        $(GCC_MIPS) -I. ..\app\tic3d.c
        $(GCC_MIPS) -I. ..\app\tic3d.c
        $(GCC_MIPS) -I. ..\app\connect4.c
        $(GCC_MIPS) -I. ..\app\connect4.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        http.o netutil.o filesys.o html.o image.o tictac.o tic3d.o connect4.o
        http.o netutil.o filesys.o html.o image.o tictac.o tic3d.o connect4.o
        ..\tools\convert_bin
        ..\tools\convert_bin
        @sort test2.map
        @sort test2.map
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
# Build full test application
# Build full test application
rtosfull:
rtosfull:
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(AS_MIPS) -o boot.o ..\tools\boot.asm
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) rtos.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) libc.c
        $(GCC_MIPS) uart.c -DNO_PACKETS
        $(GCC_MIPS) uart.c -DNO_PACKETS
        $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE
        $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE
        $(GCC_MIPS) math.c
        $(GCC_MIPS) math.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) tcpip.c
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS
        $(GCC_MIPS) http.c -DINCLUDE_FILESYS
        $(GCC_MIPS) netutil.c -DINCLUDE_FLASH
        $(GCC_MIPS) netutil.c -DINCLUDE_FLASH
        $(GCC_MIPS) filesys.c -DINCLUDE_FLASH
        $(GCC_MIPS) filesys.c -DINCLUDE_FLASH
        $(GCC_MIPS) ethernet.c
        $(GCC_MIPS) ethernet.c
        $(GCC_MIPS) flash.c
        $(GCC_MIPS) flash.c
        $(GCC_MIPS) -I. ..\app\html.c -DMainThread=HtmlThread
        $(GCC_MIPS) -I. ..\app\html.c -DMainThread=HtmlThread
        $(GCC_MIPS) -I. ..\app\image.c
        $(GCC_MIPS) -I. ..\app\image.c
        $(GCC_MIPS) -I. ..\app\tictac.c
        $(GCC_MIPS) -I. ..\app\tictac.c
        $(GCC_MIPS) -I. ..\app\tic3d.c
        $(GCC_MIPS) -I. ..\app\tic3d.c
        $(GCC_MIPS) -I. ..\app\connect4.c
        $(GCC_MIPS) -I. ..\app\connect4.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \
        http.o netutil.o filesys.o ethernet.o flash.o \
        http.o netutil.o filesys.o ethernet.o flash.o \
        html.o image.o tictac.o tic3d.o connect4.o
        html.o image.o tictac.o tic3d.o connect4.o
        ..\tools\convert_bin
        ..\tools\convert_bin
        @sort test2.map
        @sort test2.map
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
# Test the RTOS running on a PC
# Test the RTOS running on a PC
testrtos:
testrtos:
        @$(CC_X86) /c rtos.c
        @$(CC_X86) /c rtos.c
        @$(CC_X86) /c libc.c
        @$(CC_X86) /c libc.c
        @$(CC_X86) /c uart.c
        @$(CC_X86) /c uart.c
        @$(CC_X86) /c rtos_test.c
        @$(CC_X86) /c rtos_test.c
        @$(CC_X86) /c math.c
        @$(CC_X86) /c math.c
        @$(CC_X86) -o testrtos.exe rtos.obj libc.obj uart.obj rtos_test.obj math.obj
        @$(CC_X86) -o testrtos.exe rtos.obj libc.obj uart.obj rtos_test.obj math.obj
        testrtos.exe
        testrtos.exe
# Test the TCP/IP protocol stack running on a PC
# Test the TCP/IP protocol stack running on a PC
testip:
testip:
        @$(CC_X86) /c tcpip.c
        @$(CC_X86) /c tcpip.c
        @$(CC_X86) /c http.c /DEXAMPLE_HTML
        @$(CC_X86) /c http.c /DEXAMPLE_HTML
        @$(CC_X86) /c netutil.c
        @$(CC_X86) /c netutil.c
        @$(CC_X86) /c filesys.c
        @$(CC_X86) /c filesys.c
        @$(CC_X86) /c libc.c /I..\tools
        @$(CC_X86) /c libc.c /I..\tools
        @$(CC_X86) /c /DSIMULATE_PLASMA ..\tools\etermip.c
        @$(CC_X86) /c /DSIMULATE_PLASMA ..\tools\etermip.c
        @$(CC_X86) /c os_stubs.c
        @$(CC_X86) /c os_stubs.c
        @$(CC_X86) -o testip.exe etermip.obj ..\tools\wpcap.lib \
        @$(CC_X86) -o testip.exe etermip.obj ..\tools\wpcap.lib \
        tcpip.obj http.obj netutil.obj filesys.obj libc.c os_stubs.c
        tcpip.obj http.obj netutil.obj filesys.obj libc.c os_stubs.c
        @echo Try http://plasmb/.  Try telnet plasmb.  Try ftp plasmb.
        @echo Try http://plasmb/.  Try telnet plasmb.  Try ftp plasmb.
        testip.exe
        testip.exe
clean:
clean:
        -$(RM) *.o *.obj *.axf *.map *.lst *.hex *.txt *.bin *.exe
        -$(RM) *.o *.obj *.axf *.map *.lst *.hex *.txt *.bin *.exe
# Run a Plasma CPU opcode simulator (can execute rtos target)
# Run a Plasma CPU opcode simulator (can execute rtos target)
run:
run:
        @..\tools\mlite test.bin
        @..\tools\mlite test.bin
disassemble:
disassemble:
        -@..\tools\mlite test.bin BD > test.txt
        -@..\tools\mlite test.bin BD > test.txt
# Start the EtermIP terminal program to download the code to the Plasma CPU
# Start the EtermIP terminal program to download the code to the Plasma CPU
# and permit an Ethernet packets to be transfered.
# and permit an Ethernet packets to be transfered.
download:
download:
        @echo Reset board before downloading code
        @echo Reset board before downloading code
        ..\tools\etermip
        ..\tools\etermip
 
 

powered by: WebSVN 2.1.0

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