MLECO-1948: Fix for SysTick init and GNU's stdout

The counter val could have been 0 when read the first time
quickly after the init function. The init function will now
wait for the SysTick counter to start before returning.

Also included are some minor changes to get around  GNU's
file stream implementation being line buffered.

Change-Id: I8d51fef5d85f1261a6a5710608349d7ecc19ad62
diff --git a/source/application/hal/platforms/bare-metal/bsp/cmsis-device/irqs.c b/source/application/hal/platforms/bare-metal/bsp/cmsis-device/irqs.c
index 7c9f4b8..7d8aa06 100644
--- a/source/application/hal/platforms/bare-metal/bsp/cmsis-device/irqs.c
+++ b/source/application/hal/platforms/bare-metal/bsp/cmsis-device/irqs.c
@@ -71,7 +71,8 @@
 
 #define DEFAULT_HANDLER_CALL(type)              \
     do {                                        \
-        printf("\n%s caught by function %s\n",  \
+        printf("\n");                           \
+        printf("%s caught by function %s\n",    \
              type, __FUNCTION__);               \
         DefaultHandler();                       \
     } while (0)
@@ -238,6 +239,11 @@
     /* Enable interrupt again. */
     NVIC_EnableIRQ(SysTick_IRQn);
 
+    /* Wait for SysTick to kick off */
+    while (!err && !SysTick->VAL) {
+        __NOP();
+    }
+
     return err;
 }