<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Are you sure you are using the correct, patched gdb?<br>
<br>
You can check if the ethtap device is present in the simulator<br>
by issuing (gdb command prompt):<br>
<br>
linux> powerpc-rtems-gdb<br>
(gdb) target sim<br>
(gdb) sim trace ethtap-device<br>
<br>
If the device is known/present/implemented then there should<br>
be no response to this command. If the device is unknown then<br>
an error message is printed. Here the output from an unpatched<br>
gdb:<br>
<br>
<tt><a class="moz-txt-link-abbreviated" href="mailto:till@tillpad:~/Desktop/gdb-6.8/build-ppc-rtems$">till@tillpad:~/Desktop/gdb-6.8/build-ppc-rtems$</a> gdb/gdb<br>
GNU gdb 6.8<br>
Copyright (C) 2008 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later
<a class="moz-txt-link-rfc2396E" href="http://gnu.org/licenses/gpl.html"><http://gnu.org/licenses/gpl.html></a><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "--host=i686-pc-linux-gnu
--target=powerpc-rtems".<br>
(gdb) target sim<br>
Connected to the simulator.<br>
(gdb) sim trace ethtap-device<br>
Unknown trace option: ethtap-device<br>
<br>
(gdb)<br>
<br>
</tt>When using a patched version then the output looks like this:<br>
<br>
<tt><a class="moz-txt-link-abbreviated" href="mailto:till@tillpad:~/Desktop/gdb-6.8/build-ppc-rtems-patched$">till@tillpad:~/Desktop/gdb-6.8/build-ppc-rtems-patched$</a> gdb/gdb<br>
GNU gdb 6.8<br>
Copyright (C) 2008 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later
<a class="moz-txt-link-rfc2396E" href="http://gnu.org/licenses/gpl.html"><http://gnu.org/licenses/gpl.html></a><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "--host=i686-pc-linux-gnu
--target=powerpc-rtems".<br>
(gdb) target sim<br>
Connected to the simulator.<br>
(gdb) sim trace ethtap-device<br>
(gdb) </tt><br>
<br>
If you are positive that you are using your patched gdb<br>
then you should have a look at the config.log files and<br>
find out why the ethtap device was not configured in<br>
(you didn't patch after running 'configure', did you?).<br>
<br>
My <build-dir>/sim/ppc/config.h contains<br>
<br>
<tt>#define HAVE_ETHTAP 1</tt><br>
<br>
and <build-dir>/sim/ppc/config.log contains (look for
hw_ethtap.o):<br>
<br>
<tt>sim_hw_obj='hw_cpu.o hw_memory.o hw_nvram.o hw_iobus.o hw_htab.o
hw_disk.o hw_trace.o hw_register.o hw_vm.o hw_init.o hw_core.o
hw_pal.o hw_com.o hw_eeprom.o hw_opic.o hw_glue.o hw_phb.o
hw_ide.o hw_ethtap.o'</tt><br>
<br>
<br>
HTH<br>
-- Till<br>
<br>
<br>
On 11/11/2010 03:45 PM, Ugarte, Carlos E. (GSFC-582.0)[NORTHRUP
GRUMAN ELECTRONI] wrote:
<blockquote cite="mid:516661EA-6125-4CF5-8C8B-A0FFE445494A@nasa.gov"
type="cite">
<div><br>
</div>
Greetings,
<div><br>
</div>
<div>I am working from the RTEMS 4.10 branch.</div>
<div>I would like to run gdb-PSIM with network support.</div>
<div>I found the psim/network/README and I found out that the
gdb-6.8 has a network patch.</div>
<div>I built and installed that .</div>
<div>When I run I get a message "attempt to attach unknown device
ethtap" ...</div>
<div><br>
</div>
<div>I have dumped the generated device file it seems to have the
right info (i.e. ethtap stuff)</div>
<div>I am not quite clear on how the device file is generated an
used.</div>
<div><br>
</div>
<div><font class="Apple-style-span" face="'courier new',
monospace"><font class="Apple-style-span" face="Helvetica">Any
hints as to how I proceed from here?</font></font></div>
<div><font class="Apple-style-span" face="'courier new',
monospace"><font class="Apple-style-span" face="Helvetica"><br>
</font></font></div>
<div><font class="Apple-style-span" face="'courier new',
monospace"><font class="Apple-style-span" face="Helvetica">Thanks</font></font></div>
<div><font class="Apple-style-span" face="'courier new',
monospace"><font class="Apple-style-span" face="Helvetica"><br>
</font></font></div>
<div><font class="Apple-style-span" face="'courier new',
monospace"><font class="Apple-style-span" face="Helvetica">Carlos
Ugarte</font></font></div>
<div><font class="Apple-style-span" face="'courier new',
monospace"><font class="Apple-style-span" face="Helvetica">NASA
Goddard Spaceflight Center</font></font></div>
<div><span style="font-family: 'courier new',monospace;"><br>
<br>
[root@localhost network-demos]# </span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">[root@localhost
network-demos]# <b>/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 </b></span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">GNU gdb 6.8</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">Copyright
(C) 2008 Free Software Foundation, Inc.</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">License
GPLv3+: GNU GPL version 3 or later <<a
moz-do-not-send="true"
href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">This is free
software: you are free to change and redistribute it.</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">There is NO
WARRANTY, to the extent permitted by law. Type "show copying"</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">and "show
warranty" for details.</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">This GDB was
configured as "--host=x86_64-unknown-linux-gnu
--target=powerpc-rtems4.10"...</span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/home/cugarte/rtems/rtems-4.10/example_code/network-demos/gdb_tree.root:1:
Error in sourced command file:</span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"><b>core:
attempt to attach unknown device ethtap</b></span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">(gdb) q</span><br>
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">[root@localhost
network-demos]# <b>cat psim_tree.root</b></span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># Device
Tree for PSIM</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">#</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
Automatically Generated -- DO NOT EDIT!!</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/#address-cells
1</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/openprom/init/register/pvr
0xfffe0000</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># This must
be >= than linkcmds defined RamSize!</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/openprom/options/oea-memory-size
0x01000000</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">##### EEPROM
@ 0x0c000000 for 512K</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/reg
0x0c000000 0x80000</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/nr-sectors
8</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/sector-size
0x10000</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/byte-write-delay
1000</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/sector-start-delay
100</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/erase-delay
1000</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/manufacture-code
0x01</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/eeprom@0x0c000000/device-code
0xa4</span><br style="font-family: 'courier new',monospace;">
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#####
NVRAM/RTC NVRAM Portion is 0x0c080000 for 512K</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#####
NVRAM/RTC RTC Portion is 0x0c100000 for 12</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/nvram@0x0c080000/reg
0x0c080000 524300</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/nvram@0x0c080000/timezone
-3600</span><br style="font-family: 'courier new',monospace;">
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#####
OPENPIC @ 0x0c130000 - 0x0c170000 (512K)</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/opic@0x0c130000/reg
0x0c130000 0 0x0c130000 0x40000</span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/opic@0x0c130000/interrupt-ranges
0 0 0 16</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/opic@0x0c130000/device_type
open-pic</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># interupt
out -> CPU's interrupt pin</span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/opic@0x0c130000
> intr0 int /cpus/cpu@0</span><br style="font-family:
'courier new',monospace;">
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#### ETHTAP
@ 0x0c100020 for 0x40</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">#</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># NOTE
'ethtap' currently (200902) requires psim to</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># be
patched -- also, it is only supported on</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># a
linux host.</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># the
'ethtap' device transfers data from/to the</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
simulated network interface to/from a 'ethertap'</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
interface on the linux host (consult tun/tap</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
device documentation).</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># A
very useful tool is 'tunctl' which allows for</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
configuring user-accessible, persistent 'tap'</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
devices so that psim may be executed w/o special</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">#
(root) privileges.</span><br style="font-family: 'courier
new',monospace;">
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/ethtap@0x0c100020/reg
0x0c100020 0x40</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># route
interrupt to open-pic</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/ethtap@0x0c100020
> 0 irq0 /opic@0x0c130000</span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># 'tun'
device on host</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/ethtap@0x0c100020/tun-device
"/dev/net/tun"</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># name of
'tap' device to use</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/ethtap@0x0c100020/tap-ifname
"tap0"</span><br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># ethernet
address of simulated IF</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;">/ethtap@0x0c100020/hw-address
"00:00:00:22:11:00"</span><br style="font-family: 'courier
new',monospace;">
<span style="font-family: 'courier new',monospace;"># generate
CRC and append to received packet before</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># handing
over to the simulation. This is mostly for</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"># debugging
the rtems device driver. If unsure, leave 'false'.</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">/ethtap@0x0c100020/enable-crc
false</span><br>
<br>
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">[root@localhost
network-demos]# <b>ifconfig</b></span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">eth0
Link encap:Ethernet HWaddr 00:1C:42:58:CA:73 </span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet addr:10.211.55.4 Bcast:10.211.55.255 Mask:255.255.255.0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet6 addr: fec0::fea9:21c:42ff:fe58:ca73/64 Scope:Site</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet6 addr: fe80::21c:42ff:fe58:ca73/64 Scope:Link</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> UP
BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> RX
packets:24507 errors:0 dropped:0 overruns:0 frame:0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> TX
packets:22733 errors:0 dropped:0 overruns:0 carrier:0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
collisions:0 txqueuelen:1000 </span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> RX
bytes:20050543 (19.1 MiB) TX bytes:17134091 (16.3 MiB)</span><br
style="font-family: 'courier new',monospace;">
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">lo
Link encap:Local Loopback </span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet addr:127.0.0.1 Mask:255.0.0.0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet6 addr: ::1/128 Scope:Host</span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> UP
LOOPBACK RUNNING MTU:16436 Metric:1</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> RX
packets:1661 errors:0 dropped:0 overruns:0 frame:0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> TX
packets:1661 errors:0 dropped:0 overruns:0 carrier:0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
collisions:0 txqueuelen:0 </span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> RX
bytes:3153945 (3.0 MiB) TX bytes:3153945 (3.0 MiB)</span><br
style="font-family: 'courier new',monospace;">
<br style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">tap0
Link encap:Ethernet HWaddr A2:1B:4F:E1:82:23 </span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
inet6 addr: fe80::a01b:4fff:fee1:8223/64 Scope:Link</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> UP
BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> RX
packets:0 errors:0 dropped:0 overruns:0 frame:0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> TX
packets:0 errors:0 dropped:60 overruns:0 carrier:0</span><br
style="font-family: 'courier new',monospace;">
<span style="font-family: 'courier new',monospace;">
collisions:0 txqueuelen:500 </span><br style="font-family:
'courier new',monospace;">
<span style="font-family: 'courier new',monospace;"> RX
bytes:0 (0.0 b) TX bytes:0 (0.0 b)</span><br
style="font-family: 'courier new',monospace;">
<br style="font-family: 'courier new',monospace;">
[root@localhost network-demos]# <b>env | grep RTEMS</b><br>
RTEMS_MAKEFILE_PATH=/opt/rtems-4.10/rtems/powerpc-rtems4.10/psim<br>
RTEMS_ROOT=/opt/rtems-4.10/rtems<br>
RTEMS_VERSION=4.10<br>
RTEMS_INSTALL=/opt/rtems-4.10<br>
[root@localhost network-demos]# <br>
<br>
</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Carlos Ugarte </div>
<div>NASA Goddard Spaceflight Center </div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rtems-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a>
</pre>
</blockquote>
<br>
</body>
</html>