Running ARM or PPC RTEMS simulations on x64 hardware

Joel Sherrill joel at rtems.org
Fri Feb 26 22:24:18 UTC 2016


On Fri, Feb 26, 2016 at 4:11 PM, Matthew Clark <linux.matthew at gmail.com>
wrote:

> I've successfully built/run the sparc sim (sis) test examples as described
> in
>
> https://devel.rtems.org/wiki/TBR/UserManual/Quick_Start
>
>
Good job! But you now have learned one of the reasons we use sis in the
Quick Start.
sis is the easiest simulator to actually use. :)


> My target hardware is a Zedboard, Raspberry Pi2 and a basic ML405
> (Virtex4), but when I try to re-create the above for the various bsps,
> including supposed qemu plaftorms like qemuppc, I get all manner of errors,
> such as
>
> $powerpc-rtems4.11-run ./qemuppc/testsuites/samples/hello/hello.exe
> ./qemuppc/testsuites/samples/hello/hello.exe: Caught signal 11 at address
> 0xffc00014
>
>
qemuppc is a PowerPC BSP that runs on the qemu simulator.


> I get nothing for ARM:
>
> $arm-rtems4.11-run ./xilinx_zynq_a9_qemu/testsuites/samples/hello/hello.exe
> $
>
>
The ARM simulator in gdb does not know how to run this. Qemu is the
simulator
for the xilinx_zynq_a9_qemu BSP.

You will need to build qemu with the RSB and install it.

Then there are some easy to use helper scripts in the
rtems-testing/sim-scripts
directory named after the BSP they are invoking a simulator to simulate. So
you would invoke it as:

xilinx_zynq_a9_qemu -i hello.exe

-i indicates interactive mode. By default it runs all .exe files on the
command
line with output logged to files.



> though if I tried to run the hello.exe through ARM's GDB, I get a
> different error:
>
> $ arm-rtems4.11-gdb
> ./xilinx_zynq_a9_qemu/testsuites/samples/hello/hello.exe
> GNU gdb (GDB) 7.9
> ...
> This GDB was configured as "--host=x86_64-linux-gnu
> --target=arm-rtems4.11".Type "show configuration" for configuration details.
> ...
> Reading symbols from
> ./xilinx_zynq_a9_qemu/testsuites/samples/hello/hello.exe... done.
> (gdb) tar sim
> Connected to the simulator.
> (gdb) load
> Loading section .start, size 0x6d8 vma 0x0
> Loading section .text, size 0x2071c vma 0x700
> Loading section .init, size 0xc vma 0x20e1c
> Loading section .fini, size 0xc vma 0x20e28
> Loading section .rodata, size 0x1150 vma 0x20e38
> Loading section .ARM.exidx, size 0x8 vma 0x21f88
> Loading section .eh_frame, size 0x74 vma 0x21f90
> Loading section .init_array, size 0x4 vma 0x22004
> Loading section .fini_array, size 0x4 vma 0x22008
> Loading section .jcr, size 0x4 vma 0x2200c
> Loading section .data, size 0x6d0 vma 0x101400
> Start address 0x40
> Transfer rate: 1127840 bits in <1 sec.
> (gdb) r
> Starting program: xilinx_zynq_a9_qemu/testsuites/samples/hello/hello.exe
> [Inferior 1 (process 42000) exited with code 060]
>
>
Same situation. The run and gdb commands are from the gdb source tree
and are the same simulator under the hood.


> I don't always have access to the target hardware and I wanted to run
> simple tests in a simulator environment.   Am I doing something wrong?  If
> so, what?
>
> Thanks,
>
> Matt
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160226/010f8426/attachment-0002.html>


More information about the users mailing list