How I can use scanf in baremetal project, using "Drivers minimal set" printf is working at 11520 boud.
I'm using KDS v3.2, KSDK v2.0 and FRDM-K64f
Solved! Go to Solution.
Hi,
Can you please refer rtc demo code which includes SCANF usage.
...\SDK_2.0_FRDM-K64F\boards\frdmk64f\driver_examples\rtc
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Shaul,
Regarding to your statement:
>>What I understand now is, creating new project I have to use "Drivers minimal set" because only there <stdio.> "printf" is supported no getc() and putc().
I don't quite understand. Can you please be more specific?
>>For strings and char I have to include "fsl_debug_console.h" and use debug console functions instead <sdtio.h>
according to my test, Yes, I think so.
Jennie
Hello Jennie
Using KSDK v2 to be able to use debug_console you have to create project using "project wizard" that at least will include "Drivers Minimal set" configuration (no Empty).
In this case "printf()" (which is supported by <stdio.h>) statement is working without using
#include "fsl_debug_console.h".
But only printf(), other stdio statemens like scanf(), getc() and putc() doesn’t work.
To get similar function I have to #include "fsl_debug_console.h" and use SCANF(), PUTCHAR() and GETCHAR() equivalent functions.
This is what I wanted to confirm.
Thanks
Shaul
Hi Shaul,
yes, I think so. This is the same testing result as my side.
Normally if I choose SDK, I use SDK defined io functions rather than stdio
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
Can you please refer rtc demo code which includes SCANF usage.
...\SDK_2.0_FRDM-K64F\boards\frdmk64f\driver_examples\rtc
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Jennie Thanks,
My initial mean was not to use "fsl_debug_console".
Can you please confirm my assumption?
What I understand now is, creating new project I have to use "Drivers minimal set" because only there <stdio.> "printf" is supported no getc() and putc().
For strings and char I have to include "fsl_debug_console.h" and use debug console functions instead <sdtio.h>
Shaul