2010-08-06 04:27:57     gdb-proxy bf527 KBCZ reset problem

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

2010-08-06 04:27:57     gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92216   

 

We have for sometime used the bare-metal toolchain with BF527 KBCZ-6X 1314718.1 B-0.1. Without this problem. We recently received a new production batch containing BF527 KBCZ-6 1839681.1B-0.2. We tested with the VDSP 5.0 and everything is fine. But with bfin-elf toolchain we get problems from gdb-proxy only on this new processor batch/type.

 

We tried different versions of the toolchain and different produced boards.

What happens is the gdbproxy craches in one version and in another (the latest release) it hangs forever in the resetting of the processor.

 

We started the gdbproxy in debug “bfin-gdbproxy --debug bfin –reset” and got:

 

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.

 

debug:     bfin: bfin_open ()

Connected to libftdi driver.

IR length: 5

Chain length: 1

Device Id: 00100010011111100000000011001011 (0x00000000227E00CB)

  Manufacturer: Analog Devices

  Part(0):         BF527

  Stepping:     2

  Filename:     c:\program files\analog devices\gnu

toolchain\svn-20090913\elf\bin\../share/urjtag/analog/bf527/bf527

warning:   bfin: no board selected, BF527 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy.exe: waiting on TCP port 2000

notice:    bfin-gdbproxy.exe: connected

debug:     bfin: bfin_connect ()

debug:     bfin: emulation_enable ()

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <before>

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <after>

debug:     [0] DBGCTL [0x00a3]: emudatsz_40 emuirsz_32 emfen empwr

<emulation_enable>

debug:     bfin: emulation_trigger ()

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <before>

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <after>

info:      [0] emulator not ready: DBGSTAT [0x0000]

info:      Resetting ...

debug:     Reset core(s)

debug:     Reset system

debug:     [0] DBGSTAT [0x0058] PC [0x00000000]

debug:     bfin: bfin_current_thread_query ()

debug:     bfin: bfin_offsets_query ()

debug:     bfin: bfin_set_gen_thread (1)

debug:     bfin: bfin_read_single_register (14)

debug:     bfin: bfin_write_mem (0xFFA00000, ptr, 0)

debug:     bfin: bfin_write_mem (0xFFA00000, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00020, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00040, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00060, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00080, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA000A0, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_read_single_register (0)

debug:     bfin: bfin_read_single_register (1)

debug:     bfin: bfin_read_single_register (2)

debug:     bfin: bfin_read_single_register (3)

debug:     bfin: bfin_read_single_register (4)

debug:     bfin: bfin_read_single_register (5)

debug:     bfin: bfin_read_single_register (6)

debug:     bfin: bfin_read_single_register (7)

debug:     bfin: bfin_read_single_register (8)

debug:     bfin: bfin_read_single_register (9)

debug:     bfin: bfin_read_single_register (10)

debug:     bfin: bfin_read_single_register (11)

debug:     bfin: bfin_read_single_register (12)

debug:     bfin: bfin_read_single_register (13)

debug:     bfin: bfin_read_single_register (16)

debug:     bfin: bfin_read_single_register (17)

debug:     bfin: bfin_read_single_register (18)

debug:     bfin: bfin_read_single_register (19)

debug:     bfin: bfin_read_single_register (20)

debug:     bfin: bfin_read_single_register (21)

debug:     bfin: bfin_read_single_register (22)

debug:     bfin: bfin_read_single_register (23)

debug:     bfin: bfin_read_single_register (24)

debug:     bfin: bfin_read_single_register (25)

debug:     bfin: bfin_read_single_register (26)

debug:     bfin: bfin_read_single_register (27)

debug:     bfin: bfin_read_single_register (28)

debug:     bfin: bfin_read_single_register (29)

debug:     bfin: bfin_read_single_register (30)

debug:     bfin: bfin_read_single_register (31)

debug:     bfin: bfin_read_single_register (32)

debug:     bfin: bfin_read_single_register (33)

debug:     bfin: bfin_read_single_register (34)

debug:     bfin: bfin_read_single_register (35)

debug:     bfin: bfin_read_single_register (36)

debug:     bfin: bfin_read_single_register (37)

debug:     bfin: bfin_read_single_register (38)

debug:     bfin: bfin_read_single_register (39)

debug:     bfin: bfin_read_single_register (40)

debug:     bfin: bfin_read_single_register (41)

debug:     bfin: bfin_read_single_register (42)

debug:     bfin: bfin_read_single_register (43)

debug:     bfin: bfin_read_single_register (44)

debug:     bfin: bfin_read_single_register (45)

debug:     bfin: bfin_read_single_register (46)

debug:     bfin: bfin_read_single_register (47)

debug:     bfin: bfin_read_single_register (48)

debug:     bfin: bfin_read_single_register (49)

debug:     bfin: bfin_read_single_register (50)

debug:     bfin: bfin_read_single_register (51)

debug:     bfin: bfin_read_single_register (52)

debug:     bfin: bfin_read_single_register (54)

debug:     bfin: bfin_read_single_register (55)

debug:     bfin: bfin_read_single_register (56)

debug:     bfin: bfin_read_single_register (57)

debug:     bfin: bfin_read_single_register (58)

debug:     bfin: bfin_read_single_register (59)

debug:     bfin: bfin_read_single_register (60)

debug:     bfin: bfin_write_single_register (53, 0xFFA00000)

debug:     bfin: bfin_set_ctrl_thread (0)

debug:     bfin: bfin_resume_from_current (run, 0)

debug:     bfin: [0] core_emulation_return ()

debug:     [0] DBGSTAT [0x004A] <before>

debug:     [0] DBGSTAT [0x004A] <after>

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

QuoteReplyEditDelete

 

 

2010-08-06 04:33:21     Re: gdb-proxy bf527 KBCZ reset problem

Mike Frysinger (UNITED STATES)

Message: 92217   

 

that's a pretty old snapshot.  if you're going to run bleeding edge software, you really need to keep up to date.  we dont support arbitrary svn snaps, only the last release and latest trunk.

QuoteReplyEditDelete

 

 

2010-08-06 05:02:17     Re: gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92218   

 

Hi mike

 

if I go to the releases from the front page (http://blackfin.uclinux.org/gf/) i get:

 

http://blackfin.uclinux.org/gf/project/toolchain/frs

 

Where 2009R1.1_RC2 is the lateste release ?!?!? And that is the one we use.

QuoteReplyEditDelete

 

 

2010-08-06 05:05:40     Re: gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92219   

 

And we then tried an "arbitrary" release as to see the problems remained.

QuoteReplyEditDelete

 

 

2010-08-06 11:27:03     Re: gdb-proxy bf527 KBCZ reset problem

Mike Frysinger (UNITED STATES)

Message: 92226   

 

are you sure about that ?  the 2009R1.1 release does not install into "svn-20090913", it installs into "2009R1.1".  random snapshots however install into dirs named like that.

QuoteReplyEditDelete

 

 

2010-08-09 04:54:36     Re: gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92259   

 

It installs into and runs by:

C:\Program Files\Analog Devices\GNU Toolchain\2009R1.1\elf\bin>bfin-gdbproxy.exe --debug bfin --reset

 

Which on this specific processor gives the above output. It seems like the path you see is to some source code (urjtag) printed from the actual binary not the actual intall. So maybe the build process includes it from a different place than expected (SVN and its release branches) ?

QuoteReplyEditDelete

 

 

2010-08-09 07:53:31     Re: gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92261   

 

In some way when one has multiple installs of the toolchain, gdb-proxy uses the first occurence of the path to ../share/urjtag/analog/bf527/bf527 (independent of which gdb-proxy version used). We tried to delete the arbitrary SVN build which when we ran the 2009_RC1.1 gdbproxy gave the same result but now with the correct path:

 

C:\Program Files\Analog Devices\GNUToolchain\2009R1.1\elf\bin>bfin-gdbproxy.exe --debug bfin --reset

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.

 

debug:     bfin: bfin_open ()

Connected to libftdi driver.

IR length: 5

Chain length: 1

Device Id: 00100010011111100000000011001011 (0x00000000227E00CB)

Manufacturer: Analog Devices

Part(0):         BF527

Stepping:     2

Filename:     c:\program files\analog devices\gnu

toolchain\2009r1.1\elf\bin\../share/urjtag/analog/bf527/bf527

warning:   bfin: no board selected, BF527 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy.exe: waiting on TCP port 2000

notice:    bfin-gdbproxy.exe: connected

debug:     bfin: bfin_connect ()

debug:     bfin: emulation_enable ()

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <before>

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <after>

debug:     [0] DBGCTL [0x00a3]: emudatsz_40 emuirsz_32 emfen empwr

<emulation_enable>

debug:     bfin: emulation_trigger ()

debug:     [0] DBGSTAT [0x0000]: cause:emuexcpt <before>

debug:     [0] DBGSTAT [0x0050]: cause:emuin emuready <after>

info:      Resetting ...

debug:     Reset core(s)

debug:     Reset system

debug:     [0] DBGSTAT [0x0058] PC [0x00000000]

debug:     bfin: bfin_current_thread_query ()

debug:     bfin: bfin_offsets_query ()

debug:     bfin: bfin_set_gen_thread (1)

debug:     bfin: bfin_read_single_register (14)

debug:     bfin: bfin_write_mem (0xFFA00000, ptr, 0)

debug:     bfin: bfin_write_mem (0xFFA00000, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00020, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00040, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00060, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA00080, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_write_mem (0xFFA000A0, ptr, 0)

debug:     bfin: [0] core_cache_status_get ()

debug:     bfin: bfin_write_mem () through Core [0]

debug:     bfin: bfin_read_single_register (0)

debug:     bfin: bfin_read_single_register (1)

debug:     bfin: bfin_read_single_register (2)

debug:     bfin: bfin_read_single_register (3)

debug:     bfin: bfin_read_single_register (4)

debug:     bfin: bfin_read_single_register (5)

debug:     bfin: bfin_read_single_register (6)

debug:     bfin: bfin_read_single_register (7)

debug:     bfin: bfin_read_single_register (8)

debug:     bfin: bfin_read_single_register (9)

debug:     bfin: bfin_read_single_register (10)

debug:     bfin: bfin_read_single_register (11)

debug:     bfin: bfin_read_single_register (12)

debug:     bfin: bfin_read_single_register (13)

debug:     bfin: bfin_read_single_register (16)

debug:     bfin: bfin_read_single_register (17)

debug:     bfin: bfin_read_single_register (18)

debug:     bfin: bfin_read_single_register (19)

debug:     bfin: bfin_read_single_register (20)

debug:     bfin: bfin_read_single_register (21)

debug:     bfin: bfin_read_single_register (22)

debug:     bfin: bfin_read_single_register (23)

debug:     bfin: bfin_read_single_register (24)

debug:     bfin: bfin_read_single_register (25)

debug:     bfin: bfin_read_single_register (26)

debug:     bfin: bfin_read_single_register (27)

debug:     bfin: bfin_read_single_register (28)

debug:     bfin: bfin_read_single_register (29)

debug:     bfin: bfin_read_single_register (30)

debug:     bfin: bfin_read_single_register (31)

debug:     bfin: bfin_read_single_register (32)

debug:     bfin: bfin_read_single_register (33)

debug:     bfin: bfin_read_single_register (34)

debug:     bfin: bfin_read_single_register (35)

debug:     bfin: bfin_read_single_register (36)

debug:     bfin: bfin_read_single_register (37)

debug:     bfin: bfin_read_single_register (38)

debug:     bfin: bfin_read_single_register (39)

debug:     bfin: bfin_read_single_register (40)

debug:     bfin: bfin_read_single_register (41)

debug:     bfin: bfin_read_single_register (42)

debug:     bfin: bfin_read_single_register (43)

debug:     bfin: bfin_read_single_register (44)

debug:     bfin: bfin_read_single_register (45)

debug:     bfin: bfin_read_single_register (46)

debug:     bfin: bfin_read_single_register (47)

debug:     bfin: bfin_read_single_register (48)

debug:     bfin: bfin_read_single_register (49)

debug:     bfin: bfin_read_single_register (50)

debug:     bfin: bfin_read_single_register (51)

debug:     bfin: bfin_read_single_register (52)

debug:     bfin: bfin_read_single_register (54)

debug:     bfin: bfin_read_single_register (55)

debug:     bfin: bfin_read_single_register (56)

debug:     bfin: bfin_read_single_register (57)

debug:     bfin: bfin_read_single_register (58)

debug:     bfin: bfin_read_single_register (59)

debug:     bfin: bfin_read_single_register (60)

debug:     bfin: bfin_write_single_register (53, 0xFFA00000)

debug:     bfin: bfin_set_ctrl_thread (0)

debug:     bfin: bfin_resume_from_current (run, 0)

debug:     bfin: [0] core_emulation_return ()

debug:     [0] DBGSTAT [0x004A] <before>

debug:     [0] DBGSTAT [0x004A] <after>

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:    bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:    bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

debug:     bfin: bfin_wait_partial ()

 

 

QuoteReplyEditDelete

 

 

2010-08-09 12:39:34     Re: gdb-proxy bf527 KBCZ reset problem

Mike Frysinger (UNITED STATES)

Message: 92264   

 

i dont think that's how it works, but as long as you've deleted the bogus version, it doesnt really matter and we can focus on the issue

 

looping in bfin_wait_partial() means the target is waiting for an event.  which is to say, this is the normal behavior after connecting with gdb.  what exactly does your gdb output show.

QuoteReplyEditDelete

 

 

2010-08-11 07:25:40     Re: gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92318   

 

We tried to use a pure linux toolchain aka also gdb-proxy, we used the 2010 alpha.

 

line 3 of .gdbinit is the actual load. The emulator is a gnice.

 

Here we get from gdbproxy:

 

Connected to libftdi driver.

IR length: 5

Chain length: 1

Device Id: 00100010011111100000000011001011 (0x227E00CB)

Manufacturer: Analog Devices, Inc. (0x0CB)

Part(0):      BF527 (0x27E0)

Stepping:     2

Filename:     /home/xx/bfin-elf/bin/../share/urjtag/analog/bf527/bf527

warning:   bfin: no board selected, BF527 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy: waiting on TCP port 2000

notice:    bfin-gdbproxy: connected

info:      [0] emulator not ready: DBGSTAT [0x000A]

info:      Resetting ...

bfin-gdbproxy: /gnu/toolchain/urjtag/src/bfin/bfin.c:577:

part_check_emuready: Assertion `emuready' failed.

Aborted

 

And gdb:

Current directory is ~/xx/ GNU gdb 6.6 Copyright (C) 2006 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-linux-gnu --target=bfin-elf"...

0x00000000 in ?? ()

Loading section .text, size 0xb8 lma 0xffa00000 Ignoring packet error, continuing...

/home/xx/.gdbinit:3: Error in sourced command

file:

putpkt: write failed: Broken pipe.

QuoteReplyEditDelete

 

 

2010-08-11 12:18:35     Re: gdb-proxy bf527 KBCZ reset problem

Mike Frysinger (UNITED STATES)

Message: 92329   

 

keep things simple before you try jumping in the deep end.  basic tests to run:

 

run `bfin-gdbproxy bfin` and connect with gdb.  view register content and display L1 memory.

 

run `bfin-gdbproxy bfin --reset` and connect with gdb.  view register content and display L1 memory.

 

what frequency are you using with VDSP ?  use that with gdbproxy too, or slower.  see `bfin-gdbproxy bfin --frequency=xxx` (it's in HZ).

 

also try using the --check-emuready option to see if it makes a difference.  and try --wait-clocks=21.

QuoteReplyEditDelete

 

 

2010-08-12 07:09:00     Re: gdb-proxy bf527 KBCZ reset problem

Thomas Fabricius (DENMARK)

Message: 92372   

 

Dear Mike,

 

We resolved the issue, it is a bit embarrassing. The HW vendor changed the ref clk from 25MHz to 50Mhz! And I guess 1200MHz isn’t good ;-) I will now go back barking a bit on the vendor for not noticing (we were debugging another error on their 25MHz version, when they suggested to use the new version which we thought was “plug and play” compatible, and when that didnt work they pointed on the tool chain).

 

Sorry and thanks

 

Thomas

Attachments

    Outcomes