All of my System_printf and printf calls work when I'm connected to CCS, but the application does not work when disconnected from CCS. Is this related to semihosting?
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.
All of my System_printf and printf calls work when I'm connected to CCS, but the application does not work when disconnected from CCS. Is this related to semihosting?
Running Stand-alone TI-RTOS examples without an IDE
Both IAR and GCC support the concept of semi-hosting. Semi-hosting is convenient during early development because printf and System_printf output can be directed to the IDE console. However, when semi-hosting is enabled, most of the TI-RTOS examples will not run when not connected to the IDE. This is because the System_flush() call never returns since it is waiting for the IDE to release it. Please note: the TI Codegen and CCS handshake mechanism is different. The examples built with TI codegen can be used with or without the IDE with no ill effects.
GCC Specifics
The TI-RTOS examples are built semi-hosting disabled as of TI-RTOS 2.20(i.e. the rdimon.a library is included). There are two different approaches to allow the examples to be run in a stand-alone environment.
1. Use the nosys library. Please refer to the following FAQ for more details: https://e2e.ti.com/support/processors/f/791/p/947277/3499788#3499788
2. Use the SysCallbackSystem Provider instead of SysMin or SysStd. The UARTConsole example use SysCallBack. Instead of using the RTS functions, the SysCallbackmodule allows the user to specify a putchFxn function. The putchFxn can do nothing or do something with the character. The UARTConsole example sends the character out a UART.
The TI-RTOS Kernel also has a SemiHostSupport module to enable the use of functions like fwrite, etc. by the application. Refer to the following site for more details: https://e2e.ti.com/support/processors/f/791/p/947278/3499789#3499789
IAR Specifics
The TI-RTOS driver examples include the following linker option: --semihosting=iar_breakpoint. There are two different approaches to allow the examples to be run in a stand-alone environment.
1. Remove the –semihosting option. This can be done in the makedefs of the generated examples or via the IDE on an imported example.
2. Use the SysCallbackSystem Provider instead of SysMin or SysStd. The UARTConsole example use SysCallBack. Instead of using the RTS functions, the SysCallbackmodule allows the user to specify a putchFxn function. The putchFxn can do nothing or do something with the character. The UARTConsole example sends the character out a UART.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.