NXP_Kinetis_Bootloader_2_0_0 debug_printf

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NXP_Kinetis_Bootloader_2_0_0 debug_printf

1,339 Views
张华荣
Contributor II

Hi,

I found the debug_printf function in NXP_Kinetis_Bootloader_2_0_0.

but the function do not put char to a uart,and i can not found the terminal uart init function.

 

static inline void debug_printf(const char *format, ...)
{
va_list args;
va_start(args, format);
vprintf(format, args);
// Temporarily disable MISRA rule 14.2
#if defined(__ICCARM__)
#pragma diag_suppress = Pm049
#endif
va_end(args);
#if defined(__ICCARM__)
#pragma diag_default = Pm049
#endif
}

Labels (1)
3 Replies

925 Views
ramboyang
NXP Employee
NXP Employee

This debug_printf will be removed from Kinetis Bootloader in the future, please do not try to use it in your application.

0 Kudos
Reply

925 Views
collinmoore
Contributor II

Hi, I am using the Kinetis v2.0.0 bootloader (with KDS) in 2018, and debug_printf is still used in there. I cannot find out where the output is routed to. I would like to use semihosting with a handler for running standalone, like most NXP example projects do.

I like the configurability of interfaces (I2C, UART, SPI) for bootloading, but I can't figure out how to choose a UART or semihosting for debug_printf().

0 Kudos
Reply

925 Views
F50SC
Contributor III

Hi Fan

Can please you share how to get printf working in the bootloader?