LEOX home page Free Hardware and Software Resources for System on Chip


News & Stats
Contact Us
Want to help
Mailing list
 

FAQ
HOWTO
mini-HOWTO
 

Development Tools
Hardware IPs
Software IPs
 

Please find underneath the following software IPs:

  1. The uClinux port is the port of Linux on the LEON core and the various peripheral IP blocks added by the LEOX project.
    uClinux is a version of Linux designed to run on microprocessors without Memory Management Unit (MMU).
  2. The RTEMS port is the port of the Real Time Executive for Multiprocessor Systems (RTEMS) on the LEON core done by Jiri Gaisler.


Software IP: uClinux port (Linux for MMUless processors)


uClinux/Sparc (MMUless) port: Summary
Description The uClinux/Sparc port is the port of Linux on the LEON core and the
various peripheral IP blocks added by the LEOX project.
uClinux is a version of Linux designed to run on microprocessors
without Memory Management Unit (MMU).
Documentation none
Latest Version (107 MBytes) uClinux-dist-20030522.tar.gz      (Updated: 2003 May 25rd)

Please see the boot sequence of uClinux/Sparc for LEON over TSIM.
Licence(s) GNU General Public Licence (GPL) for the uClinux kernel version 2.0.39
GNU General Public Licence (GPL) for most userland applications
GNU Lesser General Public Licence (LGPL) for all libraries
Author(s) The LEOX team
Related Link(s) uClinux Web Site

uClinux stands for microcontroller Linux. The Linux/Microcontroller project is a port of Linux 2.0 and Linux 2.4 to embedded systems without a Memory Management Unit (MMU). It currently supports Motorola 68k, ColdFire microprocessors, ARM7TDMI, NEC v850 and Intel i960 processors. uClinux is currently maintained by co-creator Donald Jeff Dionne.
uClinux kernel is licenced under the terms of the GNU General Public Licence (GPL), like the Linux kernel because it is a derivated work.

We are working on the port of uClinux onto the LEON core (an open source VHDL implementation of a SPARC V8 core) and are preparing educative and step-by-step documents in order to explain how to port uClinux on the LEON core and how to integrate the management of new IP blocks.

We strongly recommend that you use the LEOX Cross Development Kit in order to simplify the compilation and the debug phases of the uClinux/Sparc distribution.

Good News: Now our uClinux port onto LEON is integrated into the uClinux's official distribution, by courtesy of Greg Ungerer. This distribution is a lot easier to use, since you pretty much get everything you need in one package. This code package also includes the latest uClinux kernel snapshots from the CVS archive at cvs.uclinux.org.
From our uClinux port, the kernel code base supports generic Sparc MMUless architecture and includes support for building LEON over TSIM remote Sparc simulator target.

The uClinux/Sparc kernel is booting and a shell is running (see the boot sequence), but from now there is still few C library functionalities and only the shell ported to the Sparc MMUless architecture.



The delivery of this port has to be considered as a preliminary work.
The uClinux port on Sparc MMUless architecture is still in progress
and more work need to be done (see below the TODO list).



TODO List
Port more C library functionalities.
Port more userland applications.
Implement more system calls.
Current Status
uClinux/Sparc port integrated into uClinux's official distribution.
Kernel 2.0.39 boots for LEON over TSIM.
Sparc relocations management into elf2flt.
Only few C library functionalities ported.
The shell sash is running.

How to build the uClinux/Sparc kernel version 2.0.39

This part explains how to build the uClinux/Sparc kernel version 2.0.39 for Sparc MMUless targets. It details the various steps involved: from the download of the code packages to the build of the kernel image ready to boot over the TSIM remote Sparc simulator.

Due to a lack of our download space capacity, you are invited to grab through FTP the following package:

  1. grab the uClinux's official distribution (107 MB) from
          http://www.uclinux.org/pub/uClinux/dist/uClinux-dist-20030522.tar.gz

You do not need to be the root user to install and to build everything. Once you are inside your top level directory, let say [ROOT_DIR], you have to execute the following command:

  • Un-archive the general uClinux distribution.

  1. tar xzvpf uClinux-dist-20030522.tar.gz

Now you are ready to configure and build the uClinux distribution sources for LEON over TSIM remote SPARC simulator.

After changing the current directory into uClinux top sources tree, you need to configure the build target by executing the following commands:

  1. cd uClinux-dist
  2. make xconfig

The target platform selection is straight forward. You need to choose the LEOX/TSIM vendor default configuration. Based on the LEOX/TSIM platform, the build will generate the appropriate default application set.

Select the target platform as showed below:

target platform selection: LEOX/TSIM which is uClinux port of LEON over TSIM

Once configured for LEON over TSIM, you have to build the LEOX's uClinux runtime by executing the following commands:

  • Build the dependencies.
  • Build the global image (uClinux kernel + userland applications).

  1. make dep
  2. make

Now, you can directly run your uClinux image over TSIM by executing the following command:

  1. Open a Terminal window, and execute the command:

         tsim-leon -nfp images/image.elf


  2. Note: Once entered into TSIM, enter g for GO command. (see the boot sequence)

How to debug the uClinux/Sparc port using insight/GDB and TSIM

The image below shows a typical debug session of the uClinux environment running over the TSIM remote Sparc simulator.

typical debug session of the uClinux/Sparc port using insight/GDB and TSIM

Insight is a graphical user interface to GDB, the GNU Debugger, written in Tcl/Tk by people working at Red Hat, Inc. and Cygnus Solutions. They have been developing this debugger GUI since 1994. It has turned into a mature interface that is able to give you access to much of GDB's power.
This project is in its second generation. The original GUI was released back in 1996 (called "gdbtk"), and has undergone a complete transformation since then.

