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.

Compiler/TMS320F28379D: stdin not supported ???

Part Number: TMS320F28379D

Tool/software: TI C/C++ Compiler

After having no luck getting stdin to operate with the SCI so I did a lot of searching and have found out that stdout is supported but stdin is not.

Is this the case? Support for one but not the other? Whats up with that?

What is the best work around for this situation? I need the typical terminal services provided by stdin.

I am not looking forward to writing them myself.

Thanks, Dave

  • What files are you using for stdout? The sci_io files from the launchxl_f28379d demo project? There are some uartstdio files in f2837xd/common/deprecated/utils/. I'm not sure they're any more complete than sci_io, but they may help.

    Whitney
  • I am not using files for I/O. I have directed the stdin & out to the SCI.

    I have given up trying to get stdin through the SCI serial port.


    As far as the stdout re-direct - It works no problem using printf for output "ALMOST". Turns out that if I try to use printf with floating point numbers it just hangs and my project hardware goes nuts. So no go with floating point.

    No problem with integers with an exception to that. I will be using integer math with an implied decimal point since printf does not work with floats. It should and the documents says it can but I cant make it work. I specifically am using a %1.3u format specifier but the output does not include the decimal point as it should. It seems to just ignore the precision specifiers.

    I have the " --printf_support=full " switch in the compiler C2000 compiler flags.

    Not sure what else to do at this point. It looks to me that the TI implementation of the printf function is incomplete. I never have had these issues using a plethora of MCU's by others that I have used throughout the decades.

    I will look at the deprecated folder and see if there is anything I can use.

    Do you know if the printf function works correctly? Its usually an "all or nothing" situation. It works or it does not. Its seems to be half and half for me. Maybe not even half.

    Any insight is appreciated.

    Dave
  • FYI - I have written my own STDIN services so no need to have that part working.
  • David

    I apologize for the delayed response. Have you made any progress?
    The main thing I can recommend (with my own limited experience using printf) is that you need a lot of stack space allocated. Try allocated at least 0x1000 or maybe 0x1500. I was seeing freezing for float until I allocated enough stack, then it worked as expected.

    Best regards
    Chris
  • Adding to Chris's comment, there are some tips and debug steps for printf documented here:

    software-dl.ti.com/.../sdto_cgt_tips_for_using_printf.html

    Best Regards
    Lori
  • David,

    I wanted to check and see if this thread can be closed?  If yes, please click on the verified answer button.  If not, please let us know the status of the issue. 

    Thank you

    Lori