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.

Communicating with standard io using DSS

Other Parts Discussed in Thread: SYSBIOS

Hello Everyone,

I am using scanf and printf (Standard IO) in my code. When i connect with the debugger to the target, i can see the output of the printf and give an input that is read by scanf using the console in code composer. But what if i want to do the samething using dss javascript ? Where i can get the prints to parse them and send a response that will be read by scanf in the target ?

I had searched and tried several things. At first, thought that RTDXOutputStream and RTDXInputStream may help. But the script crashes when i create a new RTDXOutputStream and give it an instance of RTDXSession and a channel name. It seems that i cannot figure out the channel name default configuration by SysBios.

Simply, How can i interact with the target standard IO in dss like i do it in the console of code composer studio ?

Thanks in advance,

  • Hello Omar,

    Simply, How can i interact with the target standard IO in dss like i do it in the console of code composer studio ?

    DSS doesn't quite have level of support. One alternative is to set a breakpoint where you would like to have your application wait for user input and then have the actual DSS javascript (via Java) query for user input. Then the script can take that input and write the values to the target itself (using DSS memory write APIs)

    You can see this thread for some suggestions on how to get user input to the script.

    https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/161730/interactive-script-with-dss

    Thanks

    ki

  • I already knew several work around solutions. But i just thought that everything that can be done in Code Composer can be done also in DSS without any work around and just with a provided API.

    So in case anyone know an API that does exactly what the code composer console does, please tell me about it.

  • The input support is built into the console in CCS, not DSS. Hence when running from the command-line, that direct support is lost. So basically, there is no direct DSS API to support what you are looking for. You will have to use one of the workarounds.

    ki