Strange bug on EP9302-based custom board

Jay Monkman jtm at
Wed Dec 14 13:41:29 UTC 2005

Fabien CASAS wrote:
> Hi all !
> I'm porting RTEMS to an EP9302(ARM9)-based custom board, starting from
> ARM ports, and I'm stuck on a strange bug.
> I've got a base port that provides a console, a clock driver and some
> board-specific drivers. This base port seems to run fine, except for
> some improvements to be done.
> BUT : when I add a call to a function (e.g. a call to
> rtems_task_wake_after), or when I just add a local variable into a
> function of one of my drivers, the whole executive crashes, before the
> function is called.

Without this driver, does the ticker test run correctly?

> - or it hangs at the Undefined exception vector with a link register
> pointing to the IRQ exception vector.

This is the execption whose handler lives at address 0x00000004? You need to
find out what instruction is causing that.

Set a breakpoint at bsp_pretasking_hook() or some other function that gets
called early on.

Start you application. When you hit the breakpoint, set a new breakpoint at

Continue execution.

When you hit the breakpoint at 0x0000004, the Link Register will have the
address of 2 instructions past the one that caused you to get the exception.

If you are using software breakpoints, you have to stop execution before a
breakpoint on the execption vectors gets hit. Very early in startup, the
addresses of the exception handlers are copied to the exception vectors,
overwriting any software breakpoint you've set. When you stop and restart GDB,
the breakpoint gets re-inserted.

More information about the users mailing list