Debugging Rtems application

Vishav.Vishav at dlr.de Vishav.Vishav at dlr.de
Thu Jan 2 09:20:53 UTC 2020


Hi,


I want to debug an RTEMS application using gdb on a board which is based on zynq. For the reference, I have followed the directions at following link (https://devel.rtems.org/wiki/Boards/Zynq%20-%20Zedboard)


The setup looks as follows:

  1.  I boot the board which loads u-boot. Using tftpboot, I run the debugger application.
Zynq> tftpboot 0x1000000 192.168.178.6:debugger.img
Using ethernet at e000b000 device
TFTP from server 192.168.178.6; our IP address is 192.168.178.1
Filename 'debugger.img'.
Load address: 0x1000000
Loading: #################################################################
         ##############
         2.1 MiB/s
done
Bytes transferred = 1150728 (118f08 hex)
Zynq> bootm 0x1000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   RTEMS
   Image Type:   ARM RTEMS Kernel Image (gzip compressed)
   Data Size:    1150664 Bytes = 1.1 MiB
   Load Address: 00104000
   Entry Point:  00104000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Transferring control to RTEMS (at address 00104000) ...
*** LIBBSD DEBUGGER 1 TEST ***

RTEMS Shell on /dev/console. Use 'help' to list commands.
SHLL [/] # nexus0: <RTEMS Nexus device>
cgem0: <Cadence CGEM Gigabit Ethernet Interface> on nexus0
miibus0: <MII bus> on cgem0
e1000phy0: <Marvell 88E1512 Gigabit PHY> PHY 0 on miibus0
e1000phy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDXo
info: cgem0: Ethernet address: 00:0a:35:00:01:01
zy7_slcr0: <Zynq-7000 slcr block> on nexus0
info: lo0: link state changed to UP
info: cgem0: link state changed to DOWN
add host 192.168.100.11: gateway cgem0
add net default: gateway 192.168.100.11
[CPU:0] rtems-db: remote running
[CPU:0] rtems-db: tcp remote: listing on port: 1122
info: cgem0: link state changed to UP
  2.  On the remote PC, I launch the application using gdb
arm-rtems5-gdb example_rtems_shell
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-rtems5".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from spwipc_example_rtems_shell...
(gdb) target remote 192.168.178.1:1122
Remote debugging using 192.168.178.1:1122
0x0022ddd0 in ip6qb ()
(gdb) break runExample
Breakpoint 1 at 0x1046ae: file examples/rtems_shell/rtems_shell.cpp, line 20.
(gdb) c
Continuing.

The program never breaks at runExample. However, if I launch the application without debugger on the host board using tftpboot, it works fine.  Is there something that I am missing ? What is the meaning of the line marked in red (0x0022ddd0 in ip6qb ()). I tried to debug other applications too and the address 0x0022ddd0 is always displayed.
It would be great if someone could help with the answer.

Thanks & Regards
Vishav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200102/01ffaeff/attachment.html>


More information about the users mailing list