Test if ARM / xilinx_zynq_a9_qemu built correctly?

James Marshall jcmarsh at gwmail.gwu.edu
Thu Oct 20 19:58:27 UTC 2016


Hi Christian,

Thank you for your response, it is much appreciated. The ticker.exe program
works in qemu now: I had to change to a different version of qemu and
switch the order of the '-serial mon:stdio -serial /dev/null' arguments (as
well as use the -S option correctly!).

The details:
The qemu version suggested
by $RTEMS_DIR/rtems-src/c/src/lib/libbsp/arm/xilinx-zynq/README is 1.4.50.
When run with 'qemu-system-arm -s -no-reboot -serial null -serial mon:stdio
-net none -nographic -M xilinx-zynq-a9 -m 256M -kernel ticker.exe' the
output is:
*** BEGIN OF TEST CLOCK TICK ***
TA1  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:00   12/31/1988

At this point qemu freezes. A gdb backtrace shows:
(gdb) target remote 127.0.0.1:1234
Remote debugging using 127.0.0.1:1234
0x0001b386 in _CPU_Thread_Idle_body (ignored=0)
    at
../../../../../../../../rtems-src/c/src/../../cpukit/score/cpu/arm/armv7-thread-idle.c:32
32    __asm__ volatile ("wfi");
(gdb) bt
#0  0x0001b386 in _CPU_Thread_Idle_body (ignored=0)
    at
../../../../../../../../rtems-src/c/src/../../cpukit/score/cpu/arm/armv7-thread-idle.c:32
#1  0x00015dae in _Thread_Entry_adaptor_idle (executing=0x103558)
    at
../../../../../../rtems-src/c/src/../../cpukit/score/src/threadentryadaptoridle.c:25
#2  0x0001c654 in _Thread_Handler ()
    at
../../../../../../rtems-src/c/src/../../cpukit/score/src/threadhandler.c:90
#3  0x0001c606 in _User_extensions_Thread_exitted (
    executing=0x1c607 <_Thread_Handler>)
    at
../../cpukit/../../../xilinx_zynq_a9_qemu/lib/include/rtems/score/userextimpl.h:288
#4  0x00001008 in Init (argument=3852464152)
    at
../../../../../../../rtems-src/c/src/../../testsuites/samples/ticker/init.c:66
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Updating to version 2.0.0 of qemu appears to fix the issue, with ticker.exe
completing successfully.

So maybe the xilinx/README file should be updated? I don't know why it
specified that version of qemu or that ordering for the serial arguments.

Thanks for the help,
James





On Thu, Oct 20, 2016 at 1:07 AM, Christian Mauderer <
christian.mauderer at embedded-brains.de> wrote:

