NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

StarterWare Semihosting

From Texas Instruments Wiki
Jump to: navigation, search

Background
[edit]

Semihosting is a mechanism that enables code running on the target to communicate with the host pc that is running a debugger, providing IO facilities. For more information on Semihosting refer semihosting. The below sections discuss semihosting support in StarterWare and steps to be followed to enable it. In StarterWare the semihosting has been validated with Linaro GCC and TMS470 tool chain. The standard I/O Functions which are tested and supported in StarterWare on a Debug Console are Printf, Scanf, Puts, fGets, Getchar, PutChar.

Code Update[edit]

In the StarterWare applications the default console is configured as uart. This can be changed to redirect to debugger console.

ConsoleUtilsSetType(CONSOLE_UART);

''Change to''

ConsoleUtilsSetType(CONSOLE_DEBUGGER); 

For more information on Console utility API please refer Console Utils..

Please refer below sections on tool chains which explains how to compile the application to enable semihosting.

Tool chains
[edit]

Linaro GCC
[edit]

StarterWare supports linaro gcc tool chain. To enable semihosting follow the below steps.

  • Compile the application using the command
     make CONSOLE=SEMIHOSTING
  • The linker command file (.lds) in StarterWare supports the necessary sections needed for semihosting. So no change is needed here.
  • In CCS ensure the semihosting option is selected as shown below.

Semihosting.jpeg

  • After compilation load the elf (.out) file using CCS and IO functions can be handled via CCS console.
  • A sample output from execution of RTC example on AM335x EVMSK is shown bleow.

RTC SH.png

TI ARM Tool chain
[edit]

Follow the below steps to enable semihosting,

  • In addition to enabling semihosting as shown in above section, while building StarterWare example the "utils" project has to be complied with predefined symbol "SEMIHOSTING".
  • Other steps for loading and executing are as usual and no change is required.

StarterWare semihosting compilation.png


Emulators Supported[edit]

The following emulators are supported in CCS 5.4 for semihosting,

  • xds 560
  • xds 100v2

Known issues / Limitations[edit]

  1. SemiHosting is enabled with CCS 5.4 only and the previous versions do not support semihosting.
  2. xds 510 emulator will not work for semihosting in CCS 5.4
  3. Console works slowly while using XDS100V2 Emulator.
  4. SemiHosting with IAR toolchain is not tested with StarterWare

Additional Information
[edit]



E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare Semihosting here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare Semihosting here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article StarterWare Semihosting here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article StarterWare Semihosting here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article StarterWare Semihosting here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare Semihosting here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare Semihosting here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article StarterWare Semihosting here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article StarterWare Semihosting here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity