[En-Nut-Discussion] NutThreadRemoveQueue clears runQueue to NULL

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Aug 20 22:32:49 CEST 2013


Hi Philip,

> I've been tracking down a very annoying bug in some Ethernut project
> during the past days. The bug caused the processor (Cortex-M3, LM3S9D90)
> to generate a memory fault because it tried to execute data which is
> marked as XN (execute never). 

Have you tried out my enhanced CM3 fault handlers that print out the
register dump using the debug macro? I introduced them in trunk r5254.

For the LMxxx CPUs you would have to add a configurator option and a
debug macro. See my changes in r5254 as an example.

It would be very helpfull to see this dump.

Very likely the stack pointer won't show the real stack location and
other registers won't too. But the dump of the mentioned exception
handler will show further registers (fault reason and fault address
etc.) which may help to find the real location, that triggered the bug.

I'm quite sure the real problem is not located in
NutThreadRemoveQueue() but is a overwritten stack.

Bye,

Ole

-- 
kernel concepts GmbH            Tel: +49-271-771091-14
Sieghuetter Hauptweg 48         Mob: +49-177-7420433
D-57072 Siegen
http://www.embedded-it.de
http://www.kernelconcepts.de


More information about the En-Nut-Discussion mailing list