]> rtime.felk.cvut.cz Git - fpga/plasma.git/blobdiff - kernel/makefile
Initial commit on "lightweight" branch.
[fpga/plasma.git] / kernel / makefile
diff --git a/kernel/makefile b/kernel/makefile
deleted file mode 100644 (file)
index 7ac265e..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-# Makefile for Plasma RTOS and Plasma TCP/IP stack\r
-\r
-ifeq ($(LANG),)\r
-\r
-# Customize for Windows\r
-# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.\r
-CC_X86 = cl /O1 /nologo /I..\tools\r
-CP = copy\r
-RM = del\r
-DWIN32 = -DWIN32\r
-BIN_MIPS = ..\gccmips_elf\r
-TOOLS_DIR = ..\tools\\\r
-TOOLS2_DIR = ..\tools\r
-APP_DIR = ..\App\\\r
-LINUX_PWD =\r
-ALIASING  =\r
-GCC_MIPS  = $(BIN_MIPS)\gcc $(CFLAGS)\r
-AS_MIPS   = $(BIN_MIPS)\as\r
-LD_MIPS   = $(BIN_MIPS)\ld\r
-DUMP_MIPS = $(BIN_MIPS)\objdump\r
-CONVERT_BIN = $(TOOLS_DIR)convert_bin.exe\r
-OBJ = obj\r
-CFLAGS_X86 = /c /DWIN32\r
-LFLAGS_X86 =\r
-\r
-else\r
-\r
-# Customized for Linux\r
-# See the GNU GCC tab on the Opencores Plasma page\r
-CC_X86 = gcc -Wall -O -g -I../tools\r
-CP = cp\r
-RM = rm -rf \r
-DWIN32 =\r
-TOOLS_DIR = ../tools/\r
-TOOLS2_DIR = ../tools\r
-APP_DIR = ../App/\r
-LINUX_PWD = ./\r
-ALIASING  = -fno-strict-aliasing\r
-GCC_MIPS  = $(BIN_MIPS)mips-elf-gcc $(CFLAGS)\r
-AS_MIPS   = $(BIN_MIPS)mips-elf-as\r
-LD_MIPS   = $(BIN_MIPS)mips-elf-ld\r
-DUMP_MIPS = $(BIN_MIPS)mips-elf-objdump\r
-CONVERT_BIN = $(TOOLS_DIR)convert_bin.exe\r
-#CONVERT_BIN = $(BIN_MIPS)mips-elf-objcopy -I elf32-big -O binary test.axf test.bin\r
-OBJ = o\r
-CFLAGS_X86 = -c -DWIN32 -DLINUX\r
-LFLAGS_X86 = -lm\r
-\r
-endif\r
-\r
-# Use software multiplier (don't use mult.vhd)\r
-CFLAGS_SW_MULT = -mno-mul -DUSE_SW_MULT\r
-\r
-# Use 16 fewer registers (make reg_bank.vhd smaller)\r
-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 \r
-\r
-CFLAGS = -O2 -Wall -c -s -I$(TOOLS2_DIR) -msoft-float -fno-builtin\r
-#CFLAGS += $(CFLAGS_SW_MULT)\r
-#CFLAGS += $(CFLAGS_FEW_REGS)\r
-\r
-# Build just the Plasma RTOS for Plasma CPU\r
-rtos: \r
-       $(AS_MIPS) -o boot.o $(TOOLS_DIR)boot.asm\r
-       $(GCC_MIPS) rtos.c\r
-       $(GCC_MIPS) libc.c\r
-       $(GCC_MIPS) uart.c\r
-       $(GCC_MIPS) rtos_test.c\r
-       $(GCC_MIPS) math.c $(ALIASING)\r
-       $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \\r
-       boot.o rtos.o libc.o uart.o rtos_test.o math.o \r
-       $(CONVERT_BIN)\r
-       @sort <test.map >test2.map\r
-       @$(DUMP_MIPS) --disassemble test.axf > test.lst\r
-\r
-# Build the Plasma RTOS, Plasma TCP/IP stack, and web server for the Plasma CPU\r
-# Use the serial port and etermip for TCP/IP packets\r
-rtos_tcpip:\r
-       $(AS_MIPS) -o boot.o $(TOOLS_DIR)boot.asm\r
-       $(GCC_MIPS) rtos.c\r
-       $(GCC_MIPS) libc.c\r
-       $(GCC_MIPS) uart.c\r
-       $(GCC_MIPS) rtos_test.c -DINCLUDE_HTML -DINCLUDE_CONSOLE\r
-       $(GCC_MIPS) math.c $(ALIASING)\r
-       $(GCC_MIPS) tcpip.c -DINCLUDE_FILESYS\r
-       $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML\r
-       $(GCC_MIPS) netutil.c\r
-       $(GCC_MIPS) filesys.c\r
-       $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \\r
-       boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \\r
-       http.o netutil.o filesys.o\r
-       $(CONVERT_BIN)\r
-       @sort <test.map >test2.map\r
-       @$(DUMP_MIPS) --disassemble test.axf > test.lst\r
-\r
-# Use Ethernet for TCP/IP packets, use flash file system\r
-rtos_tcpip_eth:\r
-       $(AS_MIPS) -o boot.o $(TOOLS_DIR)boot.asm\r
-       $(GCC_MIPS) rtos.c\r
-       $(GCC_MIPS) libc.c\r
-       $(GCC_MIPS) uart.c -DNO_PACKETS\r
-       $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE\r
-       $(GCC_MIPS) math.c $(ALIASING)\r
-       $(GCC_MIPS) tcpip.c -DINCLUDE_FILESYS\r
-       $(GCC_MIPS) http.c -DINCLUDE_FILESYS -DEXAMPLE_HTML\r
-       $(GCC_MIPS) netutil.c -DINCLUDE_FLASH -DDLL_SETUP\r
-       $(GCC_MIPS) filesys.c -DINCLUDE_FLASH\r
-       $(GCC_MIPS) ethernet.c\r
-       $(GCC_MIPS) flash.c\r
-       $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \\r
-       boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \\r
-       http.o netutil.o filesys.o ethernet.o flash.o\r
-       $(CONVERT_BIN)\r
-       @sort <test.map >test2.map\r
-       @$(DUMP_MIPS) --disassemble test.axf > test.lst\r
-\r
-# Build full test application.  (Use rtos_tcpip_eth instead.) \r
-rtosfull: \r
-       $(AS_MIPS) -o boot.o $(TOOLS_DIR)boot.asm\r
-       $(GCC_MIPS) rtos.c\r
-       $(GCC_MIPS) libc.c\r
-       $(GCC_MIPS) uart.c -DNO_PACKETS\r
-       $(GCC_MIPS) rtos_test.c -DINCLUDE_ETH -DINCLUDE_CONSOLE\r
-       $(GCC_MIPS) math.c $(ALIASING)\r
-       $(GCC_MIPS) tcpip.c -DINCLUDE_FILESYS\r
-       $(GCC_MIPS) http.c -DINCLUDE_FILESYS\r
-       $(GCC_MIPS) netutil.c -DINCLUDE_FLASH -DDLL_SETUP\r
-       $(GCC_MIPS) filesys.c -DINCLUDE_FLASH\r
-       $(GCC_MIPS) ethernet.c\r
-       $(GCC_MIPS) flash.c\r
-       $(GCC_MIPS) -I. $(APP_DIR)html.c -DMainThread=HtmlThread\r
-       $(GCC_MIPS) -I. $(APP_DIR)image.c\r
-       $(GCC_MIPS) -I. $(APP_DIR)tictac.c\r
-       $(GCC_MIPS) -I. $(APP_DIR)tic3d.c\r
-       $(GCC_MIPS) -I. $(APP_DIR)connect4.c\r
-       $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \\r
-       boot.o rtos.o libc.o uart.o rtos_test.o math.o tcpip.o \\r
-       http.o netutil.o filesys.o ethernet.o flash.o \\r
-       html.o image.o tictac.o tic3d.o connect4.o \r
-       $(CONVERT_BIN)\r
-       @sort <test.map >test2.map\r
-       @$(DUMP_MIPS) --disassemble test.axf > test.lst\r
-\r
-# Create a separate Dynamically Linked Library executable\r
-# ftp test.bin to /flash/web/dlltest\r
-# telnet to board and execute "dlltest"\r
-dlltest:\r
-       $(GCC_MIPS) -G0 dlltest.c\r
-       $(LD_MIPS) -Ttext 0x10100000 -s -N -o test.axf dlltest.o\r
-       $(CONVERT_BIN)\r
-       @$(DUMP_MIPS) --disassemble test.axf > test.lst\r
-\r
-# Test the RTOS running on a PC\r
-testrtos:\r
-       @$(CC_X86) $(CFLAGS_X86) rtos.c\r
-       @$(CC_X86) $(CFLAGS_X86) libc.c \r
-       @$(CC_X86) $(CFLAGS_X86) uart.c\r
-       @$(CC_X86) $(CFLAGS_X86) rtos_test.c\r
-       @$(CC_X86) $(CFLAGS_X86) math.c $(ALIASING)\r
-       @$(CC_X86) $(LFLAGS_X86) -o testrtos.exe rtos.$(OBJ) libc.$(OBJ) uart.$(OBJ) rtos_test.$(OBJ) math.$(OBJ) \r
-       $(LINUX_PWD)testrtos.exe\r
-\r
-# Test the TCP/IP protocol stack running on a PC (requires Windows)\r
-testip:\r
-       @$(CC_X86) $(CFLAGS_X86) tcpip.c\r
-       @$(CC_X86) $(CFLAGS_X86) http.c /DEXAMPLE_HTML\r
-       @$(CC_X86) $(CFLAGS_X86) netutil.c\r
-       @$(CC_X86) $(CFLAGS_X86) filesys.c\r
-       @$(CC_X86) $(CFLAGS_X86) libc.c /I$(TOOLS_DIR) \r
-       @$(CC_X86) $(CFLAGS_X86) /DSIMULATE_PLASMA $(TOOLS_DIR)etermip.c\r
-       @$(CC_X86) $(CFLAGS_X86) os_stubs.c\r
-       @$(CC_X86) -o testip.exe etermip.obj $(TOOLS_DIR)wpcap.lib \\r
-       tcpip.obj http.obj netutil.obj filesys.obj libc.obj os_stubs.obj\r
-       @echo Try http://plasmb/.  Try telnet plasmb.  Try ftp plasmb.\r
-       $(LINUX_PWD)testip.exe\r
-\r
-clean:\r
-       -$(RM) *.o *.obj *.axf *.map *.lst *.hex *.txt *.bin *.exe\r
-\r
-# Run a Plasma CPU opcode simulator (can execute rtos target)\r
-run: \r
-       @$(TOOLS_DIR)mlite.exe test.bin \r
-\r
-disassemble:\r
-       -@$(TOOLS_DIR)mlite.exe test.bin BD > test.txt\r
-\r
-# Start the EtermIP terminal program to download the code to the Plasma CPU\r
-# and permit an Ethernet packets to be transfered.\r
-download:\r
-       @echo Reset board before downloading code\r
-       $(TOOLS_DIR)etermip.exe\r
-\r
-\r