User guide
16 GR-LEON4-ITX Development Board
Quick Start Guide
Ethernet Debug Communications Link (EDCL). However any of the other debug links would 
be fine. The first listing shows all cores available in the design. Giving the command  info sys 
prints a detailed report of the system. The output is too long to include here, however as a 
sample with some most of the output cut out:
grlib> info sys 
00.01:048  Gaisler Research  LEON4 SPARC V8 Processor (ver 0x0) 
      ahb master 0 
… some output removed...
02.01:01d  Gaisler Research  GR Ethernet MAC (ver 0x0) 
      ahb master 2, irq 12 
      apb: c0100100 – c0100200 
      edcl ip 192.168.0.54, buffer 2 kbyte 
… some output removed...
01.01:02e  Gaisler Research  DDR2 Controller (ver 0x0) 
      ahb: 40000000 – 80000000 
      ahb: ffe00100 – ffe00200 
      32-bit DDR2 : 1 * 256 Mbyte @ 0x40000000 
             200 MHz, col 10, ref 7.8 us, trfc 135 ns 
… some output removed...
grlib> 
The above shows a sample of the cores connected. In the sample we can see that the EDCL 
IP address has been set and that the EDCL has 2 kbyte hardware buffer, we can also see 
that GRMON has identified, and configured the DDR2 controller to use, 256 MiB of DDR2  
SDRAM memory.
4.2  Running an application
In   this  example   we   will   compile   and   run   an   application   of   our   own.  The   procedure   for 
downloading other applications is the same as shown below.
In order to cross-compile a stand-alone C application the host computer must have the BCC 
toolchain installed.  The  toolchain  can  be downloaded from  http://www.gaisler.com  and  is 
also included on the USB Flash stick (software/toolchains/BCC). 
Below is a transcript of a terminal with comments inserted:
Show contents of file hello.c:
user@host:~$ cat hello.c 
#include <stdio.h> 
int main(void) 
{ 
 printf("Hello world\n"); 
 return 0; 
} 
Compile and link application, place resulting machine code in file hello:
user@host:~$ sparc-elf-gcc -Wall hello.c -o hello 
Connect with GRMON and load the application. Note that the flag -u is given to GRMON. 
This  flag places the first UART in debug mode  which means that GRMON  will echo the 
characters written to the UART and the user does not need  to attach a dedicated  serial 
terminal to the board. Without -u switch, no output would come from the program. Please 
see the GRMON User's Manual for more information.
jan@jan:~$ grmon -eth -ip 192.168.0.54 -u 
© Aeroflex Gaisler AB March 2013, Rev. 0.3










