OpenCores
no use no use 1/1 no use no use
Problem compiling demo_or32_sw
by alonzo on Sep 1, 2011
alonzo
Posts: 23
Joined: Jan 23, 2009
Last seen: Nov 14, 2017
Hi,
I unzipped the file and run make all. Here is the output:
--- Assembling BootReset.S ---
or32-elf-gcc -g -c -Wunknown-pragmas -mhard-mul -msoft-div -msoft-float -o BootReset.o BootReset.S

--- Compiling main.c ---
or32-elf-gcc -g -c -Wunknown-pragmas -mhard-mul -msoft-div -msoft-float -o main.o main.c

--- Compiling uart.c ---
or32-elf-gcc -g -c -Wunknown-pragmas -mhard-mul -msoft-div -msoft-float -o uart.o uart.c

--- Linking ---
or32-elf-ld -Map System.map -Bstatic BootReset.o main.o uart.o --stats -Tram.ld -e 0x01000100 -o echo.or32
BootReset.o: In function `_reset':
(.vectors+0x88): undefined reference to `_Start'
BootReset.o: In function `_reset':
(.vectors+0x8c): undefined reference to `_Start'
BootReset.o: In function `JUMP':
(.vectors+0x724): undefined reference to `_external_exeption'
make: *** [echo.or32] Error 1


Has anybody seen this before?

Alonzo.
RE: Problem compiling demo_or32_sw
by olof on Sep 2, 2011
olof
Posts: 218
Joined: Feb 10, 2010
Last seen: Dec 17, 2018
I unzipped the file and run make all


Which file are you referring to?
RE: Problem compiling demo_or32_sw
by alonzo on Sep 2, 2011
alonzo
Posts: 23
Joined: Jan 23, 2009
Last seen: Nov 14, 2017
I am talking about the demo_or32_sw.zip file referenced in the "debugging of physical openrisc targets" page at opencores. The file can be downloaded also from http://opencores.org/download,or1k

alnz.
RE: Problem compiling demo_or32_sw
by jeremybennett on Sep 8, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

hi alonzo,

Looks like it is obsolete code that needs rewriting. It seems like all the dates on the download page have been reset, so I have no idea how old this is (it could be 10 years).

It seems that the code predates the latest GCC compiler developments, which dropped the use of underscore before global names. You could try finding the names being complained about in .S files and removing the leading underscore.

These days it is all much easier. Try a trivial program like.

    #include <stdio.h>
    
    int
    main (int   argc,
          char *argv[])
    {
      printf ("Hello World\n");
      return  0;
    
    }	/* main () */
    

Compile it with

    or32-elf-gcc hello.c -o hello
    

Run it with

    or32-elf-sim --memory=8M hello
    

HTH

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

RE: Problem compiling demo_or32_sw
by alonzo on Sep 20, 2011
alonzo
Posts: 23
Joined: Jan 23, 2009
Last seen: Nov 14, 2017
Hi Jeremy,
I just wanted to share with you that I followed your recommendation. I looked through the files and change the names that used the underscore in front. This fixed the compilation of the code. Then, I still had problems using the code to demo the debugger. I would successfully download the code and start the core but nothing would show up in the console. I figured that the demo_or32_sw had 25MHz as clock frequency set in its .h file. The FPGA was running at 50MHz. Changed that and it worked fine. Maybe this info will help somebody else.
Thank you for your help,
Alonzo.
RE: Problem compiling demo_or32_sw
by jeremybennett on Sep 21, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi Alonzo,

Glad this works. Would you update the Wiki to help others who hit this problem in the future.

Thanks,

Jeremy

no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.