head 1.20; access; symbols V3_0:1.11 V2_1:1.10 Version_1_0:1.1.1.1 arelease:1.1.1.1 avendor:1.1.1; locks; strict; comment @# @; 1.20 date 2008.01.28.02.37.04; author rhoads; state Exp; branches; next 1.19; commitid 7762479d3fcf4567; 1.19 date 2007.12.15.16.39.35; author rhoads; state Exp; branches; next 1.18; commitid 68d5476403454567; 1.18 date 2007.06.15.05.53.27; author rhoads; state Exp; branches; next 1.17; commitid 584c467229554567; 1.17 date 2007.03.28.05.38.01; author rhoads; state Exp; branches; next 1.16; commitid 26f84609ff374567; 1.16 date 2007.02.13.19.51.05; author rhoads; state Exp; branches; next 1.15; commitid 42c745d216a54567; 1.15 date 2007.02.12.05.20.51; author rhoads; state Exp; branches; next 1.14; commitid 252845cff9314567; 1.14 date 2007.01.13.22.53.04; author rhoads; state Exp; branches; next 1.13; commitid 4ae845a962cd4567; 1.13 date 2007.01.13.21.34.01; author rhoads; state Exp; branches; next 1.12; commitid 1ac645a950454567; 1.12 date 2006.10.05.04.50.18; author rhoads; state Exp; branches; next 1.11; commitid 6adc45248f084567; 1.11 date 2006.03.06.01.59.54; author rhoads; state Exp; branches; next 1.10; commitid 6714440b97924567; 1.10 date 2004.06.08.02.46.23; author rhoads; state Exp; branches; next 1.9; 1.9 date 2002.06.17.00.03.56; author rhoads; state Exp; branches; next 1.8; 1.8 date 2002.05.30.02.23.29; author rhoads; state Exp; branches; next 1.7; 1.7 date 2002.02.06.21.31.00; author rhoads; state Exp; branches; next 1.6; 1.6 date 2002.02.06.21.12.38; author rhoads; state Exp; branches; next 1.5; 1.5 date 2002.01.16.03.11.19; author rhoads; state Exp; branches; next 1.4; 1.4 date 2002.01.15.04.47.40; author rhoads; state Exp; branches; next 1.3; 1.3 date 2002.01.13.03.43.45; author rhoads; state Exp; branches; next 1.2; 1.2 date 2001.12.26.19.59.15; author rhoads; state Exp; branches; next 1.1; 1.1 date 2001.05.17.21.22.50; author rhoads; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.05.17.21.22.50; author rhoads; state Exp; branches; next ; desc @@ 1.20 log @Added objcopy comments @ text @# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler. # The CC_X86 is for compiling tools on your PC. # The GCC_MIPS is for compiling code on the target. # Convert_bin changes test.axf into code.txt which is used by the VHDL. # Convert_bin == "objcopy -I elf32-big -O binary test.axf test.bin" # Customize for Linux (for Linux GCC compiler see http://buildd.emdebian.org/) # The site http://www.mips.com/ also has a MIPS cross compiler. #CC_X86 = gcc -Wall -O -g #CP = cp #RM = rm -rf #BIN_MIPS = ../../mips/sde/bin #VHDL_DIR = ../vhdl #GCC_MIPS = $(BIN_MIPS)/gcc $(CFLAGS) #AS_MIPS = $(BIN_MIPS)/as #LD_MIPS = $(BIN_MIPS)/ld #DUMP_MIPS = $(BIN_MIPS)/objdump # Customize for Windows CC_X86 = cl /O1 /nologo CP = copy RM = del BIN_MIPS = ..\gccmips_elf VHDL_DIR = ..\vhdl GCC_MIPS = $(BIN_MIPS)\gcc $(CFLAGS) AS_MIPS = $(BIN_MIPS)\as LD_MIPS = $(BIN_MIPS)\ld DUMP_MIPS = $(BIN_MIPS)\objdump CFLAGS = -O2 -Wall -c -s all: convert_bin.exe tracehex.exe bintohex.exe ram_image.exe @@echo make targets = count, opcodes, pi, test, run, tohex,\ bootldr, toimage, etermip clean: -$(RM) *.o *.obj *.map *.lst *.hex *.txt *.exe *.axf #Same as "objcopy -I elf32-big -O binary test.axf test.bin" convert_bin.exe: convert.c @@$(CC_X86) -o convert_bin.exe convert.c convert_le.exe: convert.c @@$(CC_X86) -DLITTLE_ENDIAN -o convert_le.exe convert.c mlite.exe: mlite.c @@$(CC_X86) -o mlite.exe mlite.c -DWIN32 tracehex.exe: tracehex.c @@$(CC_X86) -o tracehex.exe tracehex.c bintohex.exe: bintohex.c @@$(CC_X86) -o bintohex.exe bintohex.c ram_image.exe: ram_image.c @@$(CC_X86) -o ram_image.exe ram_image.c # Terminal program that will download a new image and supports Ethernet # traffic over UART. Get wpcap.lib from http://www.winpcap.org/. etermip: etermip.c -@@$(CC_X86) -o etermip.exe etermip.c wpcap.lib @@echo Get wpcap.lib from http://www.winpcap.org/ download: etermip @@echo Reset board before downloading code etermip opcodes: $(AS_MIPS) -o opcodes.o opcodes.asm $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf opcodes.o -@@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) opcodes2: $(AS_MIPS) -o opcodes.o opcodes.asm $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf opcodes.o -@@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) test: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) test.c $(GCC_MIPS) no_os.c $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \ boot.o test.o no_os.o -@@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) count: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) count.c $(GCC_MIPS) no_os.c $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \ boot.o count.o no_os.o -$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) count2: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) count.c $(GCC_MIPS) no_os.c $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \ boot.o count.o no_os.o -$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) count3: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) count.c $(GCC_MIPS) no_os.c $(LD_MIPS) -Ttext 0x1000 -eentry -Map test.map -s -N -o test.axf \ boot.o count.o no_os.o -$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) pi: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) pi.c $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \ boot.o pi.o @@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) pi2: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) pi.c $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \ boot.o pi.o @@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) ddr_test: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) ddr_init.c -DDDR_TEST_MAIN $(GCC_MIPS) no_os.c $(LD_MIPS) -Ttext 0x0 -eentry -Map test.map -s -N -o test.axf \ boot.o ddr_init.o no_os.o @@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) memtest: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) memtest.c $(LD_MIPS) -Ttext 0x1000 -eentry -o test.axf boot.o memtest.o convert_bin.exe memtest2: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) -DINIT_DDR memtest.c $(GCC_MIPS) ddr_init.c $(LD_MIPS) -Ttext 0x0 -eentry -o test.axf boot.o memtest.o ddr_init.o convert_bin.exe memtest3: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) memtest.c $(LD_MIPS) -Ttext 0x10000000 -eentry -o test.axf boot.o memtest.o convert_bin.exe bootldr: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) bootldr.c $(GCC_MIPS) no_os.c $(GCC_MIPS) -DDLL_DISABLE ddr_init.c $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \ boot.o bootldr.o no_os.o ddr_init.o @@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) @@echo Next do "make toimage" or "make tohex". bootldr2: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) bootldr.c $(GCC_MIPS) no_os.c $(GCC_MIPS) -DDLL_DISABLE ddr_init.c $(LD_MIPS) -Ttext 0x1000 -eentry -Map test.map -s -N -o test.axf \ boot.o bootldr.o no_os.o ddr_init.o @@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_bin.exe $(CP) code.txt $(VHDL_DIR) bootldr_little_endian: convert_le.exe $(AS_MIPS) -EL -o boot.o boot.asm $(GCC_MIPS) -EL bootldr.c $(GCC_MIPS) -EL no_os.c $(GCC_MIPS) -EL ddr_init.c $(LD_MIPS) -EL -Ttext 0 -eentry -Map test.map -s -N -o test.axf \ boot.o bootldr.o no_os.o ddr_init.o @@$(DUMP_MIPS) --disassemble test.axf > test.lst convert_le.exe $(CP) code.txt $(VHDL_DIR) # Run a MIPS opcode simulator run: mlite.exe @@mlite.exe test.bin run_little_endian: mlite.exe @@mlite.exe test.bin L disassemble: mlite.exe mlite.exe test.bin BD > test.txt # Used by Altera FPGAs for ram image tohex: bintohex.exe bintohex.exe test.bin $(CP) code*.hex $(VHDL_DIR) # Used by Xilinx FPGAs for ram image toimage: ram_image.exe ../vhdl/ram_xilinx.vhd ../vhdl/code.txt ../vhdl/ram_image.vhd @ 1.19 log @Added target for DDR development @ text @d5 1 d7 2 a8 1 # Customize for Linux d39 1 d163 6 d179 12 @ 1.18 log @Added etermip program to download code and transfer Ethernet packets. @ text @a29 1 d35 1 a35 1 -$(RM) *.o *.obj *.map *.lst *.hex *.txt *.exe d109 10 d137 23 d164 1 d166 1 a166 1 boot.o bootldr.o no_os.o d175 1 d177 1 a177 1 boot.o bootldr.o no_os.o @ 1.17 log @Use linker values _gp, __bss_start, _end, and InitStack @ text @d18 1 a18 1 CC_X86 = cl /O1 d32 2 a33 1 @@echo make targets = count, opcodes, pi, test, run, tohex, toimage d36 1 a36 1 -$(RM) *.o *.obj *.map *.lst *.hex *.txt d56 10 d155 2 a156 2 disassemble: -@@mlite.exe test.bin BD > test.txt d159 2 a160 2 tohex: bintohex.exe test2.exe @ 1.16 log @Better DOS support @ text @d28 1 a28 1 CFLAGS = -O2 -Wall -c -s d32 1 a32 1 @@echo make targets = count, opcodes, pi, test, run, tohex, toimage, rtos @ 1.15 log @Changed test.exe to test.axf @ text @d12 4 d21 1 a21 1 BIN_MIPS = ../gccmips_elf d23 4 a29 4 GCC_MIPS = $(BIN_MIPS)/gcc $(CFLAGS) AS_MIPS = $(BIN_MIPS)/as LD_MIPS = $(BIN_MIPS)/ld DUMP_MIPS = $(BIN_MIPS)/objdump @ 1.14 log @Better support for Windows @ text @d4 1 a4 1 # Convert_bin changes test.exe into code.txt which is used by the VHDL. d53 2 a54 2 $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe opcodes.o -@@$(DUMP_MIPS) --disassemble test.exe > test.lst d60 2 a61 2 $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.exe opcodes.o -@@$(DUMP_MIPS) --disassemble test.exe > test.lst d69 1 a69 1 $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \ d71 1 a71 1 -@@$(DUMP_MIPS) --disassemble test.exe > test.lst d79 1 a79 1 $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \ d81 1 a81 1 -$(DUMP_MIPS) --disassemble test.exe > test.lst d89 1 a89 1 $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.exe \ d91 1 a91 1 -$(DUMP_MIPS) --disassemble test.exe > test.lst d98 1 a98 1 $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \ d100 1 a100 1 @@$(DUMP_MIPS) --disassemble test.exe > test.lst d107 1 a107 1 $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.exe \ d109 1 a109 1 @@$(DUMP_MIPS) --disassemble test.exe > test.lst d117 1 a117 1 $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \ d119 1 a119 1 @@$(DUMP_MIPS) --disassemble test.exe > test.lst d127 1 a127 1 $(LD_MIPS) -EL -Ttext 0 -eentry -Map test.map -s -N -o test.exe \ d129 1 a129 1 @@$(DUMP_MIPS) --disassemble test.exe > test.lst @ 1.13 log @Better Linux support @ text @d10 2 a11 1 #BIN_MIPS =../../mips/sde/bin d17 2 a18 1 BIN_MIPS =../gccmips_elf a21 1 d56 1 a56 1 $(CP) code.txt ../vhdl d63 1 a63 1 $(CP) code.txt ../vhdl d73 1 a73 1 $(CP) code.txt ../vhdl d83 1 a83 1 $(CP) code.txt ../vhdl d93 1 a93 1 $(CP) code.txt ../vhdl d102 1 a102 1 $(CP) code.txt ../vhdl d111 1 a111 1 $(CP) code.txt ../vhdl d121 1 a121 1 $(CP) code.txt ../vhdl d131 1 a131 1 $(CP) code.txt ../vhdl d146 1 a146 1 $(CP) code*.hex ../vhdl @ 1.12 log @Added targets bootldr_little_endian and run_little_endian @ text @d6 7 a12 1 #CC_X86 = gcc_x86 -O d14 3 a18 4 GCC_MIPS = gcc $(CFLAGS) AS_MIPS = as LD_MIPS = ld DUMP_MIPS = objdump d20 7 a26 1 all: convert_bin.exe mlite.exe tracehex.exe bintohex.exe ram_image.exe d30 1 a30 1 -del *.o *.obj *.exe *.map *.lst *.hex *.txt d50 1 a50 1 opcodes: all d54 2 a55 2 convert_bin copy code.txt ..\vhdl d57 1 a57 1 opcodes2: all d61 2 a62 2 convert_bin copy code.txt ..\vhdl d64 1 a64 1 test: all d71 2 a72 2 convert_bin copy code.txt ..\vhdl d74 1 a74 1 count: all d81 2 a82 2 convert_bin copy code.txt ..\vhdl d84 1 a84 1 count2: all d91 2 a92 2 convert_bin copy code.txt ..\vhdl d94 1 a94 1 pi: all d100 2 a101 2 convert_bin copy code.txt ..\vhdl d103 1 a103 1 pi2: all d109 2 a110 2 convert_bin copy code.txt ..\vhdl d112 1 a112 1 bootldr: all d119 2 a120 2 convert_bin copy code.txt ..\vhdl d122 1 a122 1 bootldr_little_endian: all convert_le.exe d129 2 a130 2 convert_le copy code.txt ..\vhdl d134 1 a134 1 @@mlite test.bin d137 1 a137 1 @@mlite test.bin L d140 1 a140 1 -@@mlite test.bin BD > test.txt d144 2 a145 2 bintohex test2.exe copy code*.hex ..\vhdl d149 1 a149 1 ram_image ..\vhdl\ram_xilinx.vhd ..\vhdl\code.txt ..\vhdl\ram_image.vhd @ 1.11 log @Updated to Plasma Version 3 @ text @d24 3 d111 10 d125 3 @ 1.10 log @Added note that CC is for x86 and gmake has problems with MIPS gcc libraries. @ text @d1 13 a13 4 # NOTE: CC is for the x86 compiler to compile the PC based tools. # Gcc is for the MIPS test code. # If you get an error using GNU make.exe try a different make utility. # The MIPS gcc compiler libraries cause problems with GNU make. d15 2 a16 2 CC = cl /O1 #CC = gcc_x86 -O d18 2 a19 2 all: convert.exe mlite.exe tracehex.exe bintohex.exe @@echo make targets = count, opcodes, pi, test, run, tohex d21 2 a22 2 convert.exe: convert.c @@$(CC) -o convert.exe convert.c d25 1 a25 1 @@$(CC) -o mlite.exe mlite.c d28 1 a28 1 @@$(CC) -o tracehex.exe tracehex.c d31 1 a31 1 @@$(CC) -o bintohex.exe bintohex.c d33 2 a34 3 tohex: bintohex test2.exe copy code*.hex ..\vhdl d37 12 a48 6 as -o opcodes.o opcodes.asm ld -Ttext 0 -eentry -Map test.map -s -N -o test.exe opcodes.o -@@objdump --disassemble test.exe > test.lst @@convert -@@mlite test2.exe BD > test.txt @@copy code.txt ..\vhdl d51 8 a58 7 as -o boot.o boot.asm gcc -O -DMLITE -Dmain=main2 -Wall -c -s test.c ld -Ttext 0 -eentry -Map test.map -s -N -o test.exe boot.o test.o -@@objdump --disassemble test.exe > test.lst @@convert -@@mlite test2.exe BD > test.txt @@copy code.txt ..\vhdl d61 17 a77 6 as -o boot.o boot.asm gcc -O -DMLITE -Dmain=main2 -Wall -c -s count.c ld -Ttext 0 -eentry -Map test.map -s -N -o test.exe boot.o count.o -objdump --disassemble test.exe > test.lst convert -mlite test2.exe BD > test.txt d81 7 a87 7 as -o boot.o boot.asm gcc -O -DMLITE -Dmain=main2 -Wall -c -s pi.c ld -Ttext 0 -eentry -Map test.map -s -N -o test.exe boot.o pi.o @@objdump --disassemble test.exe > test.lst @@convert -@@mlite test2.exe BD > test.txt @@copy code.txt ..\vhdl d89 20 d110 13 a122 1 @@mlite test2.exe B @ 1.9 log @ELF support @ text @d1 5 a5 1 #WARNING: Now uses the gccmips_elf.zip compiler! @ 1.8 log @Altera @ text @d1 3 a3 2 CC = cl #CC = gcc_x86 d6 1 d21 1 a21 1 bintohex test2.exe 8192 d34 1 a34 1 gcc -DMLITE -Dmain=main2 -Wall -c -s test.c d43 1 a43 1 gcc -DMLITE -Dmain=main2 -Wall -c -s count.c d45 4 a48 4 -@@objdump --disassemble test.exe > test.lst @@convert -@@mlite test2.exe BD > test.txt @@copy code.txt ..\vhdl d52 1 a52 1 gcc -DMLITE -Dmain=main2 -Wall -c -s pi.c a60 1 @ 1.7 log @Changed name to M-lite to avoid trademark issues. @ text @d1 4 a4 1 all: convert.exe mlite.exe tracehex.exe d7 1 a7 1 @@cl convert.c d10 1 a10 1 @@cl mlite.c d13 8 a20 1 @@cl tracehex.c @ 1.6 log @Changed name to M-lite to avoid trademark issues. @ text @d22 1 a22 1 gcc -DMIPS -Dmain=main2 -Wall -c -s test.c d31 1 a31 1 gcc -DMIPS -Dmain=main2 -Wall -c -s count.c d40 1 a40 1 gcc -DMIPS -Dmain=main2 -Wall -c -s pi.c @ 1.5 log @added count target @ text @d1 1 a1 1 all: convert.exe mips.exe tracehex.exe d6 2 a7 2 mips.exe: mips.c @@cl mips.c d17 1 a17 1 -@@mips test2.exe BD > test.txt d26 1 a26 1 -@@mips test2.exe BD > test.txt d35 1 a35 1 -@@mips test2.exe BD > test.txt d44 1 a44 1 -@@mips test2.exe BD > test.txt d47 2 a48 2 run: mips.exe @@mips test2.exe B @ 1.4 log @ld -N; added pi.c @ text @d15 1 a15 1 @@objdump --disassemble test.exe > test.lst d21 1 a21 1 @@as -o boot.o boot.asm d24 1 a24 1 @@objdump --disassemble test.exe > test.lst d29 5 a33 5 powc: all @@as -o boot.o boot.asm gcc -DMIPS -Dmain=main2 -Wall -c -s powc.c ld -Ttext 0 -eentry -Map test.map -s -N -o test.exe boot.o powc.o @@objdump --disassemble test.exe > test.lst d39 1 a39 1 @@as -o boot.o boot.asm @ 1.3 log @Switched to gcc compiler. @ text @d12 1 a12 1 opcodes: d14 2 a15 2 ld -Ttext 0 -eentry -otest.exe opcodes.o @@objdump --disassemble-all test.exe > test.lst d20 1 a20 1 test: d22 3 a24 3 gcc -DMIPS -c -s test.c ld -Ttext 0 -eentry -otest.exe boot.o test.o @@objdump --disassemble-all test.exe > test.lst d29 19 a47 1 run: code.txt mips.exe @ 1.2 log @Made writes 4 cycles, improved mem_ctrl.vhd @ text @d1 1 a1 1 MIPS_DRIVE=e: d3 2 a4 5 INCPATH="$(MIPS_DRIVE)\Program Files\DevStudio\WCE\include\WCE200" LIBPATH="$(MIPS_DRIVE)\Program Files\DevStudio\wce\lib\wce200\wcemips" CC=clmips -c /I$(INCPATH) /Ox /GF /nologo /Fatest.s LINK=link /nologo /machine:MIPS /SUBSYSTEM:WINDOWSCE /entry:main \ /libpath:$(LIBPATH) /nodefaultlib /base:0x00000000 d6 2 a7 1 all: convert.exe mips.exe test.exe tracehex.exe d9 2 a10 2 convert.exe: convert.c cl convert.c d12 16 a27 2 mips.exe: mips.c cl mips.c d29 2 a30 7 test.exe: test.c $(CC) test.c -D SIMULATE -DMIPS $(LINK) /out:test.exe /map:test.map test.obj convert mips test.exe DD > test.txt mips test2.exe DD > test2.txt mips test2.exe a31 2 tracehex.exe: tracehex.c cl tracehex.c @ 1.1 log @Initial revision @ text @d9 1 a9 1 all: convert.exe mips.exe test.exe d18 1 a18 1 $(CC) test.c -D SIMULATE d24 3 @ 1.1.1.1 log @MIPS-lite CPU core @ text @@