Hi All,
I have previously send this message to comp.arch.embedded, but probably it was "NTG", as it is more associated with the soft CPU on FPGA problem. Therefore I try once (the last one ;-) ) again in the comp.arch.fpga
I have successfully compiled the Plasma soft CPU for my Xilinx Spartan 3E Starter Kit (the version of Plasma core
However I was not able to generate my own software for this CPU. The provided tools (
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?