3 Replies Latest reply: Sep 26, 2010 3:48 PM by 807576 RSS

    compiling applications for openSPARC fpga implementation

    807576
      Hi all,

      I'm trying compile C applications to be run on the openSPARC implemented on FPGA. I followed the steps outlined in the DV guide, and I am using a SPARC machine but I got the following errors and warnings, PLEASE HELP!! Thanks.

      fkouteib@codon:~/openSPARC/design/sys/edk/examples/src$ make install
      /home/fkouteib/openSPARC/design/sys/edk/examples/src/libos
      make[1]: Entering directory `/home/fkouteib/openSPARC/design/sys/edk/examples/src/libos'
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas -P -D_ASM -xarch=v9d -I../include -o trap_table.o trap_table.s
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 146: error: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 146: error: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 146: error: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 146: error: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 146: error: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 146: error: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 233: warning: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 237: warning: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 237: warning: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 246: warning: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 250: warning: detect global register use not covered .register pseudo-op
      /home/fkouteib/openSPARC/hypervisor/src/hypervisor-tools/bin/qas: "trap_table.s", line 250: warning: detect global register use not covered .register pseudo-op
      make[1]: *** [trap_table.o] Error 1
      make[1]: Leaving directory `/home/fkouteib/openSPARC/design/sys/edk/examples/src/libos'
      make: *** [libos] Error 2
        • 1. Re: compiling applications for openSPARC fpga implementation
          807576
          I have been able to solve the errors mentioned in teh previosu by adding the following pseudo-instruction .register %g6,#scratch and .register %g2,#scratch where these registers are used. It's an issue of compliance and usage of global registers. Refer to this link for more info: [http://developers.sun.com/solaris/articles/sparcv9abi.html]

          Now, The issue I am running into is the following. The program crashes while trying to compile file_to_array.c and I get the following error message:

          /opt/SUNWspro/bin/cc -xarch=v9 -I../include -errwarn=%all -xO2 -o file2array
          usage: cc [ options] files. Use 'cc -flags' for details
          make[1]: *** [file2array] Error 1
          make[1]: Leaving directory `/home/fkouteib/openSPARC/examples/src/utils'
          make: *** [utils] Error 2


          Any help would be appreciated!

          Faycel
          • 2. Re: compiling applications for openSPARC fpga implementation
            807576
            I finally solved all my errors and I now have memory images of C applications that I can run on FPGA. The error mentioned on my last post was because the command invoked by the make file didn't include the the *.c file to be compiled. Once I did that manually and rerun make install, everything worked. I just thought I'd share the problems I ran into and how I solved them for people who might encounter them later on.
            • 3. Re: compiling applications for openSPARC fpga implementation
              807576
              Hi, I encountered the same problem.

              I wonder how to manually compile the file2array as you said.

              This is my e-mail, and any reply will be highly appreciated.
              pkuwangh at gmail.com

              Thank you.
              Hao