LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Overview :: News :: Architecture :: OpenRISC 1200 :: VMware image :: NEW GNU Toolchain Port :: Architectural Simulator :: U-Boot :: Linux :: uClinux :: RTEMS :: ATS :: ORP :: ORPmon :: ORPsoc :: Survey :: Forum :: Silicon :: Downloads :: Tracker    

    OpenRISC 1000: OLD GNU Toolchain Port

    Introduction

    The aim of this project is to port and maintain GCC, GNU Binutils, Newlib and the GDB to the OpenRISC 1000 family.

    gcc+binutils+or1ksim DDD DDD

    GCC is a GNU Compiler Collection that includes the ANSI C Compiler, C++, Java, Fortran and other compilers. All compilers produce excellent code and are often used in commercial products. GCC is free software with full source code available.

    The GNU Binutils are a collection of binary tools. The main ones are:

    • ld - the GNU linker.
    • as - the GNU assembler.
    But they also include:

    • addr2line - Converts addresses into filenames and line numbers.
    • ar - A utility for creating, modifying and extracting from archives.
    • c+filt - Filter to demangle encoded C++ symbols.
    • gprof - Displays profiling information.
    • nlmconv - Converts object code into an NLM.
    • nm - Lists symbols from object files.
    • objcopy - Copys and translates object files.
    • objdump - Displays information from object files.
    • ranlib - Generates an index to the contents of an archive.
    • readelf - Displays information from any ELF format object file.
    • size - Lists the section sizes of an object or archive file.
    • strings - Lists printable strings from files.
    • strip - Discards symbols.
    • windres - A compiler for Windows resource files.
    Newlib is a C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products.

    GDB, the GNU Project debugger, can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:

    • Start your program, specifying anything that might affect its behavior.
    • Make your program stop on specified conditions.
    • Examine what has happened, when your program has stopped.
    • Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another.

    Status

    • GCC, GNU Binutils, Newlib and GDB have been ported to the 32-bit part of the OpenRISC 1000 architecture
    • Port of the toolchain for the 64-bit part of the OpenRISC does not yet exist
    If you would like to help with the development, please contact the developers.

    Download

    Source code is available from the CVS repository. The easiest way to download is to to use the following CVSget links, or follow links in this page to obtain patches.

    Unified patch add openrisc support to official GNU binutils-2.16.1
    Unified patch add openrisc support to official GNU gcc-3.4.4

    Source code of current development and stable tarball of the OpenRISC GDB port is available from the OpenCores CVS under the module hierarchy or1k/gdb-5.3.

    Source code of current development and stable tarball of the OpenRISC Newlib port is available from the OpenCores CVS under the module hierarchy or1k/newlib.

    Although building the GNU Toolchain should be rather straightforward you can also download prebuilt Cygwin and Fedora RPM binaries:

    Please note that provided binaries have not been extensively tested.

    Installation

    Regular GNU Toolchain building is tested only under RedHat 7.0 GNU/Linux. The procedure to build and install the GNU Binutils, Newlib and GCC is the following:

    NOTE: configure with --help option displays list of available options/configurations for every package.

    First step is optional - you need to have recent source subdirectories ready (for example downloaded as tarballs). If you don't have them, get them from the OpenCores CVS by following Download procedure or by using local cvs. The checkout process might take a while.


    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/binutils/binutils-2.16.1
    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/gcc/gcc-3.4.4
    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/gdb-5.3
    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/uclinux/uClinux-2.0.x
    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/uclibc
    cd or1k


    It is very important to follow the proper order of building and installing the tools. First build and install the GNU Binutils.

    mkdir b-b
    cd b-b
    ../binutils-2.16.1/configure --target=or32-uclinux --prefix=/opt/or32-uclinux
    make all install
    export PATH=/opt/or32-uclinux/bin:$PATH
    cd ..


    Now build and install GCC.

    mkdir b-gcc
    cd b-gcc
    ../gcc-3.4.4/configure --target=or32-uclinux --prefix=/opt/or32-uclinux \
    --with-local-prefix=/opt/or32-uclinux/or32-uclinux --with-gnu-as \
    --with-gnu-ld --verbose --enable-languages=c
    make all install
    cd ..

    Now build and install GDB. Current version of readline has a configuration bug, so you must not specify the installation prefix while configuring the package and you have to copy the executable manually.

    mkdir b-gdb
    cd b-gdb
    ../gdb-5.0/configure --target=or32-uclinux
    make all
    cp gdb/gdb /opt/or32-uclinux/bin/or32-uclinux-gdb
    cd ..


    Now download, build and install or1ksim:

    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/or1ksim
    cd or1k/or1ksim
    ./configure --target=or32-uclinux --prefix=/opt/or32-uclinux
    make all install
    cd ../..

    To acquire, build and install DDD, please look at DDD.

    You will probably also need gdb to connect to the board. If you are using the Xilinx Parallel Port III cable (PDF, 19KB), install the JP1 protocol utility:


    cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/jtag
    cd or1k/jtag
    make

    You can find more info how to use this utility here.

    To build and install uClibc follow these rules:


    cd or1k/uclinux/uClinux-2.0.x

    Edit arch/or32/Rules.make file:
    LIBGCC = /opt/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/libgcc.a

    make oldconfig
    make dep
    make
    cd ../../../
    cd or1k/uclibc
    ln -s ./extra/Configs/Config.cross.or32.uclinux Config

    Edit Config file:
    KERNEL_SOURCE=absolute-path-to-uClinux-2.0.x
    DEVEL_PREFIX=/opt/or32-uclinux

    make all install
    pushd .
    cd /opt/or32-uclinux/bin
    rm -f ar as cc cpp gasp gcc ld nm objcopy objdump ranlib size strings strip jar grepjar
    popd
    cd ../../b-gcc
    ../gcc-3.1/configure --target=or32-uclinux --prefix=/opt/or32-uclinux \
    --local-prefix=/opt/or32-uclinux/or32-uclinux --with-gnu-as \
    --with-gnu-ld --verbose --enable-languages=c
    make all install
    cd ..

    Documentation

    See online documentation at the following sites:

    Tutorial how to use OR1200, JTAG development i/f and gdb to connect to openrisc HW target. Credits go to Resarch Group Digital Techniques, Hogeschool voor Wetenschap & Kunst, Campus de Nayer

    Wishlist

    This is what we would like to develop/see developed but presently nobody is working on these projects. If you want to help, send an email to the mailing list.

    • Port of the toolchain to 64-bit part of OpenRISC 1000
    • Write optimized versions of routines in Newlib instead of using generic ones
    • Test the tools on non-Linux platforms (various UNIX and Cygwin)
    • Provide instructions how to build and install the GDB
    If you have a suggestion for new Wish List entry, feel free to send it to the mailing list so that is added to the list and somebody may start working on it.

    Additional Software Development Tools

    We are currently testing Source Navigator and GDB Graphical User Interface DDD and Insight. So far they both appear to work fine.

    Past Contributor(s)

    These are the people currently not working on the GNU Toolchain, but have contributed in the past:

    Developer(s)

    The team working on the GNU Toolchain port:

    Mailing List / Discussion Forum

    To participate in the development or simply to discuss GNU Toolchain issues and to report bugs, go to the openrisc mailing list. To subscribe to the list, follow mailing list subscribe instructions.

    Page Maintainer(s)

    This web page is maintained by Matjaz Breskvar and Damjan Lampret.


     

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.