0 Replies Latest reply on Feb 9, 2017 5:40 PM by webmstreric

    how to print diagnostics from the bootloader

    webmstreric

      In WICED 4.1 Cypress added the mini_printf() module that should allow you to print diagnostics from the bootloader, but when I tried it it didn't work.

       

      In the ota2_bootloader.c Cypress has: #include "mini_printf.h", which didn't work for me. There is also a comment in this file saying:

      /* If you use mini_printf() in the bootloader. the console probably won't work with your Application */

      Once I got mini_printf() to work in the bootloader, I had no problems getting the console to work in the Application, so I suspect Cypress never got this working properly.

       

      I did 3 things to get mini_printf() to work in bootloader.c:

       

      1) Enabled stdio by commenting out "GLOBAL_DEFINES += WICED_DISABLE_STDIO" in bootloader.mk

       

      2) Added the mini_printf component with "$(NAME)_COMPONENTS += utilities/mini_printf" in bootloader.mk

       

      3) In bootloader.c and any other *.c files containing calls to mini_printf() I added:

       

      #include "../../../libraries/utilities/mini_printf/mini_printf.h"

       

      NOTE: Details on what formatting characters are allowed in calls to mini_printf() are contained in mini_printf.h