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.
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
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.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.