I have successfully compiled the Plasma soft CPU for my Xilinx Spartan 3E Starter Kit (the version of Plasma corecontains the top entity and UCF needed for this board).
However I was not able to generate my own software for this CPU. The provided tools () are "Windows-only" and unfortunately do not run under wine emulator.
I have changed the makefile to make use of the mips-linux-gnu-gcc or mipsel-linux-gnu-gcc packages (available from)
It was also necessary to replace some backslashes with slashes.
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv # Customize for Linux CC_X86 = gcc -Wall -O -g CP = cp RM = rm -rf #BIN_MIPS = ../../mips/sde/bin VHDL_DIR = ../vhdl #GCC_MIPS = mipsel-linux-gnu-gcc $(CFLAGS) #AS_MIPS = mipsel-linux-gnu-as #LD_MIPS = mipsel-linux-gnu-ld #DUMP_MIPS = mipsel-linux-gnu-objdump GCC_MIPS = mips-linux-gnu-gcc $(CFLAGS) AS_MIPS = mips-linux-gnu-as LD_MIPS = mips-linux-gnu-ld DUMP_MIPS = mips-linux-gnu-objdump # Customize for Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To make sources compiling I had to add the redefiniton of strncat2 to the rtos.h file:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv #define strcpy strcpy2 //don't use intrinsic functions #define strcat strcat2 #define strncat strncat2 // code.txt & test.bin Entry=0x10000c50 length=0=0x0
I can try to force mips-linux-gnu-as to generate the PIC file by adding the "-KPIC" option, but then I get the following warning:
mips-linux-gnu-as -KPIC -o boot.o ../tools/boot.asm ../tools/boot.asm: Assembler messages: ../tools/boot.asm:35: Warning: No .cprestore pseudo-op used in PIC code ../tools/boot.asm:85: Warning: No .cprestore pseudo-op used in PIC code
Anyway the convert_bin complains as before.
So I have two questions:1) How to avoid the problem with PIC code? 2) Is it possible to generate the ROM contents with the standard tool like mips(el)-linux-gnu-objcopy ? Or how to fix the convert to work under linux?