Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361839

Summary: Request that SysMin output method be made configurable
Product: [Technology] RTSC Reporter: Scott Gary <sg>
Component: RuntimeAssignee: Dave Russo <d-russo>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: d-russo, dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.