Exists a user function executed before C++ class object initialization?

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Wed Apr 26 09:06:17 UTC 2017

> -----Original Message-----
> From: Joel Sherrill [mailto:joel at rtems.org]
> Sent: Tuesday, April 25, 2017 3:15 PM
> To: Sommer, Jan
> Cc: rtems-users at rtems.org
> Subject: Re: Exists a user function executed before C++ class object
> initialization?
> Another alternative is to statically configure a user extension that sets this
> during the begin hook. Configure that extension statically. I think this would
> work portably from an order of execution view point.

Using the user extension did the trick. We use RTEMS 4.10.2 from Gaisler and are reluctant to change and recompile the BSP.
For some reason adding it as a task begin hook caused the leon to hang on a simple load instruction when executing the hook sometimes (it even lost the debug connection to GRMON). I haven't had the time to investigate too much, but I saw the stack checker pattern value (IIRC 0xDEADBEEF?) in some registers upon entering the begin hook function. I am not sure if that is really a sign of a stack corruption or if the pattern was simply left in the global register from writing it right before. 

Anyhow, I now set the fsr bit in the taskCreateHook.  This way the fsr setting will simply be inherited during task creation. No hangs so far and the bit is set in all tasks.

Thanks you for the hint Joel.

Best regards,


> 	Best regards
> 	   Jan
> 	Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
> 	German Aerospace Center
> 	Simulation and Software Technology | Software for Space Systems and
> Interactive Visualization | Lilienthalplatz 7 | 38108 Braunschweig | Germany
> 	Jan Sommer
> 	Telephone +49 531 295-2494 <tel:%2B49%20531%20295-2494>  |
> Telefax 0531 295-2767 | jan.sommer at dlr.de
> 	DLR.de/SC
> 	_______________________________________________
> 	users mailing list
> 	users at rtems.org
> 	http://lists.rtems.org/mailman/listinfo/users
> <http://lists.rtems.org/mailman/listinfo/users>

More information about the users mailing list