GR712RC-QSG
November 2018, Version 1.0
15 www.cobham.com/gaisler
4. Software
4.1. Overview
Cobham Gaisler provides a comprehensive set of software tools to run several different operating systems. The
LEON platform supports the following workflows:
Table 4.1.
BCC the Bare C Cross-Compiler System is a toolchain to compile bare C or C++ applications di-
rectly on top of the processor without the servises provided by an operating system
RTEMS a hard Real Time Operating System. Cobham Gaisler provides RCC, a toolchain to develop
and compile RTEMS applications specifically for the LEON
Linux the open source operating system. Board Support Packages and tools to ease the compilation
and deployment of the kernel are provided
VxWorks an embedded real-time operating system developed by WindRiver. Cobham Gaisler provides
a LEON architectural port (HAL) and a Board Support Package (BSP) in full source code
Hardware simulators for the LEON platform are available in the form of TSIM and GRSIM. The TSIM simulator
emulates a mono-processor computer system based on either the ERC32 or LEON processors. It can be extended
to emulate custom I/O functions through loadable modules. The GRSIM simulator emulates a multi-processor
LEON2 or LEON3 system, and has a more accurate modelling of the on-chip IP cores and AMBA buses. It is
time-based rather that instruction-based (as TSIM), and can be attached to other simulation frameworks such as
System-C.
Developer tools are generally provided for both Linux and Windows operating systems. Cobham Gaisler also
provides an integrated, easy-to-use solution to help programmers with the task of developing for the LEON. The
LEON Integrated Development Environment for Eclipse (LIDE) is an Eclipse plug-in integrating compilers, soft-
ware and hardware debuggers in a graphical user interface. The plugin makes it possible to cross-compile C and
C++ application for LEON and ERC32, and to debug them on either simulator and target hardware (TSIM or
GRMON).
The recommended method to load software onto a LEON board is by connecting to a debug interface of the board
through the GRMON hardware debugger. Execution of programs by a PROM-loaded bootloader, like u-boot, is
also possible. Cobham Gaisler provides the free MKPROM2 tool to encapsulate BCC or RTEMS applications in
a simple boot-loader.
Currently u-boot for the GR712RC Development Board is not provided by Cobham Gaisler
4.2. Bare C Cross-Compiler System
4.2.1. Overview
The Bare C Cross-Compiler (BCC for short) is a GNU-based cross-compilation system for LEON processors. It
allows cross-compilation of C and C++ applications for LEON2, LEON3 and LEON4. This section gives the reader
a brief introduction on how to use BCC together with the GR712RC Development Board. It will be demonstrated
how to install BCC, build an existing sample project and run it on the board using GRMON.
The BCC toolchain includes the GNU C/C++ cross-compiler 7.2.0, GNU Binutils, Newlib embedded C library,
the Bare-C run-time system with LEON support and the GNU debugger (GDB). The toolchain can be downloaded
from [RD-10] and is available for both Linux and Windows. Further information about BCC can be found in
[RD-11].
The installation process of BCC is described in [RD-11]. The rest of this chapter assumes that sparc-gaisler-elf-
gcc is available in the PATH variable.
4.2.2. Compiling with BCC
The following command shows an example of how to compile a typical Hello world program with BCC.