m68k/efi332 pb in boot_card() in flash

Aaron J. Grier aaron at frye.com
Thu May 22 22:39:20 UTC 2003


On Thu, May 22, 2003 at 10:04:36PM +0200, busy.lab at free.fr wrote:

> When in flash, it looks like I don't go beyond the line:
> bsp_isr_level = rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table );
> ...in boot_card(). I don't even seem to execute any C line of code
> into rtems_initialize_executive_early.

[...]

> gdb/bdm suggestion to ease flash code debugging are sure welcomed, too :)

a brute force method is to put a breakpoint instruction right before the
line where you know you're running off into the weeds:

asm volatile ("bkpt");

note that gdb (maybe the bdm driver) isn't smart enough to skip over a
fixed breakpoint instruction, so when you're knocked into the debugger,
you'll need to

(gdb) set $pc = $pc + 2

before you can start stepping instructions.  also note that all you can
do is step individual instructions; in order to step by lines of code,
gdb needs to be able to write breakpoints, and in this case you can't.

a more general-case solution for flash debugging requires external
hardware to set breakpoints.  we're running into "works in RAM, not in
Flash" situations with our 68331 target right now, and considering
putting in a souped-up CPLD which can watch the bus and trigger a
breakpoint interrupt.  a poor-man's hardware debugger.  ;)

-- 
  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron at frye.com



More information about the users mailing list