Before asking for DSP/BIOS support

From Texas Instruments Wiki
Jump to: navigation, search

This page is intended to guide you through the support options and help debugging DSP/BIOS issues

Was your question already answered by one of these resources?

  • The best resource on how DSP/BIOS works is the DSP/BIOS User's Guide spru423. (currently titled TMS320 DSP/BIOS v5.41)
  • Detailed information about API usage and syntax is located in the DSP/BIOS API reference guide for each family (C2000, C5000 and C6000).
  • If still unsure about a specific API usage, several excellent usage examples are found on the provided projects typically installed under <%BIOS_INSTALL_DIR%>\packages\ti\bios\examples>.
  • Check the DSP/BIOS FAQ page for general questions.
  • Check the DSP/BIOS debugging tips page.
  • If you are having trouble debugging using the CCS built-in debugging tools (e.g., Execution Graph, Message Log, etc) please check RTA troubleshooting page.
  • A complete migration guide from BIOS 4.9x to BIOS 5.x can be found here.
  • Other DSP/BIOS articles can be found here.
  • New for 2010! Check the SDOWP online bug database!
  • Check the external community forums.

A useful cleanup check:

  • Does your main() has a while(1) or for(;;) call? Despite being trivial, this issue sometimes plagues the migration from non-DSP/BIOS projects.
  • Are you using CSL? If so, make sure you are explicitly calling CSL_init() if migrating from a previous DSP/BIOS release (newer DSPs may use complete device drivers that do not require this function call).
  • Are you running into any memory allocation errors? Does your code runs for some minutes or hours and then hang? Does it jump to nowhere land? Check the first topic at the DSP/BIOS debugging tips page.
  • Are you using the interrupt keyword in any of the ISR routines? This leads to runtime errors right from the start. Check the topic Improper use of the keyword interrupt in the DSP/BIOS debugging tips page for additional details.
  • Are you using the HWI Dispatcher in your C language ISRs? Check the topic Improper use of the keyword interrupt in the DSP/BIOS debugging tips page for additional details.
  • Does the project work from internal memory but any attempts to put it into external memory fail? Please check below for considerations on external memory usage.

Common pitfalls:

  • Avoid the temptation to outsmart the DSP/BIOS HWI Dispatcher and Memory Allocation systems. Despite having an apparent overhead or perhaps unsuitable features, these systems years of tested and reliable operation and cover a number of subtle corner cases.
  • Avoid using the standard printf() RTS in real-time constrained systems, since its overhead usually breaks real-time operation. Check this topic for additional details on printf() usage.
  • Despite being written in C, DSP/BIOS can interface with C++ - check out the bigtime example. However avoid using the C++ STL exception handling (try/throw/catch calls) -- they are not thread-safe. Check the last topic of this page.
  • DSP/BIOS applications' trickiest errors only appear at run-time and the tools still provide a very good insight even if the code breaks. Make sure to use the RTA tools to catch any possible run-time issue, more specifically the Kernel/Object View and the Message Log -> Execution Graph Details log.
  • When using Code Composer Studio, keep in mind that DSP/BIOS is command-line in nature (apart from the Graphical Configuration Tool). Therefore carefully check the Build window in Code Composer Studio for different or strange paths used by the tools - this can potentially indicate errors in include paths, especially after installing a new tool release.
    • Make sure the environment variable BIOS_INSTALL_DIR points to the correct directory. CCS usually spawns a warning if the project explicitly uses this variable, however no warning is generated if this variable is used inside a specific source file or the code is being built using the command line tools.
    • Sometimes errors can be easily fixed by making sure that all the include and library directories are properly configured in the Compiler, Linker and DSP/BIOS tabs of the Project options, even if the header file is listed in the Code Composer Studio Project tab.

In general:

  • Tool set versions: check if you are using a tested tool set combination at this page. Despite the fact that other combinations may work, try to avoid any major version leaps that can span through several years - for example, using DSP/BIOS 4.9 with CGT 6.1.6 for C6000.
  • Considerations about external memory usage:
    • External memory is a lot slower and it is affected by bus contention issues, even with critical/high priority code. Try assigning critical code to internal memory and check if the project works. See this page for tips on which sections to place in internal memory.
    • If available, please check if the cache is properly configured and the MAR bits properly set (check this page). Also, make sure that cache coherency is being maintained (see this page). Newer C6000 processors have device drivers that already take this effect into account.
    • A mis-configured EMIF will definitely not be able to read or write anything to external memory. Check both the GEL file or any hardware initialization routine the project may have - typically the function referred in System -> Global Settings -> Call User Init Function in the BIOS graphical configuration.

If nothing else works:

Useful information to provide along with a description of the issue:

  • DSP/BIOS release version;
  • Code Generation Tools and Code Composer Studio release versions;
  • Platform and device used (Custom Hardware? Development boards?)
  • If the issue happens with a specific API provide the source code used.
  • If the issue happens at run-time, provide a detailed description of the problem and the expected behavior.
  • Provide any relevant Message Log or Kernel/Object View debug info or screen captures of the RTA tools - make sure the screens provide a good view of the relevant screens that show the issue.

Who to contact: