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.

System_printf to use telent (OMAPL138) CCS5.5

Other Parts Discussed in Thread: OMAPL138

Everything i have found on re-routing the System_printf stuff to ethernet seem complicated.

I am hoping somebody can point me to a nice clean way to get the characters to go out a nice telnet session.

I found the NDK_vsprintf stuff in the console code (inside the ConPrintf)  I could almost make a simple MACRO to replace the System_printf with ConPrintf.

What I am missing is this part,  I would like to run a telnet session into the OMAPL138 (That part is working great, already running commands and such accross it) run a command the basicaly says "Start squirting all your System_printf down this connection".

One of the issues I am thinking is that I would also get all the Log_info stuff, Loading information, etc.  I am thinking I need some help with the UIA Transport layer.

I did find the Tutorials, but they basically say load this example and run it.  Need some more information, plus we are on custom hardware so I dont think thoes examples would work.

Thanks for your time...

  • Mike,

    There are several ways to do this.

    1. You can use add_device() to route the printf output. Here is a snippet from an example. It uses UART, but you should get the gist. You'll have to replace the UARTUtils_xxx calls with ones that write out accordingly. Then use SysStd (which uses printf)

        add_device("UART", _MSA, UARTUtils_deviceopen,
                   UARTUtils_deviceclose, UARTUtils_deviceread,
                   UARTUtils_devicewrite, UARTUtils_devicelseek,
                   UARTUtils_deviceunlink, UARTUtils_devicerename);

        /* Open UART0 for writing to stdout and set buffer */
        freopen("UART:0", "w", stdout);
        setvbuf(stdout, NULL, _IOLBF, 128);

        /* Open UART0 for reading from stdin and set buffer */
        freopen("UART:0", "r", stdin);
        setvbuf(stdin, NULL, _IOLBF, 128);


    2. You can use SysCallback and plug in the output function with whatever you want.

        var SysCallback= xdc.useModule('xdc.runtime.SysCallback');
        System.SupportProxy = SysCallback;

    Todd