User guide

29 GR-LEON4-ITX Development Board
Quick Start Guide
After this we can create an image using the SnapGear Linux kernel as input:
jan@jan:~/Linux$ /opt/mkprom2/mkprom2 -v -freq 100 -stack 0x4ffffff0 -pnp 0xffeff800
-irqmp 0xc0800100 -dsustart 0xd0000000 -dsutrace -bdinit -nomsg snapgear-2.6-
p41/images/image.dsu
LEON2/3/ERC32 MKPROM prom builder for BCC, ECOS, RTEMS and ThreadX v2.0.25
Copyright Gaisler Research 2004-2007, all rights reserved.
phead0: type: 1, off: 65536, vaddr: 40000000, paddr: 40000000, fsize: 2674944,
msize: 2833212
phead1: type: 6474e551, off: 0, vaddr: 0, paddr: 0, fsize: 0, msize: 0
section: .stage2 at 0x40000000, size 10240 bytes
Uncoded stream length: 10240 bytes
Coded stream length: 3374 bytes
Compression Ratio: 3.035
section: .vmlinux at 0x40004000, size 2658560 bytes
Uncoded stream length: 2658560 bytes
Coded stream length: 1562710 bytes
Compression Ratio: 1.701
creating LEON3 boot prom: prom.out
Searching for compiler to use (sparc-elf, sparc-rtems or sparc-linux):
sparc-elf-gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
sparc-elf-gcc -O2 -g -N -T/opt/mkprom2/linkprom -Ttext=0x0
/opt/mkprom2/promcore.o /opt/mkprom2/promcrt0.o /opt/mkprom2/promload.o
/opt/mkprom2/promdecomp.o -nostdlib /opt/mkprom2/prominit.o
/opt/mkprom2/prominit_leon3.o /opt/mkprom2/prombdinit.o dump.s bdinit.o -o
prom.out
multidir:
jan@jan:~/Linux$
MKPROM2 available from gaisler.com:
Generate image with SMP Linux kernel as input:
mkprom2 -memc 0xFFE00100 -freq 100 -nopnp -ddr2spa_cfg1 0xf6a08616 -ddr2spa_cfg3
0x13650000 -ddr2spa_cfg4 0x0000017f -gpt 0xc0000300 -irqmp 0xc0800100 -uart
0xc0000100 -dsustart 0xd0000000 -dsutrace -baud 38400 -mp -mpentry 2 0x40000000
0x40000000 -mpstack 2 0x4ffffff0 0x4ffffff0 -nomsg -o output.prom <linux kernel
image name>.ram
Programming PROM image to SPI Flash:
The SPI Flash memory device can now be programmed with the PROM contents in the
prom.out file generated by MKPROM2 (it is recommended to use the Ethernet debug link
when programming the flash), start GRMON and issue the following commands:
grlib> spim flash detect
Got manufacturer ID 0x20 and Device ID 0x2017
No device match for READ ID instruction, trying RES instruction..
Found matching device: ST/Numonyx M25P64
grlib> spim flash load prom.out
section: .text at 0x0, size 1575824 bytes
section: .data at 0x180b90, size 32 bytes
total size: 1575856 bytes (119.3 kbit/s)
© Aeroflex Gaisler AB March 2013, Rev. 0.3