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.

Reading characters with scanf or getchar in ccs console

Other Parts Discussed in Thread: SYSBIOS

Hello,

I've noticed that getchar() waits for user input in ccs console, but the assigned variable (c = getchar()) does not get the value read, but always 0.

I've seen this problem with the mcspi example of pspdrivers_02_20_01_00 where a 'y' or 'Y' is expected to continue. So I set up a new test project where my observation was the folowing: as soon as I use a module in my .cfg file (with xdc.useModule), the result is the one described above.

If I do not write any xdc.useModule statement in my .cfg file, I can read characters from console with getchar().

Is there an explanation for that? My setup is the following:

XDCTools 3.22.3.41

BIOS 6.32.3.43

IPC 1.23.4.36

CCS 5.1 M7

TI814x either on EVM or custom board (behaviour is the same)

I have attached my sampe project for reference

2475.MyGetChar.zip

Any help would be appreciated.

Thanks and best regards,

Rene