2009-05-29 08:28:22     Is anyone successfully using gdbproxy 2008R1.5 on win32?

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2009-05-29 08:28:22     Is anyone successfully using gdbproxy 2008R1.5 on win32?

Florian Kandzia (GERMANY)

Message: 74756   

 

Help... I need to know: Is there anyone out there using a gnICE with bfin-gdbproxy (not bfin-jtag!) to debug applications on a windows platform?

 

 

 

My problem is as follows:

 

Parallel cable drivers are disabled in gdbproxy for win32.

 

I was trying to get gdbproxy working with parallel port cables in a windows environment. I managed to port some code from UrJTAG 0.10 (supporting parallel port on mingw) into the bfin-gdbproxy source packet 2008R1.5.

 

The modified gdbproxy compiles just fine. It also detects the Blackfin (-> cable driver is working) and than it listens for gdb on port 2000.

 

As soon as gdb connects to it, gdbproxy crashes with "chain.c(129) Part 0 without active instruction" as last message.

 

 

 

Now I'm not quite sure if that's a problem that comes from my modification. So it would be interesting to know, if the original version of also gdbproxy crashes as soon as gdb connects to it. This can only be tested using an USB JTAG cable because the toolchain binary only supports USB cables.

 

Is there anyone with a gnICE who could verify this with the 2008R1.5 windows installer?

TranslateQuoteReplyEditDelete

 

 

2009-05-29 08:35:39     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Mike Frysinger (UNITED STATES)

Message: 74757   

 

it works just fine with the gnICE.  if detect isnt working, you probably didnt configure the packages properly or install them in the right paths.  make sure you configure/build them the same way we do (so read the buildtoolchain script).  most likely you arent using the relocatable configure option.

QuoteReplyEditDelete

 

 

2009-05-29 08:52:08     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Florian Kandzia (GERMANY)

Message: 74758   

 

Mike,

 

detect does work. I get the following output (from my recompiled binary with inpout32 support):

 

 

 

Initializing parallel port at 0x378

IR length: 5

Chain length: 1

Device Id: 01000010011110100101000011001011 (0x00000000427A50CB)

  Manufacturer: Analog Devices

  Part(0):         BF533

  Stepping:     4

  Filename:     c:\programme\analog devices\gnu toolchain\2008r1.5\elf\bin\../share/urjtag/analog/bf533/bf533

warning:   bfin: no board selected, BF533 is detected

notice:    bfin-gdbproxy: waiting on TCP port 2000

 

The problem is that gdbproxy crashes as soon as gdb connects to it.

TranslateQuoteReplyEditDelete

 

 

2009-05-29 08:56:36     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Mike Frysinger (UNITED STATES)

Message: 74760   

 

post the exact output of the crash

 

i know the gnICE works because i've used it under Windows with gdbproxy to debug bare metal code

QuoteReplyEditDelete

 

 

2009-05-29 09:18:48     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Florian Kandzia (GERMANY)

Message: 74762   

 

I get the following output:

 

 

 

Remote proxy for GDB, v0.7.2, Copyright (C) 1999 Quality Quorum Inc.

MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

Blackfin adaption Copyright (C) 2008 Analog Devices, Inc.

 

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details

use `--warranty' option. This is Open Source software. You are

welcome to redistribute it under certain conditions. Use the

'--copying' option for details.

 

Initializing parallel port at 0x378

IR length: 5

Chain length: 1

Device Id: 01000010011110100101000011001011 (0x00000000427A50CB)

  Manufacturer: Analog Devices

  Part(0):         BF533

  Stepping:     4

  Filename:     c:\programme\analog devices\gnu toolchain\2008r1.5\elf\bin\../share/urjtag/analog/bf533/bf533

warning:   bfin: no board selected, BF533 is detected

notice:    bfin-gdbproxy: waiting on TCP port 2000

notice:    bfin-gdbproxy: connected

chain.c(129) Part 0 without active instruction

 

C:\Programme\Analog Devices\GNU Toolchain\2008R1.5\elf\bin>

 

 

 

the program returns to the command prompt after I click away the "do you want to debug...." message box.

 

 

 

---- just for fun I also compiled gdbproxy sources UNMODIFIED using cygwin (because ioperm is available, there is no need for an inpout32-hack). Running the cygwin binary gives the following (same) output:

 

 

 

C:\cygfile\xxx>gdbproxy.exe bfin --connect='cable wiggler parallel 0x378'

 

Remote proxy for GDB, v0.7.2, Copyright (C) 1999 Quality Quorum Inc.

MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

Blackfin adaption Copyright (C) 2008 Analog Devices, Inc.

 

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details

use `--warranty' option. This is Open Source software. You are

