[riot-notifications] [RIOT-OS/RIOT] arm7: printf() with float/double not working (#11885)

Gaëtan Harter notifications at github.com
Tue Jul 23 13:53:02 CEST 2019


It may be `unittests` related too. Or float context handling or something.
This does not print correctly:

```diff
diff --git a/tests/unittests/tests-core/tests-core.c b/tests/unittests/tests-core/tests-core.c
index 3551286e5..34eed4d5f 100644
--- a/tests/unittests/tests-core/tests-core.c
+++ b/tests/unittests/tests-core/tests-core.c
@@ -6,10 +6,12 @@
  * directory for more details.
  */

+#include <stdio.h>
 #include "tests-core.h"

 void tests_core(void)
 {
+    printf("Tests-core float %f\n", 3.141592654);
     TESTS_RUN(tests_core_atomic_tests());
     TESTS_RUN(tests_core_bitarithm_tests());
     TESTS_RUN(tests_core_cib_tests());
```

```
USEMODULE=printf_float BOARD=msba2 make --no-print-directory -C tests/unittests/ tests-core  flash term

2019-07-23 13:51:15,831 - INFO # main(): This is RIOT! (Version: 2019.10-devel-109-gb1bab)
2019-07-23 13:51:15,832 - INFO # Tests-core float 156104357234891300905575417519308883293391578287969291970140075052881684524533620118692204698927104.000000
2019-07-23 13:51:15,982 - INFO # .............................................................................................
2019-07-23 13:51:15,983 - INFO # OK (93 tests)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11885#issuecomment-514177665
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190723/206c352d/attachment.htm>


More information about the notifications mailing list