Hi,
I am working on a bare board project for TWR-K60 board. Console IO component is added from the Processor Expert.When I use scanf to read a string, I am missing the first character in the string. But with gets() I am able to read string without any issues. What could be the possible issue ?
Source code is as simple as
printf("Enter a String"); | |
scanf("%s", str); | |
printf("\nString : %s", str); |
Anybody had such a problem before ?
Best regards,
Renjith
you use processor expert. ConsloeIO component is CPU External Devices-Display This component generates low-level methods for redirecting console I/O to the selected UART. These methods are typically used by printf()/scanf() methods. With Consloe component, printf and scanf are usable. If you don’t use prinf or scanf, you needn't consoleIO component. please refer the demo code under ..\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K21D50M\Serial if the demo code can't help, please post your project here. we will check. thanks!