> Am 19.10.2016 um 16:54 schrieb James Marshall:
> > Good morning,
> >
> > I'm trying to build the xilinx_zynq_a9_qemu bsp for 4.12. I can't seem
> > to get ticker.exe to run, but I don't know if the problem is with the
> > build process or my qemu install.
> >
> > The 'make' command ran in about 4 minutes, and returned a lot of
> > messages like "make[5]: Nothing to be done for `all'." This makes me
> > suspect my configuration. Also, the *.exe files generated by 'make'
> > where not copied over by 'make install' (but I don't know if they should
> > have been). When I try to run ticker.exe with qemu I don't get any
> > output and have to kill the qemu process. So maybe I need to run qemu
> > with different arguments.
> >
> > Any help would be much appreciated. Thanks in advance,
> > James
> >
> > To build I did the following:
> > RSB:
> >   $ cd $RTEMS_DIR
> >   $ mkdir rsb; cd rsb
> >   $ git clone git://git.rtems.org/rtems-source-builder.git
> > <http://git.rtems.org/rtems-source-builder.git>
> >   $ cd rtems-source-builder/rtems/
> >   $ ../source-builder/sb-set-builder --prefix=${RTEMS_DIR}/4.12
> > 4.12/rtems-arm
> >   $ export PATH=${RTEMS_DIR}/4.12/bin:$PATH
> >   $ which autoconf
> >
> > RTEMS source:
> >   $ cd $RTEMS_DIR
> >   $ git clone git://git.rtems.org/rtems <http://git.rtems.org/rtems>
> > rtems-src
> >   $ cd rtems-src
> >   $ ./bootstrap
> >   $ cd ..; mkdir xilinx-zynq-qemu; mkdir install-xilinx-zynq; cd
> > xilinx-zynq-qemu
> >   $ ../rtems-src/configure --target=arm-rtems4.12
> > --enable-rtemsbsp=xilinx_zynq_a9_qemu --enable-tests=samples
> > --prefix=${RTEMS_DIR}/install-xilinx-zynq
> >   $ make
> >   $ make install
> >
> > To install qemu (as
> > per $RTEMS_DIR/rtems-src/c/src/lib/libbsp/arm/xilinx-zynq/README):
> >   $ cd $RTEMS_DIR
> >   $ mkdir install-qemu
> >   $ git clone git://git.qemu.org/qemu.git <http://git.qemu.org/qemu.git>
> > qemu
> >   $ cd qemu
> >   $ git checkout a1bff7
> >   $ mkdir build; cd build
> >   $ ../configure --prefix=${RTEMS_DIR}/install-qemu
> > --interp-prefix=${RTEMS_DIR}/install-qemu --disable-werror
> > (--disable-werror is needed to avoid failing on the use of a deprecated
> > libusb function (see end of email))
> >   $ make
> >   $ make install
> >   $ export PATH="$PATH:${RTEMS_DIR}/install-qemu/bin"
> >   $ which qemu-system-arm
> >
> > Test with ticker.exe:
> >   $ cd
> > $RTEMS_DIR/xilinx-zynq-qemu/arm-rtems4.12/c/xilinx_zynq_
> a9_qemu/testsuites/samples/ticker/
> >   $ qemu-system-arm -S -s -no-reboot -serial mon:stdio -serial /dev/null
> > -net none -nographic -M xilinx-zynq-a9 -m 256M -kernel ticker.exe
> >
> >
> > The output from configure is available
> > here: https://gist.github.com/jcmarsh/cd04fc93417c57d7bb1c6614601957d5
> > Output from
> > make: https://gist.github.com/jcmarsh/377487fd83afb1395b452ebda349ef7c
> > Output from 'make
> > install': https://gist.github.com/jcmarsh/3a05c4560292582bfb37d0e8f6e90d
> 78
> > Build directory
> > tree: https://gist.github.com/jcmarsh/87a805fca85558b1bc78877fc938582c
> >
> > qemu libusb warning: $RTEMS_DIR/rtems/qemu/hw/usb/host-libusb.c:243:5:
> > warning: ‘libusb_get_port_path’ is deprecated (declared at
> > /usr/include/libusb-1.0/libusb.h:1358): Use libusb_get_port_numbers
> > instead [-Wdeprecated-declarations]
> >      rc = libusb_get_port_path(ctx, dev, path, 7);
> >
> >
> >
> > _______________________________________________
> > users mailing list
> > users at rtems.org
> > http://lists.rtems.org/mailman/listinfo/users
> >
>
> Hello James,
>
> are you aware that the '-S' option on your qemu call freezes the CPU at
> startup. This is useful if you want to connect a debugger (gdb) to the
> qemu session.
>
> You can try one of the following:
> - connect a gdb to qemu and start the application through it
> - start the cpu using 'c' on the monitor (see
> https://en.wikibooks.org/wiki/QEMU/Monitor for more details)
> - remove the '-S' option
>
> Kind regards
>
> Christian Mauderer
>
> --
> --------------------------------------------
> embedded brains GmbH
> Christian Mauderer
> Dornierstr. 4
> D-82178 Puchheim
> Germany
> email: christian.mauderer at embedded-brains.de
> Phone: +49-89-18 94 741 - 18
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161020/d31dde1f/attachment.html>


More information about the users mailing list