This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Debugging NET driver --- Solved
- To: "ecos-list" <ecos-discuss at sourceware dot cygnus dot com>
- Subject: Re: [ECOS] Debugging NET driver --- Solved
- From: "Rosimildo da Silva" <rosimildo at hotmail dot com>
- Date: Sun, 29 Jul 2001 10:41:31 -0500
- References: <OE42Lch9wPiyAphwFut00003bb8@hotmail.com>
Following up my own message. I have fixed the problem this morning.
Problem: adding pointer of diferent types. The send routine had a pointer to
a short,
and one offset in bytes was being used. :-)
I have attached the archive with the driver. It seems to work.
I have not done extensive testing, but it runs with all NET tests.
I have appended this to my ecos.db:
#-----------------------------------------------------------
package CYGPKG_DEVS_ETH_I386_PC_ELINK3 {
alias { "Standard PC with 3C5X9 ethernet device"
devs_eth_i386_pc_elink3 pc_elink3 }
hardware
directory devs/eth/i386/pc/elink3
script elink3_eth_drivers.cdl
description "Ethernet driver for standard PC with 3COM Elink III
NIC.
This is essentially support for a 3COM 3C5x9 card."
}
#----------------------------------------------------------------------
To configure eCos for the PC:
ecosconfig new pc
ecosconfig add net
ecosconfig add eth_drivers
ecosconfig remove pc_etherpro
ecosconfig add pc_elink3
ecosconfig tree
Rosimildo.
From: "Rosimildo da Silva" <rosimildo@hotmail.com>
To: "ecos-list" <ecos-discuss@sourceware.cygnus.com>
Sent: Saturday, July 28, 2001 12:37 PM
Subject: [ECOS] Debugging NET driver.
> Hi guys,
>
> I am trying to get eSoap tested with a PC target, so people can check
things
> out
> using a hardware that is available everywhere. I have built the i386
> toolset,
> installed RedBoot. Everything worked fine.
>
> My target PC ( test PC ) here is a Dell, and has a 3COM 3c509 card. I have
> ported the driver to eCos, and *thought* it would just work. :-)
> Well, it did not. I am able to ping the box. I am trying the
"server_test".
>
> I almost got everything working, I am able to send a package from W2K,
> and the eCos box receive it. The eCos box reply the message.
> As you can see on the gdb session below, ecos keep re-sending the
> same message over and over again, and W2K does not seem to get it.
>
> It is funny that I have a sniffer on another box, and I can see the reply
> from
> the eCos box.
>
> I would appreaciate if anybody can stop something, please give me an
> insight.
>
> I have code of the driver available if anybody wants it. Still not fully
> tested,
> but I do not have much time, and I'll probably go to the CompUSA to
> buy a EtherPro card. :-)
>
> Rosimildo.
> --------------------------------------------------------------------------
-
> $ i386-elf-gdb -b 38400 server_test.exe
> GNU gdb 5.0
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
details.
> This GDB was configured as "--host=i686-pc-cygwin --target=i386-elf"...
> (gdb) target remote com1
> Remote debugging using com1
> 0x8318 in ?? ()
> at
> /ecos/ecos/packages/language/c/libc/stdio/current/src/common/stdin.cxx:10
> 0
> 100
> (gdb) load
> Loading section .text, size 0x2537c lma 0x108000
> Loading section .rodata, size 0x1c37 lma 0x12d380
> Loading section .data, size 0x9e8 lma 0x12efb8
> Start address 0x108000 , load size 162203
> Transfer rate: 22372 bits/sec, 74 bytes/write.
> (gdb) cont
> Continuing.
> elink3 init
> 3C509: isa_probe() looking for a card...
> 1 3C5x9 board(s) on ISA found at 0x310
> Connector AUI active
> Connector BNC active
> Connector from Chip=3
> 3C509: I/O=0x310, IRQ=10, CONNECTOR=BNC, ADDRESS=0020 AF0F 7455
> 3C509: attach() is complete. -- irq vector=42
> 3C509: stop() called.
> Start SERVER test
> BOOTP[eth0] op: REPLY
> htype: Ethernet
> hlen: 6
> hops: 0
> xid: 0x0
> secs: 0
> flags: 0x0
> hw_addr: FF:FF:FF:FF:FF:FF
> client IP: 192.168.0.20
> my IP: 192.168.0.20
> server IP: 192.168.0.2
> gateway IP: 192.168.0.1
> options:
> subnet mask: 255.255.255.0
> IP broadcast: 192.168.0.255
> gateway: 192.168.0.1
> 3c509: start() called
> 3C509: init() is complete.
> Sending 42 bytes
> xmit 42 bytes at 145F56 sg[1]
> 00145F56: FFFF FFFF FFFF 0020 AF0F 7455 0806 0001 |....... ..tU....|
> 00145F66: 0800 0604 0001 0020 AF0F 7455 C0A8 0014 |....... ..tU....|
> 00145F76: 0000 0000 0000 C0A8 0014 |.......... |
> TX a frame: 44
> TX a frame complete: 42
> TxEvent 145F00
> 3c509: start() called
> 3C509: init() is complete.
> Sending 42 bytes
> xmit 42 bytes at 145F56 sg[1]
> 00145F56: FFFF FFFF FFFF 0020 AF0F 7455 0806 0001 |....... ..tU....|
> 00145F66: 0800 0604 0001 0020 AF0F 7455 C0A8 0014 |....... ..tU....|
> 00145F76: 0000 0000 0000 C0A8 0014 |.......... |
> TX a frame: 44
> TX a frame complete: 42
> TxEvent 145F00
> 3C509: stop() called.
> 3c509: start() called
> 3C509: init() is complete.
> RxEvent - stat: 383C, len: 60
> rx 14 bytes at 1309C8 sg[0]
> 001309C8: FFFF FFFF FFFF 0010 B59B CA84 0806 |.............. |
> rx 46 bytes at 145F20 sg[1]
> 00145F20: 0001 0800 0604 0001 0010 B59B CA84 C0A8 |................|
> 00145F30: 0005 0000 0000 0000 C0A8 0014 2020 2020 |............ |
> 00145F40: 2020 2020 2020 2020 2020 2020 2020 | |
> Sending 60 bytes
> xmit 14 bytes at 145FF0 sg[1]
> 00145FF0: 0010 B59B CA84 0020 AF0F 7455 0806 |....... ..tU.. |
> xmit 46 bytes at 145F20 sg[2]
> 00145F20: 0001 0800 0604 0002 0020 AF0F 7455 C0A8 |......... ..tU..|
> 00145F30: 0014 0010 B59B CA84 C0A8 0005 2020 2020 |............ |
> 00145F40: 2020 2020 2020 2020 2020 2020 2020 | |
> TX a frame: 60
> TX a frame complete: 46
> RxEvent - stat: 383E, len: 62
> rx 14 bytes at 1309C8 sg[0]
> 001309C8: 0020 AF0F 7455 0010 B59B CA84 0800 |. ..tU........ |
> rx 48 bytes at 146020 sg[1]
> 00146020: 4500 0030 49F5 4000 8006 2F69 C0A8 0005 |E..0I.@.../i....|
> 00146030: C0A8 0014 0703 1E36 2665 1D1C 0000 0000 |.......6&e......|
> 00146040: 7002 4000 58FB 0000 0204 05B4 0101 0402 |p.@.X...........|
> TxEvent 145F80
> Sending 58 bytes
> xmit 14 bytes at 146070 sg[1]
> 00146070: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 44 bytes at 156EB0 sg[2]
> 00156EB0: 4500 002C 84EC 0000 4006 7476 C0A8 0014 |E..,....@.tv....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035B 2665 1D1D |.....6...^.[&e..|
> 00156ED0: 6012 4470 52C8 0000 0204 05B4 |`.DpR....... |
> TX a frame: 60
> TX a frame complete: 44
> RxEvent - stat: 383C, len: 60
> rx 14 bytes at 1309C8 sg[0]
> 001309C8: 0020 AF0F 7455 0010 B59B CA84 0800 |. ..tU........ |
> rx 46 bytes at 1460A0 sg[1]
> 001460A0: 4500 0028 49F6 4000 8006 2F70 C0A8 0005 |E..(I.@.../p....|
> 001460B0: C0A8 0014 0703 1E36 2665 1D1D 135E 035C |.......6&e...^.\|
> 001460C0: 5010 4470 6A85 0000 2020 2020 2020 |P.Dpj... |
> RxEvent - stat: 383F, len: 63
> rx 14 bytes at 1309C8 sg[0]
> 001309C8: 0020 AF0F 7455 0010 B59B CA84 0800 |. ..tU........ |
> rx 49 bytes at 146120 sg[1]
> 00146120: 4500 0031 49F7 4000 8006 2F66 C0A8 0005 |E..1I.@.../f....|
> 00146130: C0A8 0014 0703 1E36 2665 1D1D 135E 035C |.......6&e...^.\|
> 00146140: 5018 4470 FCCB 0000 6869 2074 6865 7265 |P.Dp....hi there|
> 00146150: 0A |. |
> TxEvent 146000
> connection from 192.168.0.5:1795
> Sending 77 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 63 bytes at 156EB0 sg[2]
> 00156EB0: 4500 003F A1BE 0000 4006 5791 C0A8 0014 |E..?....@.W.....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5018 4467 9FD3 0000 4865 6C6C 6F20 3139 |P.Dg....Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A |2.168.0.5:1795. |
> TX a frame: 80
> TX a frame complete: 63
> TxEvent 146080
> write n= 23
> buf = 'hi there
> '
> Sending 113 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 99 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0063 83CE 0000 4006 755D C0A8 0014 |E..c....@.u]....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5018 4470 737A 0000 4865 6C6C 6F20 3139 |P.Dpsz..Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A68 |2.168.0.5:1795.h|
> 00156EF0: 6920 7468 6572 650A 6869 2074 6865 7265 |i there.hi there|
> 00156F00: 0A68 6920 7468 6572 650A 6869 2074 6865 |.hi there.hi the|
> 00156F10: 7265 0A |re. |
> TX a frame: 116
> TX a frame complete: 99
> TxEvent 146080
> Sending 54 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 40 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0028 EA61 0000 4006 0F05 C0A8 0014 |E..(.a..@.......|
> 00156EC0: C0A8 0005 1E36 0703 135E 0397 2665 1D26 |.....6...^..&e.&|
> 00156ED0: 5011 4470 6A40 0000 |P.Dpj@.. |
> TX a frame: 56
> TX a frame complete: 40
> RxEvent - stat: 383C, len: 60
> rx 14 bytes at 1309C8 sg[0]
> 001309C8: 0020 AF0F 7455 0010 B59B CA84 0800 |. ..tU........ |
> rx 46 bytes at 146120 sg[1]
> 00146120: 4500 0028 49F8 4000 8006 2F6E C0A8 0005 |E..(I.@.../n....|
> 00146130: C0A8 0014 0703 1E36 2665 1D26 135E 035C |.......6&e.&.^.\|
> 00146140: 5010 4470 6A7C 0000 2020 2020 2020 |P.Dpj|.. |
> TxEvent 146080
> Sending 113 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 99 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0063 BE0A 0000 4006 3B21 C0A8 0014 |E..c....@.;!....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5019 4470 7379 0000 4865 6C6C 6F20 3139 |P.Dpsy..Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A68 |2.168.0.5:1795.h|
> 00156EF0: 6920 7468 6572 650A 6869 2074 6865 7265 |i there.hi there|
> 00156F00: 0A68 6920 7468 6572 650A 6869 2074 6865 |.hi there.hi the|
> 00156F10: 7265 0A |re. |
> TX a frame: 116
> TX a frame complete: 99
> TxEvent 146080
> Sending 113 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 99 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0063 AC5F 0000 4006 4CCC C0A8 0014 |E..c._..@.L.....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5019 4470 7379 0000 4865 6C6C 6F20 3139 |P.Dpsy..Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A68 |2.168.0.5:1795.h|
> 00156EF0: 6920 7468 6572 650A 6869 2074 6865 7265 |i there.hi there|
> 00156F00: 0A68 6920 7468 6572 650A 6869 2074 6865 |.hi there.hi the|
> 00156F10: 7265 0A |re. |
> TX a frame: 116
> TX a frame complete: 99
> TxEvent 146080
> Sending 113 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 99 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0063 A9A0 0000 4006 4F8B C0A8 0014 |E..c....@.O.....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5019 4470 7379 0000 4865 6C6C 6F20 3139 |P.Dpsy..Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A68 |2.168.0.5:1795.h|
> 00156EF0: 6920 7468 6572 650A 6869 2074 6865 7265 |i there.hi there|
> 00156F00: 0A68 6920 7468 6572 650A 6869 2074 6865 |.hi there.hi the|
> 00156F10: 7265 0A |re. |
> TX a frame: 116
> TX a frame complete: 99
> TxEvent 146080
> Sending 113 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 99 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0063 E9BA 0000 4006 0F71 C0A8 0014 |E..c....@..q....|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5019 4470 7379 0000 4865 6C6C 6F20 3139 |P.Dpsy..Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A68 |2.168.0.5:1795.h|
> 00156EF0: 6920 7468 6572 650A 6869 2074 6865 7265 |i there.hi there|
> 00156F00: 0A68 6920 7468 6572 650A 6869 2074 6865 |.hi there.hi the|
> 00156F10: 7265 0A |re. |
> TX a frame: 116
> TX a frame complete: 99
> TxEvent 146080
> Sending 113 bytes
> xmit 14 bytes at 1460F0 sg[1]
> 001460F0: 0010 B59B CA84 0020 AF0F 7455 0800 |....... ..tU.. |
> xmit 99 bytes at 156EB0 sg[2]
> 00156EB0: 4500 0063 E32A 0000 4006 1601 C0A8 0014 |E..c.*..@.......|
> 00156EC0: C0A8 0005 1E36 0703 135E 035C 2665 1D26 |.....6...^.\&e.&|
> 00156ED0: 5019 4470 7379 0000 4865 6C6C 6F20 3139 |P.Dpsy..Hello 19|
> 00156EE0: 322E 3136 382E 302E 353A 3137 3935 0A68 |2.168.0.5:1795.h|
> 00156EF0: 6920 7468 6572 650A 6869 2074 6865 7265 |i there.hi there|
> 00156F00: 0A68 6920 7468 6572 650A 6869 2074 6865 |.hi there.hi the|
> 00156F10: 7265 0A |re. |
> TX a frame: 116
> TX a frame complete: 99
> TxEvent 146080
>
>
>
>
> >>> this happens when I close the Wk2 application.
>
>
> RxEvent - stat: 383C, len: 60
> rx 14 bytes at 1309C8 sg[0]
> 001309C8: 0020 AF0F 7455 0010 B59B CA84 0800 |. ..tU........ |
> rx 46 bytes at 146020 sg[1]
> 00146020: 4500 0028 49F9 4000 8006 2F6D C0A8 0005 |E..(I.@.../m....|
> 00146030: C0A8 0014 0703 1E36 2665 1D26 135E 035C |.......6&e.&.^.\|
> 00146040: 5004 0000 AEF8 0000 2020 2020 2020 |P....... |
> [New thread 1]
>
> Program received signal SIGINT, Interrupt.
> 0x108215 in hal_idle_thread_action ()
> at
> /ecos/ecos/packages/language/c/libc/stdio/current/src/common/stdin.cxx:10
> 0
> ---
> Rosimildo da Silva rosimildo@hotmail.com
> ConnectTel, Inc. Austin, TX -- USA
> Phone : 512-338-1111 Fax : 512-918-0449
> Company Page: http://www.connecttel.com
> Home Page: http://members.nbci.com/rosimildo/
>
>
ecos_eth_driver_elink3.zip