Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361839 - Request that SysMin output method be made configurable
Summary: Request that SysMin output method be made configurable
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Runtime (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dave Russo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 13:44 EDT by Scott Gary CLA
Modified: 2011-11-29 14:20 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Gary CLA 2011-10-24 13:44:57 EDT
Currently SysMin_output__I() will call HOSTwrite() when the program was built with TI tools, and will call fwrite() otherwise:

Void xdc_runtime_SysMin_output__I(Char *buf, UInt size)
{
#ifdef __ti__
    Int printCount;

    while (size != 0) {
        printCount = HOSTwrite(1, buf, size);
        if ((printCount <= 0) || (printCount > size)) {
            break;  /* ensure we never get stuck in an infinite loop */
        }
        size -= printCount;
        buf = buf + printCount;
    }
#else
    fwrite(buf, 1, size, stdout);
#endif
}
 
Request that this output behavior be made configurable, and not be based entirely upon which tool chain is used to build the program.  For example, if the program is built with GCC and run on CCS, a similar HOSTwrite() function could be used for simple console output, without needing to use STDIO, and incurring its overhead.