<font size=2 face="sans-serif">I verified Sebastian's suggestion - by
modifying the leon3.cfg file...</font>
<br>
<br><font size=2 face="sans-serif">    diff --git a/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg
b/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg</font>
<br><font size=2 face="sans-serif">    index 58f2f07..30fc3a4
100644</font>
<br><font size=2 face="sans-serif">    --- a/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg</font>
<br><font size=2 face="sans-serif">    +++ b/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg</font>
<br><font size=2 face="sans-serif">    @@ -9,7 +9,8 @@ RTEMS_CPU_MODEL=leon3</font>
<br>
<br><font size=2 face="sans-serif">     #  This contains
the compiler options necessary to select the CPU model</font>
<br><font size=2 face="sans-serif">     #  and (hopefully)
optimize for it.</font>
<br><font size=2 face="sans-serif">    -CPU_CFLAGS = -mcpu=cypress
-msoft-float</font>
<br><font size=2 face="sans-serif">    +CPU_CFLAGS = -mcpu=cypress
-mhard-float</font>
<br>
<br><font size=2 face="sans-serif">...the generated binary of hello.exe
works fine - I went a step further and did a test calculation, too:</font>
<br>
<br><font size=2 face="sans-serif">    diff --git a/testsuites/samples/hello/init.c
b/testsuites/samples/hello/init.c</font>
<br><font size=2 face="sans-serif">    index d8fe450..6ee33f6
100644</font>
<br><font size=2 face="sans-serif">    --- a/testsuites/samples/hello/init.c</font>
<br><font size=2 face="sans-serif">    +++ b/testsuites/samples/hello/init.c</font>
<br><font size=2 face="sans-serif">    @@ -27,8 +27,13 @@ rtems_task
Init(</font>
<br><font size=2 face="sans-serif">       rtems_task_argument
ignored</font>
<br><font size=2 face="sans-serif">     )</font>
<br><font size=2 face="sans-serif">     {</font>
<br><font size=2 face="sans-serif">    +  int i = 0;</font>
<br><font size=2 face="sans-serif">    +  float a=3.14159f,
b=1.0f;</font>
<br><font size=2 face="sans-serif">    +</font>
<br><font size=2 face="sans-serif">       rtems_test_begin();</font>
<br><font size=2 face="sans-serif">    -  printf( "Hello
World\n" );</font>
<br><font size=2 face="sans-serif">    +  for (i=0; i<10;
i++)</font>
<br><font size=2 face="sans-serif">    +      b*=a;</font>
<br><font size=2 face="sans-serif">    +  printf( "Hello
World, %f\n", b );</font>
<br><font size=2 face="sans-serif">       rtems_test_end();</font>
<br><font size=2 face="sans-serif">       exit( 0 );</font>
<br><font size=2 face="sans-serif">     }</font>
<br>
<br><font size=2 face="sans-serif">...which worked fine:</font>
<br>
<br><font size=2 face="sans-serif">    (gdb) tar extended-remote
... ( to grmon)</font>
<br><font size=2 face="sans-serif">    (gdb) c</font>
<br><font size=2 face="sans-serif">    Continuing.</font>
<br>
<br><font size=2 face="sans-serif">    *** BEGIN OF TEST HELLO
WORLD ***</font>
<br><font size=2 face="sans-serif">    Hello World, 1.000000</font>
<br><font size=2 face="sans-serif">    *** END OF TEST HELLO
WORLD ***</font>
<br>
<br><font size=2 face="sans-serif">...and I made sure that FPU instructions
are inside:</font>
<br>
<br><font size=2 face="sans-serif">      for (i=0; i<10;
i++)</font>
<br><font size=2 face="sans-serif">      28:   82 80
7f ff     addcc  %g1, -1, %g1</font>
<br><font size=2 face="sans-serif">      2c:   12 bf
ff ff     bne  28 <Init+0x28></font>
<br><font size=2 face="sans-serif">      30:   91 a2
09 29     fmuls  %f8, %f9, %f8</font>
<br><font size=2 face="sans-serif">          b*=a;</font>
<br><font size=2 face="sans-serif">      printf( "Hello
World, %f\n", b );</font>
<br><font size=2 face="sans-serif">      34:   91 a0
19 28     fstod  %f8, %f8</font>
<br>
<br><font size=2 face="sans-serif">So, executive summary....  It seems
that the default compilation settings of the Leon3 BSP forbid "real
FPU" work. </font>
<br><font size=2 face="sans-serif">If one needs to work in native (non-emulated)
FPU mode, then the leon3.cfg must be patched as I showed above. </font>
<br>
<br><font size=2 face="sans-serif">In the long run, as Sebastian indicated,
a leon3fp (and a corresponding leon2fp, I imagine) </font>
<br><font size=2 face="sans-serif">should ideally be added as new BSP targets
- and the FPU page</font>
<br><font size=2 face="sans-serif">(</font><a href=https://devel.rtems.org/wiki/TBR/UserManual/Floating_Point_Support><font size=2 color=blue face="sans-serif">https://devel.rtems.org/wiki/TBR/UserManual/Floating_Point_Support</font></a><font size=2 face="sans-serif">)
should probably </font>
<br><font size=2 face="sans-serif">be updated to indicate this.</font>
<br>
<br><font size=2 face="sans-serif">Thanks to everyone for their help,</font>
<br><font size=2 face="sans-serif">Thanassis.</font>
<br>
<br>
<br><font size=2 face="sans-serif"><b>European Space Agency (via HE Space)</b></font>
<br><font size=2 color=#000080 face="sans-serif">Thanassis Tsiodras</font>
<br><font size=2 face="sans-serif">Real-time Embedded Software Engineer
</font>
<br><font size=2 face="sans-serif">System, Software and Technology Department</font>
<br>
<br><font size=2 face="sans-serif"><b>ESTEC</b></font>
<br><font size=2 face="sans-serif">Keplerlaan 1, PO Box 299</font>
<br><font size=2 face="sans-serif">NL-2200 AG Noordwijk, The Netherlands</font>
<br><font size=2 face="sans-serif">Athanasios.Tsiodras@esa.int | </font><a href=www.esa.int><font size=2 color=blue face="sans-serif">www.esa.int</font></a>
<br><font size=2 face="sans-serif">T +31 71 565 5332</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">"Sebastian Huber"
<sebastian.huber@embedded-brains.de></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">"RTEMS List"
<users@rtems.org></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc:      
 </font><font size=1 face="sans-serif">software@gaisler.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">07/02/2016 07:40</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">Re: Crash under
sparc/rtems-4.11 when compiling with FPU</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:    
   </font><font size=1 face="sans-serif">"users"
<users-bounces@rtems.org></font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hello Athanasios,<br>
<br>
it was always a miracle to me how you are supposed to use the leon2/leon3
BSPs with a FPU. If you want to use the FPU, then the BSP must be built
with the -mhard-float option, otherwise the FPU support is not enabled
in the operating system support. In addition the application configuration
must be compiled with exactly the same compiler flags as the BSP, otherwise
it will generate a corrupt configuration.<br>
<br>
I think we need leon2fp and leon3fp BSPs, which use -mhard-float.<br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : +49 89 189 47 41-16<br>
Fax     : +49 89 189 47 41-09<br>
E-Mail  : sebastian.huber at embedded-brains.de<br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
_______________________________________________<br>
users mailing list<br>
users@rtems.org<br>
</font></tt><a href=http://lists.rtems.org/mailman/listinfo/users><tt><font size=2>http://lists.rtems.org/mailman/listinfo/users</font></tt></a>
<br><PRE>This message and any attachments are intended for the use of the addressee or addressees only.
The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its
content is not permitted.
If you received this message in error, please notify the sender and delete it from your system.
Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.
</PRE>