Debugging basic BSP tasking functionality

Sebastian Huber sebastian.huber at
Wed Apr 17 15:13:37 UTC 2013

On 04/17/2013 04:04 PM, Matthew J Fletcher wrote:
> Hi,
> Yes it the stack pointer out of range, because the current stack pointer
> returned by GCC _builtin_frame_XX in the IDLE thread looks like its actually
> that from the Init() thread.

In a thread dispatch from Init (running and deleted) to idle (heir) the sp in 
the stack check extension must the sp of the Init thread.

> Thinking this through,my target is Thumb, so the C interrupt handler should be
> in a arm file with -mthumb-interwork set on the compile line.

I am not sure if ARM/Thumb interwork works.

> I guess GCC can not auto-magicly know what particular functions are interrupts,
> so should there be some entry/exit functions to save/restore the stack, etc,
> like these...

The interrupt entry/exit code is here:


Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the users mailing list