This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ICD BDM, gdb, and error 613 on 68331


Hi,

I've used AMC and HP BDM probes with 68340 and 68360, but have no experience with the
68331. I've only used the MRI 68k toolchains, so cannot help with GNU cross-compiler
questions. However, I hope this information helps:

1. I found an interesting Engineering Bulletin at Motorola which describes the error
messages which Aaron reported. Maybe it will be of some use to the others as well.

"Startup Problems When Using a Software Background Mode Debugger and Booting from RAM
or an Empty ROM Socket." Download the PDF at:
http://mot-sps.com/mcu/documentation/pdf/eb305.pdf

Other documentation can be found starting at
http://mcu.motsps.com/documentation/index.html.

I think the advice in the bulletin applies to all 683xxx processors using BDM - at
least I've seen similar problems using the '340 and '360 if I didn't have the BDM
intialize the registers properly after a reset.

2. I don't think the 68332 uses the same memory mapped register set as the 68331.
According to the 68332 user's manual, you shouldn't write nor read the register at
0xFFFA00. (I think I read this correctly...)

3. A rhetorical question: why would you write 0x62ff to SIMCR of the 68331? Seems
0x60CF is more appropriate (clear SHEN[1:0] to disable both external cycles and
external arbitration at the beginning of a BDM debug session.


wzielins@kki.net.pl wrote:

> Hi,
>
> I have just read your mail. I'm working now on setting up the environment
> for developing 68332 system and I have the same problems. I'm struggling
> with that for about month. The only difference is that I use PD cable. Under
> DOS everything works fine, also bdmv ported to Linux works great.
> But my bdm.o module with gdb works erroneous in the same manner you
> described. Even the address is the same (0xfffa00). I tried to initialize
> it through file cpu32init. I analyzed logs of gdb (gdb-bdm.log) and bdm.o module and
>
> the problem is in verifying read operation after write operation (see bdmlib.c file
> in gdb bdm patch). I have very simple logic analyzer (it is almost toy, only 240
> words of trace @20MHz). I modified a bit files from gdb-bdm-4.17 patch
> and now I'm debugging them separarely from gdb. The writing operations performed
> by bdm.o are correct, but verification fails and it is ok (as I observed on
> my analyzer). So it seems that problem lies within bdm.o or it is a kind
> of interference with other kernel modules. I removed from kernel any stuff
> related to the parallel port, but it still doesn't work.
> Well, I'm still working on this problem, if you have any suggestions, I will be
> really
> grateful.
>
> If you are interested, I will send you additional informations, logs, and so on.
>
> Cheers,
> Wojtek
>
> Quality Quorum wrote:
>
> > On Thu, 11 Nov 1999, Aaron J. Grier wrote:
> >
> > > Having spent two weeks struggling with a badly wired BDM interface, my
> > > company finally sprang for a couple official motorola-blessed ICD BDM
> > > interfaces.  The DOS software works fine.  I was able to find
> > > linux-specific device driver and patches to gdb 4.18 at
> > > http://cmp.felk.cvut.cz/~pisa/m683xx/bdm_driver.html for the ICD
> > > interface, but it doesn't work quite right:
> > >
> > > (gdb) bdm_reset
> > > (gdb) x 0
> > > 0x0:    0xffffffff
> > > [ so far, so good.  Let's start poking at the SIM: ]
> > > (gdb) set *(short *)0xfffa00 = 0x62ff
> > > Error accessing memory address 0xfffa00: Unknown error 613.
> > > [ here's where all hell breaks loose... ]
> > > (gdb) x 0
> > > 0x0:    Error accessing memory address 0x0: Unknown error 613.
> > > [ and here every memory access is wedged with the same error until the
> > >   next bdm_reset ]
> > >
> > > I can run the DOS P&E ICD32 program (as shipped with the ICD BDM
> > > interface) under dosemu and everything works as expected.  Until the SIM
> > > is configured under ICD32, I get the message "BERR Terminated bus
> > > cycle - Debugger Supplied DSACK" but I can still program the SIM and do
> > > things like initializing my chip selects, and get on with running
> > > actual code.  I can even initialize chip selects under ICD32, and then
> > > load and run under gdb under linux, but this is a real pain in the ass.
> > >
> > > Before I smack myself against the wall of code that is the gdb BDM
> > > backend, is anybody else using the ICD BDM interface with BDM under
> > > linux?  (What patches are you using?)  Is anybody else having the same
> > > problems?  Has anybody solved these problems?  (how?)  Cygnus -- can you
> > > sell me a solution?  (how much will it cost?)
> >
> > I am using it. I have heavily modified original Gunter Magin's patches.
> > I am using gdb 4.17 to control 68360. I can dig my patches if necessary,
> > however, I suspect it may be something else:
> >
> > It is quite possible that your stuff is actually working fine and
> > the problem is that you did not initialize all necessary (and there are
> > a lot of them)peripheral registers corectly.
> >
> > >
> > > --
> > >   Aaron J. Grier   |   Frye Electronics, Tigard, OR   |   aaron@frye.com
> > >   "The simplistic anthropomorphism which asserts that source code has a
> > >    life separate from its creator or maintainer is the product of one
> > >    too many viewings of Tron."  -- paraphrasing of anonymous post on /.
> > >
> > > ------
> > > Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> > > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
> > >
> >
> > Thanks,
> >
> > Aleksey
> >
> > ------
> > Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
> >
> > --
>
> --
> Najwieksza baza ogloszen motoryzacyjnych w Polsce!!!
> Wejdz na: www.auto-moto.pl
>
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]