Hi All
I have been able to build the Netduino Plus 2 firmware revision 4.2.2 with GCC yagarto tool using the wiki instructions (http://wiki.netduino...to-GCC-4-6.ashx), and I have discovered that the double.ToString API is not behaving as expected with this build (see below code snippet).
The DFU firmware file called myfirmware-forsanitycheck.dfu contained in the package provided in the wiki page behave the same and is a god starting point to test the folowing code snippet.
double dValue = 10.20;
Debug.Print("-- value : " + dValue.ToString("F1"));
The expected result should be :
-- value : 10.2
but you get :
-- value : -545128520.00000000000000010
The strange thing is that the official Netduino Plus 2 4.2.2 firmware (
http://forums.netdui...2-firmware-v422) provided by Netduino is behaving correctly (the diffrence is that RealView is used to build that one).
Thanks to this issue report (
http://netmf.codeple...m/workitem/1385) I have identified that in CLR file DeviceCode\pal\tinycrt\tinycrt.cpp at line 221 in function hal_snprintf_double, is the place where the conversion is done. But unfortunately the source code seems correct.
So is anybody could give me some inputs to track down that issue and work on a fix ?
Thanks
- Billounet