ianc at goanna.iinet.net.au
Wed Nov 7 06:26:40 UTC 2018
We are migrating a product from RTEMS4.10 to RTEMS5, and I have come up
with a problem that we have not experienced previously.
We have some code that works before RTEMS mulit-tasking has been started.
This code uses some string functions which are causing the system to
crash (bus error out), and I have worked it out to a call to:
One example function is:
using the newlib 3.0.0 the first few lines of the function are:
snprintf (char *__restrict str,
const char *__restrict fmt, ...)
struct _reent *ptr = _REENT;
The _REENT macro ends up calling:
which ends up returning the thread executing structure:
Since this is before multi-tasking, _Thread_Get_executing() returns
NULL, and this is not valid memory.
So, if I want to support this, do I need to configure:
If I do this will it effect things later?
Or should this be fixed to check whether multi-tasking is running before
checking the currently running thread, we do this in some of our other code?
Goanna Technologies Pty Ltd
More information about the users