[U-Boot-Users] start.S for mpc85xx and debug via BDI2000

Kylo Ginsberg
2005-05-25T14:12:15Z

On 5/25/05, Armand Ciejak <armand.ciejak@free.fr> wrote:
> I'm having problem in debugging U-boot for a MPC8540 processor.
> I'm debugging the very first instructions with the BDI2000. The system
> crash at 2 places in start.S:
>
> 1- when clearing debug registers
> 2- when setting up interrupt vectors

I'm assuming you mean "the system crashes if I set a breakpoint at
...". The 85xx is a real pain in this regard, because it wants to
fetch andexecute the debug exception vector first thing, so BDM
debugging only works if the debug exception is enabled and its vector
is fetchable. So the two points you list below: 1) disable debug
exceptions 2) overwrite the base address for exceptions.

I just work around this by using TI to step through this very early code.

Also, btw, you'll encounter a similar problem when debugging early
linux startup b/c u-boot doesn't currently relocate exception vectors
to ram. I posted a u-boot patch for this issue a month or so back;
you might want to google for that.

Cheers,
Kylo