Qualcomm Ubi32 Tool Chain

The Ubi32 architecture is an extension of the Ubicom32 architecture.  

The Ubi32 tool chain only supports bare-metal environments.  For information about tool chains for older Ubicom32 architecture versions prior to ubicom32v6, including Linux support for the IP8K processor, please see the Ubicom32 tool chain page.

The Ubi32 tool chain binaries have names with the ubi32-elf- prefix (e.g., ubi32-elf-gcc).  The Ubi32 tool chain adds support for the ubicom32v61 architecture.  All of the previous bare-metal ubicom32 architecture variants are supported, but only the libraries for ubi32v6 and ubi32v61 variants are built.  Only a limited number of library variants are built. 

Release Notes

The Release Notes contain descriptions of the versions of the Ubi32 Tool Chain.

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 and G++
  • 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)
  • make
  • autogen

Download the Software

Clone the master branch of the Ubicom32 tool chain:

  $ git clone https://source.codeaurora.org/external/ubicom/ubi32-toolchain

This will create a ubi32-toolchain directory containing several directories and shell scripts.

Build the Ubi32 Tool Chain

Execute the following commands:

  $ cd ubi32-toolchain
  $ ./build_ubi32.sh update

This will download the tool chain sources, or if they have been previously downloaded, update them to the latest version.

This script will create the following sub-directories:

  • build -- the build directories for each component
  • install -- the installation directory for the tool chain
  • log -- the log files for each step of the build
    The log files may be useful if one of the build steps fails.

Add $(pwd)/install/bin to your $PATH environment variable. 

Ubi32 Tool Chain Building Notes

  1.  If you wish to use a non-standard version of GCC, for example, one installed in /opt/gnu, do the following before running these scripts:
            $ export GCC_PATH=/opt/gnu/bin
  2. Sourcing the setup.sh script will set the $PATH to point to the correct binary directories.
  3. You may move the install directory to a different location, providing that all sub-directories are moved.  
  4. The build_ubi32.sh script has a number of options.  For a list of options, execute
    $ ./build_ubi32.sh help

Running the Ubi32 QEMU simulator

There are two versions of the Ubi32 QEMU simulator, the big-endian simulator (qemu-system-ubicom32) and the little-endian simulator (qemu-system-ubicom32el). The Ubi32 QEMU simulator supports semihosting (selected by the --semihosting command line option), which allows a program written for Ubi32 to use the host system to perform operations like printing to standard output.  The Ubi32 QEMU simulator also supports reading a configuration file  (selected by the --readconfig command line option) which specifies several characteristics of the target processor, such as chip_id, memory ranges, and the number of threads supported.  Several configuration files (also called mapfiles) are included in the QEMU source directory.

To compile a program to run using the Ubi32 QEMU simulator with semihosting, specify the -msemihosting on the GCC command line.  The linker script used to link the program must be compatible with the configuration file used by QEMU. 

Execute a Ubi32 program using the Ubi32 QEMU simulator

  $ qemu-system-ubicom32el -semihosting -readconfig akronite.mapfile -kernel <program>

Run the Ubi32 QEMU simulator as remote GDB target

  $ qemu-system-ubicom32el -semihosting -readconfig akronite.mapfile -gdb tcp::1234 -S

In Ubi32 GDB, execute the following

  (gdb) target remote localhost:1234     or     (gdb) tar rem :1234
  (gdb) load

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

My Recent Modifications

Need help?

If you need help with XWiki you can contact: