[uClinux-dev] BDM revisited

Bruce Paterson bruce at tele-ip.com
Fri Nov 30 02:06:07 EST 2001


Thomas Andrews wrote:
> 
> Bruce Paterson wrote:
> 
> > occasionally it comes
> > back with "BDM error: Invalid target command". It really does seem to be
> > talking to the target
> > though.
> 
> v. Interesting. I'm having the same problem, but I can load and single-step
> no problem. It took me ages to get the correct .gdbinit68 file though! (see end)

Thanks for that. I have merged part of it with mine.
Unfortunately it hasn't helped with the dowload problem.

> I'm using a genuine P&E BDM - I've been hacking bdm.c and I've found that
> the driver often thinks the processor is not stopped even though it is. I
> think this comes down to reading the freeze line. I'm about to put a logic
> analyzer on it. What BDM are you using ? I was sort of thinking that other
> people make their own BDM's and that perhaps there's a timing difference

No such luck ! I'm using an "open source" BDM cable roughly as specified
on Pavel's
site. It has been absolutely fine with Pavel's drivers. One thing I did
find was that
my old .gdbinit68 file set the bdm_delay to 2, except when it was doing
an actual
file download when it was set to 0.  I have put this into my new init
file just in case
it helps.

> somewhere. It's ages since I programmed a GAL, but I might end up doing that

I ended up programming up a PAL610 since it was easier to use the Altera
tools.
Palasm = MegaYuk!!
Anything will work. I suspect, though, that since I'm having the same
errors the driver is more
likely the culprit. (Note that Pavel's driver has been updated more
recently than the
Coldfire one).
Using Pavel's bdm.h with the patched insight/gdb code doesn't compile
though :-(

> > I can't load files though !!
> > If I try "load afile" in the console window it always comes back with
> > "Error: Not an object file".
> > I get this error for binary, elf and coff format files. I have tried
> > both explicit paths or

> I do remember getting this error, but I'm not sure how I fixed it - sorry.
> Have a look at my init file - maybe all the "directory" statements solved
> it. I seem to recall the error message being a little misleading.

Nope didn't help. I had most of them in my old .gdbinit anyway.
I have got as far as establishing the filename gets passed to loadExec
in remote-m68k-bdm.c, and it fails "bfd_check_format" somehow, but I'm
a bit lost below that. Maybe gdb isn't configured properly ? Using
Insight5.1
may have been my downfall :-)
I might have to compile a native version of gdb to debug gdb !

> When I built the linux kernel, I didn't do a "make linux.bin" - for no
> reason I just did a "make", and I just "load linux".

I've tried loading binary, elf and coff versions. All have the same
error.

One oddity: If I enter in a non-existant filename, and then enter in the
correct one again, I can't get back to "Not an object file" but stay
stuck
on "File doesn't exist". I'm kinda hoping this might ring some bells :-)

> it's probably ok. The only real test is to write a byte to the ram.
> The other thing about Insight is that I can't figure out when it refreshes
> it's take on the registers. Often I close that window and re-open it to make
> sure.

ok. warnings noted. Thanks for that. 

> define tgt
>   #target bdm /dev/icd_bdm0
>   target bdm /dev/bdmidc0
> end

I suspect you may not need this one. I think insight seems to do it
beforehand
anyway.
 
Cheers,
Bruce
-------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify the system
manager.

    /\\\/\\\/\\\    /   /    Bruce Paterson          VK3TJN
   /  \\\ \\\ \\\  /   /     Senior Design Engineer
  /   /\\\/\\\/\\\/   /      87 Peters Ave, Mulgrave, Vic, 3170
 /   /  \\\ \\\ \\\  /       PO Box 4112, Mulgrave, Vic, 3170, AUSTRALIA
/   /    \\\/\\\ \\\/        Ph: +61 3 8561 4232  Fax: +61 3 9560 9055
      Tele-IP Ltd.           Email: bruce at tele-ip.com    Icq: #32015991
                             WWW:   http://www.tele-ip.com
--------------------------------------------------------------------------
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list