welcome to redistribute it under certain conditions. Use the

'--copying' option for details.

 

Initializing parallel port at 0x378

IR length: 5

Chain length: 1

Device Id: 01000010011110100101000011001011 (0x00000000427A50CB)

  Manufacturer: Analog Devices

  Part(0):         BF533

  Stepping:     4

  Filename:     ../share/urjtag/analog/bf533/bf533

warning:   bfin: no board selected, BF533 is detected

notice:    gdbproxy: waiting on TCP port 2000

notice:    gdbproxy: connected

chain.c(129) Part 0 without active instruction

      3 [main] gdbproxy 2392 _cygtls::handle_exceptions: Exception: STATUS_ACCES

S_VIOLATION

    398 [main] gdbproxy 2392 open_stackdumpfile: Dumping stack trace to gdbproxy

.exe.stackdump

922325 [main] gdbproxy 2392 _cygtls::handle_exceptions: Exception: STATUS_ACCES

S_VIOLATION

944458 [main] gdbproxy 2392 _cygtls::handle_exceptions: Error while dumping sta

te (probably corrupted stack)

 

C:\cygfile\xxx>

TranslateQuoteReplyEditDelete

 

 

2009-05-29 16:05:29     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Mike Frysinger (UNITED STATES)

Message: 74787   

 

we dont support cygwin and we arent about to start.  the Blackfin Windows toolchains are all built with mingw.

QuoteReplyEditDelete

 

 

2009-05-30 04:31:42     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Florian Kandzia (GERMANY)

Message: 74810   

 

I know that cygwin isn't supported. I didn't ask about cygwin. I just compiled a cygwin version to see if my mingw version crashes because of the modifications I added. The cygwin version was compiled without any modifications to the source and it behaves the same was as a native mingw build with inpout32 patches. From that I conclude, that inpout32 was not the reason for the crash...

 

My original question - does the gnICE work with gdbproxy on windows.... you have already answered it. I still have one question. It was working for to to debug bare metal code. Do you happen to remember which version of the toolchain you used at that time - was it 2008R1.5 or some later or earlier version?

TranslateQuoteReplyEditDelete

 

 

2009-05-30 05:49:58     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Mike Frysinger (UNITED STATES)

Message: 74813   

 

i wanted to make sure you werent doing both tests with cygwin

 

the tests i did are with the installer that is on our website right now -- that is 2008R1.5

QuoteReplyEditDelete

 

 

2009-06-02 07:26:39     Re: Is anyone successfully using gdbproxy 2008R1.5 on win32?

Florian Kandzia (GERMANY)

Message: 75020   

 

Update:

 

It's working now. My mistake was that I had copied the part definition folder (called share/urjtag) from urjtag in order to enable new blackfin steppings. That way, the special "bfin" instructions were lost and gdbproxy failed.

 

For anyone else who needs wiggler support on win32, there are two ways to get it:

 

    Build bfin-gdbproxy under cygwin (without -mno-cygwin), this requires just a small edit of the configure script. You will get a cygwin binary that requieres cygwin dlls, but it can access the parallel port without modifications to the source.

    Build (cross compile from a (co)linux system) bfin-gdbproxy with mingw, using the file direct.c from urjtag 0.1, this requires some hacking of #define statements in the rest of the source. You will get a native gdbproxy like the one in the win32 toolchain release, but with parallel port support via inpout32.dll

 

This procedure was tested using the jtagtools source package of the 2008R1.5 release. For me, it seems that the cygwin version runs faster (maybe inpout32 introduces some additional latency).

TranslateQuoteReplyEditDelete

Attachments

    Outcomes