<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>What optimization options are you using? Some options (off the top of my head -O3) sometimes use floating point registers when passing parameters. If that's so, use -O2</div>

<div><br></div><div><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; font-size: small; ">--</span></div></span>Aitor<br>
<br><br><div class="gmail_quote">On Wed, Jun 23, 2010 at 7:36 PM, Eric Norum <span dir="ltr"><<a href="mailto:wenorum@lbl.gov">wenorum@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="word-wrap:break-word">1) Floating point exceptions on many architectures can be fairly imprecise.   Could the offending code be back a line or two?<div>2) There's always the possibility that a runaway pointer or bad array index has resulting in your code being mangled.   Can you use a debugger to check that the instructions which you expect to be around that address are indeed still there?</div>

<div><div><div></div><div class="h5"><br><div><div>On Jun 23, 2010, at 10:07 AM, Gardner, Michael T wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div>

<font face="Calibri, sans-serif" size="2"><div>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:</div>

<div style="text-indent:36pt">Unexpected trap (0x 4) at address 0x40006710                                           </div><div style="text-indent:36pt">fp disabled</div><div style="text-indent:36pt"> </div><div>The offending source line of code is (all arguments are valid):</div>

<div style="text-indent:36pt">*bytes_read = read(fd, the_packet, max_read_size);</div><div> </div><div>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).</div>

<div> </div><div>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?</div>

<div> </div><div><font face="Arial, sans-serif" size="2">Michael T. Gardner<font face="Calibri, sans-serif" size="2"><span> </span><br></font>Sandia National Labs<font face="Calibri, sans-serif" size="2"><span> </span><br>

</font><a href="mailto:mtgardn@sandia.gov" target="_blank">mtgardn@sandia.gov</a><font face="Calibri, sans-serif" size="2"><span> </span><br></font>505-844-1299<font face="Calibri, sans-serif" size="2"></font></font></div>

</font></div></span></blockquote></div><br></div></div><div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>

-- <br>Eric Norum<br><a href="mailto:wenorum@lbl.gov" target="_blank">wenorum@lbl.gov</a></div></span>
</div>
<br></div></div><br>_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
<br></blockquote></div><br>