psim network gdb patch with RTEMS 4.10

Ugarte, Carlos E. (GSFC-582.0)[NORTHRUP GRUMAN ELECTRONI] carlos.e.ugarte at
Thu Nov 11 21:45:28 UTC 2010


I am working from the RTEMS 4.10 branch.
I would like to run gdb-PSIM with network support.
I found the psim/network/README and I found out that the gdb-6.8 has a network patch.
I built and installed that .
When I run I get a message "attempt to attach unknown device ethtap" ...

I have dumped the generated device file  it seems to have the right info (i.e. ethtap stuff)
I am not quite clear on how the device file is generated an used.

Any hints as to how I proceed from here?


Carlos Ugarte
NASA Goddard Spaceflight Center

[root at localhost network-demos]#
[root at localhost network-demos]# /opt/rtems-4.10/rtems/powerpc-rtems4.10/psim/tests/psim-gdb -n /opt/rtems-4.10/rtems/powerpc-rtems4.10/psim/tests/netdemo.exe
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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-unknown-linux-gnu --target=powerpc-rtems4.10"...
/home/cugarte/rtems/rtems-4.10/example_code/network-demos/gdb_tree.root:1: Error in sourced command file:
core: attempt to attach unknown device ethtap
(gdb) q

[root at localhost network-demos]# cat psim_tree.root
#  Device Tree for PSIM
#  Automatically Generated -- DO NOT EDIT!!
/#address-cells 1
/openprom/init/register/pvr 0xfffe0000
# This must be >= than linkcmds defined RamSize!
/openprom/options/oea-memory-size 0x01000000
##### EEPROM @ 0x0c000000 for 512K
/eeprom at 0x0c000000/reg 0x0c000000 0x80000
/eeprom at 0x0c000000/nr-sectors 8
/eeprom at 0x0c000000/sector-size 0x10000
/eeprom at 0x0c000000/byte-write-delay 1000
/eeprom at 0x0c000000/sector-start-delay 100
/eeprom at 0x0c000000/erase-delay 1000
/eeprom at 0x0c000000/manufacture-code 0x01
/eeprom at 0x0c000000/device-code 0xa4

##### NVRAM/RTC NVRAM Portion is 0x0c080000 for 512K
##### NVRAM/RTC RTC   Portion is 0x0c100000 for 12
/nvram at 0x0c080000/reg 0x0c080000 524300
/nvram at 0x0c080000/timezone -3600

##### OPENPIC @ 0x0c130000 - 0x0c170000 (512K)
/opic at 0x0c130000/reg              0x0c130000 0 0x0c130000 0x40000
/opic at 0x0c130000/interrupt-ranges 0 0 0 16
/opic at 0x0c130000/device_type      open-pic
# interupt out -> CPU's interrupt pin
/opic at 0x0c130000 > intr0 int /cpus/cpu at 0

#### ETHTAP @ 0x0c100020 for 0x40
# NOTE 'ethtap' currently (200902) requires psim to
#      be patched -- also, it is only supported on
#      a linux host.
#      the 'ethtap' device transfers data from/to the
#      simulated network interface to/from a 'ethertap'
#      interface on the linux host (consult tun/tap
#      device documentation).
#      A very useful tool is 'tunctl' which allows for
#      configuring user-accessible, persistent 'tap'
#      devices so that psim may be executed w/o special
#      (root) privileges.

/ethtap at 0x0c100020/reg           0x0c100020 0x40
# route interrupt to open-pic
/ethtap at 0x0c100020               > 0 irq0 /opic at 0x0c130000
# 'tun' device on host
/ethtap at 0x0c100020/tun-device    "/dev/net/tun"
# name of 'tap' device to use
/ethtap at 0x0c100020/tap-ifname    "tap0"
# ethernet address of simulated IF
/ethtap at 0x0c100020/hw-address    "00:00:00:22:11:00"
# generate CRC and append to received packet before
# handing over to the simulation. This is mostly for
# debugging the rtems device driver. If unsure, leave 'false'.
/ethtap at 0x0c100020/enable-crc    false

[root at localhost network-demos]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1C:42:58:CA:73
          inet addr:  Bcast:  Mask:
          inet6 addr: fec0::fea9:21c:42ff:fe58:ca73/64 Scope:Site
          inet6 addr: fe80::21c:42ff:fe58:ca73/64 Scope:Link
          RX packets:24507 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22733 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20050543 (19.1 MiB)  TX bytes:17134091 (16.3 MiB)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1661 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1661 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3153945 (3.0 MiB)  TX bytes:3153945 (3.0 MiB)

tap0      Link encap:Ethernet  HWaddr A2:1B:4F:E1:82:23
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::a01b:4fff:fee1:8223/64 Scope:Link
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:60 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root at localhost network-demos]# env | grep RTEMS
[root at localhost network-demos]#


Carlos Ugarte
NASA Goddard Spaceflight Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list