I'd like to implement JTAG terminal. I have printf() messages in CCS CIO console but calling getchar() always return -1.
Can CIO console return input from user back to MCU or it is for STD output only?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I'd like to implement JTAG terminal. I have printf() messages in CCS CIO console but calling getchar() always return -1.
Can CIO console return input from user back to MCU or it is for STD output only?
Hi Evgeny Habinsky,
I don't believe this is possible, because I don't think stdin is defined by default. If you want to create an interactive terminal with the PC I would suggest using the back channel UART. This example will get you started:
Regards,
Evan
I have printf() messages in CCS CIO console but calling getchar() always return -1.
Is your project using the TI or GCC compiler?
In CCS/MSP430F5529: Using scanf for user input in an embedded program found that with the GCC compiler runtime library functions to read stdin were a stub which returned -1. The example in that project had code to allow stdin to be used with the GCC compiler.
stdin should work with the TI compiler, but if getchar() always returns -1 try increasing the heap size.
**Attention** This is a public forum