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

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


Note, it currently is the only `unittests`  remaining failing test:

```
2019-07-23 13:32:21,764 - INFO # main(): This is RIOT! (Version: 2019.10-devel-109-gb1bab)
2019-07-23 13:32:21,767 - INFO # .........................................................................................................................................................................................................
2019-07-23 13:32:21,768 - INFO # pkt_tests.sfprintf_float (tests/unittests/tests-printf_float/tests-printf_float.c 40) exp "2016.034900" was "-0.000000"
2019-07-23 13:33:25,269 - INFO # ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
2019-07-23 13:33:25,270 - INFO # run 945 failures 1
```

And when changing:

```diff
diff --git a/core/kernel_init.c b/core/kernel_init.c
index 1b153b38a..bb61c5dd9 100644
--- a/core/kernel_init.c
+++ b/core/kernel_init.c
@@ -74,7 +74,7 @@ static void *idle_thread(void *arg)
 const char *main_name = "main";
 const char *idle_name = "idle";

-static char main_stack[THREAD_STACKSIZE_MAIN];
+static char main_stack[THREAD_STACKSIZE_MAIN] = {0xff};
 static char idle_stack[THREAD_STACKSIZE_IDLE];

 void kernel_init(void)
```
it works.


Some other `printf` cases work:

```
ssh -t vaduz.imp.fu-berlin.de 'source /srv/ilab-builds/workspace/workspace.rc && BOARD=msba2 QUIET=0 make --no-print-directory -C /srv/ilab-builds/boards term'
/srv/ilab-builds/boards/RIOT/dist/tools/pyterm/pyterm -tg -p "/dev/riot/ttyMSBA2"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-07-23 13:44:07,605 - INFO # Connect to serial port /dev/riot/ttyMSBA2
Welcome to pyterm!
Type '/exit' to exit.
2019-07-23 13:44:08,609 - INFO # main(): This is RIOT! (Version: 2019.10-devel-109-gb1bab)
2019-07-23 13:44:08,609 - INFO # Hello World!
2019-07-23 13:44:08,610 - INFO # You are running RIOT on a(n) msba2 board.
2019-07-23 13:44:08,610 - INFO # This board features a(n) lpc2387 MCU.
2019-07-23 13:44:08,611 - INFO # What is the approximate value of Pi: 3.141593
2019-07-23 13:44:08,611 - INFO # What is the float answer: 42.000000
```

-- 
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-514175216
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190723/f8a73ca1/attachment.htm>


More information about the notifications mailing list