Unexpected trap(0 x4) ... fp disabled

Jiri Gaisler jiri at gaisler.com
Wed Jun 23 18:39:07 UTC 2010

Maybe you could post the disassembly around address 0x40006710
so we can see which sequence has been generated by the compiler.

Also, are you using 4.10 from rtems.org or the slightly patched
one from gaisler.com ..?


Gardner, Michael T wrote:
> I am running a test program on a leon3 using rtems 4.10.  When the
> program executes a standard “read()” call I see the following error
> message and RTEMS and the program terminate abnormally:
> Unexpected trap (0x 4) at address
> 0x40006710                                           
> fp disabled
> The offending source line of code is (all arguments are valid):
> *bytes_read = read(fd, the_packet, max_read_size);
> I have tried compiling my source code both with and without the
> –msoft-float compiler flag but it crashes each time.  There are some
> external libraries that are not compiled with the –msoft-float option
> that are linked into the code.  Could this be contributing to the
> problem?  I am using the POSIX API with RTEMS and therefore believe that
> all of my threads are floating point threads. (ref: RTEMS Wiki –
> Floating Point Support).
> I have looked at previous posts and the RTEMS Wiki for answers regarding
> this issue, but am still somewhat confused about what I need to do (I’m
> an RTEMS newbie).  In the Wiki there is a section entitled “Escaping
> Disaster” in which several options are provided.  Our application needs
> to use the hardware FPU and the second option seems to be the option
> that is most applicable.  Does anyone have experience with implementing
> this option?  What lessons learned can be passed on to make this as
> painless as possible?
> Michael T. Gardner
> Sandia National Labs
> mtgardn at sandia.gov
> 505-844-1299
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users

More information about the users mailing list