TSIM is a Sparc simulator developed by Jiri Gaisler that can be run in a stand-alone mode or connected throught a TCP/IP network link with the GNU GDB debugger. Jiri Gaisler provides an evaluation version of TSIM under a specific license.
For more information, go to GAISLER RESEARCH home page.

This part explains step by step how to debug the uClinux/Sparc image:

  1. Open a Terminal window, and execute the command:

         tsim-leon -nfp -gdb

The following lines are displayed:

        TSIM/LEON - remote SPARC simulator, version 1.0.18 (evaluation version)


        Copyright (C) 2001, Gaisler Research - all rights reserved.
        For latest updates, go to http://www.gaisler.com/
        Comments or bug-reports to tsim@gaisler.com


    FPU disabled
    serial port A on stdin/stdout
    allocated 4096 K RAM memory, in 1 bank(s)
    allocated 2048 K ROM memory
    icache: 4 kbytes, 16 bytes/line
    dcache: 4 kbytes, 16 bytes/line
    gdb interface: using port 1234

  1. Go to the uClinux distribution top level directory,
    and start the GDB GNU source-level debugger and its associated front-end:

    cd uClinux-dist/
    sparc-elf-gdb images/image.elf &

  1. From the insight-5.3 Menu bar, configure the Target Settings:

    Select File/Target Settings...
    Add the following into the Target Selection window:
         Target:       Remote/TCP
         Hostname:     localhost
         Port:         1234
         Fewer Options: (only select Attach to Target)

  1. From the insight-5.3 Menu bar, connect to target and download sections to TSIM:

    Select Run/connect to target
         The TSIM terminal displays: connected.

    Select Run/Download
         The .text and .data sections are downloaded to the target,
         and the PC is set to the first instruction of the .text section.

Now, you are ready to enjoy the debug of uClinux onto the LEON core (a Sparc MMUless architecture).

    Example No1: you can execute the whole uClinux/Sparc code

      Just press on the continue icon from the insight Toolbar. UART1 standard output will be displayed inside TSIM terminal window.
    Example No2: you can execute step by step the first instructions of the .text section

      This code is assembly code, therefore you have to use 2 icons from the insight Toolbar: Step Asm Inst and Next Asm Inst.
    Example No3: you want to stop at the 'C' entry point of the uClinux kernel

      From the bottom of the source window:
            select the current file name:           main.c
            select the current function name: start_kernel
            select the source mode:                      SOURCE

      Once done, the source of main.c is displayed. The dash signs on the left margin show lines that will be executed.

      By clicking on one of these dash sign, place a breakpoint. And press on the continue icon from the insight Toolbar. UART1 standard output will be displayed inside TSIM terminal window. When stopped to the previously set breakpoint, you can use 2 icons from the insight Toolbar to debug step by step the C code: Step and Next.

      If you want to see the content of the LEON/SPARC registers, select View/Registers.

Happy Hacking!

Linux is a registered trademark of Linus Tordvals.
uClinux is a registered trademark of Rt-Control Inc. See also the uClinux Web Site.


Software IP: RTEMS port


RTEMS: Summary
Description RTEMS is an anacronym for the Real Time Executive for Multiprocessor Systems.
The original goal of RTEMS was to provide a portable; standards-based real-time
executive for which source code was available.
RTEMS is a real-time executive which provides a high performance environment
for embedded applications.
Informations Go to GAISLER RESEARCH home page for more informations about RTEMS's
port on LEON (an open source VHDL implementation of a SPARC V8 core).
Author(s) The port of RTEMS on LEON core is done by Jiri Gaisler.
Related Link(s) Go to RTEMS home page for more informations on RTEMS.

The port of RTEMS on LEON (an open source VHDL implementation of a SPARC V8 core) is done by Jiri Gaisler.
For more information, go to GAISLER RESEARCH home page.

RTEMS is an anacronym for the Real Time Executive for Multiprocessor Systems. The original goal of RTEMS was to provide a portable, standards-based real-time executive for which source code was available.
RTEMS is a real-time executive which provides a high performance environment for embedded applications including many features:

  • Compliant to POSIX 1003.1b API including threads.
  • TCP/IP stack: UDP/TCP, TFTP, DHCP, RPC, FTPD, HTTPD, CORBA, ...etc.
  • Filesystem support: In-Memory Filesystem (IMFS), TFTP Client Filesystem.
  • Basic Kernel Features:
    • Multitasking capabilities.
    • homogeneous and heterogeneous multiprocessor systems.
    • event-driven, priority-based, preemptive scheduling.
    • optional rate monotonic scheduling.
    • intertask communication and synchronization.
    • priority inheritance.
    • responsive interrupt management.
    • dynamic memory allocation.
    • high level of user configurability.

RTEMS is licenced under a modified version of the GNU General Public Licence (GPL). The modifications places no restrictions on the applications which use RTEMS but protects the interests of those who works on RTEMS.

The TCP/IP network stack included with RTEMS is a port of the FreeBSD network stack and is licenced under different terms that also do not place restrictions on the application.



LEOX.org - Free Hardware and Software resources for System on Chip
Copyright © 2000,2001 by The LEOX team
Ideas, requests, problems regarding LEOX.org? Send feedback.
Last modification: 2003/6/26 at 09:45
All brands and product names may be trademarks of their respective owners.
All information is provided "as is", there is no warranty that the information is correct or suitable for any purpose, neither implicit nor explicit.