Ubicom32 Tool Chain

There are a number of architectural variants, named ubicom32v?, where ? may be 2, 3, 4, 5, or 6.  Code generated for ubicom32v2-ubicom32v4 is in big-endian format.   Ubicom32v5 and ubicom32v6 tool chains also can generate code in either big-endian or little-endian format, by specifying ubicom32v5be or ubicom32v6be (for big-endian) or ubicom32v5le or ubicom32v6le (for little-endian).  The default for ubicomv5 is big-endian, while the default for ubicom32v6 is little-endian.

If you want the latest version of the Ubi32 Tool Chain, please follow these instructions: Ubi32 Tool Chain

Downloading the Software

Clone the IP8K branch of the Ubicom32 tool chain:

  $ git clone -b IP8K https://source.codeaurora.org/external/ubicom/ubicom32-toolchain
           If you have already cloned the ubicom32-toolchain, you can execute "git checkout IP8K" in the ubicom32-toolchain directory instead.
  $ cd ubicom32-toolchain
  $ git submodule init
  $ git submodule update

The submodule commands are only needed if you wish to build the Linux/uclibc tool chain.

This will create a ubicom32-toolchain directory containing several scripts as well as the tool chain sources.

Configuring your Build Environment

The scripts provided will build and install the tool chain in sub-directories (build and release, respectively) under the top-level directory.  If you wish to change the location of these directories, edit the common.sh script.  If you change the location of the release directory, you may also want to update the setup.sh script, which is sourced to set the PATH environment to point to the tool chain binaries.

Build Prerequisites

The following programs and libraries need to be installed in order to build the Ubi32 tool chain.  Some may be installed by default; others need to be installed using your package manager.  On some Linux distributions, these packages are included in collections called build essentials or core development.

  • GCC
  • Binutils
  • m4
  • texinfo
  • libx11-dev (Ubuntu) or libX11-devel (Fedora/CentOS/RHEL)
  • bison
  • libncurses5-dev (Ubuntu) or ncurses-devel (Fedora/CentOS/RHEL)
  • libexpat1-dev (Ubuntu) or expat-devel (Fedora/CentOS/RHEL)
  • flex
  • zlib1g-dev (Ubuntu) or zlib-devel (Fedora/CentOS/RHEL)
  • libglib2.o-dev (Ubuntu) or glib2-devel (Fedora/CentOS/RHEL)
  • guile 1.8 (not guile 2.0)
  • autogen

Building the Tool Chain

There are several scripts which build all or a subset of the tool chain:

  • build_elf_toolchain.sh -- Build bare-metal tool chain for Linux kernel (or other bare-metal) development.
  • build_linux_uclibc_toolchain.sh -- Build tool chain suitable for Linux application development.
  • build_newlib.sh -- Build bare-metal libraries (run automatically by build_elf_toolchain.sh).
  • build_all.sh -- Build all of the above.

Building Notes

  1. Building the Ubicom32 tool chain takes a long time, in part because many variations of the libraries are built.
  2. Alternate programs may be installed in /opt/gnu.

Running the GCC Regression Test Suite

Insure that the QEMU path in config.sh points to the directory containing the binary for qemu-system-ubicom32.

Run the regression test suite:

   $ ./run_gcc_regression.sh

You may specify the architecture to be tested and the part of the regression test suite to be run:

   ./run_gcc_regression.sh  [<arch>] [<test-section>]

   arch -  ubicom32v6 (default), ubicom32v5, ubicom32v5be, ubicom32v5le, ubicom32v6le, ubicom32v6be.
   test-section - any of the gcc regression test sections (default execute.exp)

Tags:
Created by superadmin on 2020/04/18 20:53
    

My Recent Modifications

Need help?

If you need help with XWiki you can contact: