summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/or1k/or1ksim/README
blob: 22ecbfa33355f70485098480df3b018a81fc1826 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
This BSP should run on or1ksim: the main simulator for or1k architecture.
or1ksim should be used for testing purposes. It also runs on QEMU.

$ git clone git@github.com:openrisc/or1ksim.git
$ cd or1ksim
$ mkdir builddir_or1ksim
$ cd builddir_or1ksim
$ ../configure --target=or1k-elf --prefix=/opt/or1ksim
$ make all
$ make install
$ export PATH=/opt/or1ksim/bin:$PATH

Configuration file "sim.cfg" should be provided for complex board
configurations at the current directory (which you run or1ksim from) or at
~/.or1k/

The current sim.cfg file that configures or1ksim emulator to RTEMS/or1ksim BSP
is at the same directory as this README. You can also use or1ksim script from
rtems-tools/sim-scripts.

From command line type:

$ sim -f sim.cfg $PATH_TO_RTEMS_EXE (old or1ksim releases)

or (if you use a stable/gitgub or1ksim release)

$ or1k-elf-sim -f sim.cfg $PATH_TO_RTEMS_EXE

From QEMU:

$ qemu-system-or32 -serial mon:stdio -serial /dev/null -net none -nographic \
  -m 128M -kernel $PATH_TO_RTEMS_EXE

from sim-scripts:

$ or1ksim $PATH_TO_RTEMS_EXE
$ qemu-or1k $PATH_TO_RTEMS_EXE