I've looked online for more information on this, but have come up short. I'm interested because every time I use PEx, as soon as I add MQX this component gets added and it has to be configured. Until now, I've just selected a random UART and configured it to make the errors go away, but now I actually need to use one of the UARTs and want to understand what fsl_debug_console is all about.
I tried to figure it out by temporarily fixing the PEx errors, generating the code, and then searching for references to fsl_uart* and DbgCs1. The generated code files are empty.
So what is this actually used for? I'd like to remove it if possible, but I recall reading a post from another user here that had some execution problems when the files were removed from his project.
Solved! Go to Solution.
Hi Dave,
Short answer is fsl_debug_console() is reduced functionality IO calls in source code for replacing bulky library calls printf/scantf/putchar/getchar. The fsl_debug_console.h has following:
int debug_printf(const char *fmt_s, ...);
int debug_putchar(int ch);
int debug_scanf(const char *fmt_ptr, ...);
int debug_getchar(void);
So once you configure the Component for a particular UARTx, then the above function calls will use that UARTx.
ex: debug_printf("\nHello World");
unsigned char single_char=1;
debug_printf("%d", single_char);
Slightly old (but not too old) document to show how it is configured into a KSD/KSDK/PE/MQX project:
How To: Create an MQX RTOS for KSDK project with Processor Expert in Kinetis Design Studio IDE
Regards,
David
Hi Dave,
Short answer is fsl_debug_console() is reduced functionality IO calls in source code for replacing bulky library calls printf/scantf/putchar/getchar. The fsl_debug_console.h has following:
int debug_printf(const char *fmt_s, ...);
int debug_putchar(int ch);
int debug_scanf(const char *fmt_ptr, ...);
int debug_getchar(void);
So once you configure the Component for a particular UARTx, then the above function calls will use that UARTx.
ex: debug_printf("\nHello World");
unsigned char single_char=1;
debug_printf("%d", single_char);
Slightly old (but not too old) document to show how it is configured into a KSD/KSDK/PE/MQX project:
How To: Create an MQX RTOS for KSDK project with Processor Expert in Kinetis Design Studio IDE
Regards,
David
Thanks, David! I had read that post before, but had already forgotten some of the information there. :smileyhappy: