Line 1... |
Line 1... |
# 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.
|
# The CC_X86 is for compiling tools on your PC.
|
# The CC_X86 is for compiling tools on your PC.
|
# The GCC_MIPS is for compiling code on the target.
|
# 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 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
|
# 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
|
#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
|
Line 32... |
Line 34... |
bootldr, toimage, etermip
|
bootldr, toimage, etermip
|
|
|
clean:
|
clean:
|
-$(RM) *.o *.obj *.map *.lst *.hex *.txt *.exe *.axf
|
-$(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
|
convert_bin.exe: convert.c
|
@$(CC_X86) -o convert_bin.exe convert.c
|
@$(CC_X86) -o convert_bin.exe convert.c
|
|
|
convert_le.exe: convert.c
|
convert_le.exe: convert.c
|
@$(CC_X86) -DLITTLE_ENDIAN -o convert_le.exe convert.c
|
@$(CC_X86) -DLITTLE_ENDIAN -o convert_le.exe convert.c
|
Line 155... |
Line 158... |
$(GCC_MIPS) -DINIT_DDR memtest.c
|
$(GCC_MIPS) -DINIT_DDR memtest.c
|
$(GCC_MIPS) ddr_init.c
|
$(GCC_MIPS) ddr_init.c
|
$(LD_MIPS) -Ttext 0x0 -eentry -o test.axf boot.o memtest.o ddr_init.o
|
$(LD_MIPS) -Ttext 0x0 -eentry -o test.axf boot.o memtest.o ddr_init.o
|
convert_bin.exe
|
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:
|
bootldr:
|
$(AS_MIPS) -o boot.o boot.asm
|
$(AS_MIPS) -o boot.o boot.asm
|
$(GCC_MIPS) bootldr.c
|
$(GCC_MIPS) bootldr.c
|
$(GCC_MIPS) no_os.c
|
$(GCC_MIPS) no_os.c
|
$(GCC_MIPS) -DDLL_DISABLE ddr_init.c
|
$(GCC_MIPS) -DDLL_DISABLE ddr_init.c
|
$(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
|
$(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
|
boot.o bootldr.o no_os.o ddr_init.o
|
boot.o bootldr.o no_os.o ddr_init.o
|
@$(DUMP_MIPS) --disassemble test.axf > test.lst
|
@$(DUMP_MIPS) --disassemble test.axf > test.lst
|
convert_bin.exe
|
convert_bin.exe
|
$(CP) code.txt $(VHDL_DIR)
|
$(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
|
bootldr_little_endian: convert_le.exe
|
$(AS_MIPS) -EL -o boot.o boot.asm
|
$(AS_MIPS) -EL -o boot.o boot.asm
|
$(GCC_MIPS) -EL bootldr.c
|
$(GCC_MIPS) -EL bootldr.c
|
$(GCC_MIPS) -EL no_os.c
|
$(GCC_MIPS) -EL no_os.c
|