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.

CCS/AM3359: Where is A8.h?

Part Number: AM3359

Tool/software: Code Composer Studio

Hello,

I am attempting to port some code to create a static library.

It requires a mutex.  So naturally I am trying to use Sys/bios.  This I hit this roadblock, deep in C:\ti\bios_6_46_05_55\packages\ti\targets\arm\elf\std.h ...

The error:

"C:/ti/bios_6_46_05_55/packages/ti/targets/arm/elf/std.h", line 28: fatal error #1965: cannot open source file "A8.h"...  Well, there isn't one.  There are plenty of A8F.h and A8Fnv.h ....

It's in this header....  which is creating another header file name, but it cannot be found:

/*  Define target-specific "portable" macros
 *
 *  The build command-line define xdc_target_name__ to be the value
 *  of the target's name config parameter.  We use this to include the
 *  target-specific definitions for the required target-independent
 *  xdc_target* macros.
 */
#if defined(xdc_target_name__) & !defined(xdc_target_macros_include__)
#include xdc__local_include(xdc_target_name__)
#endif

That xdc_target_name__  is resolving to "A8"  and  xdc__local_include converts it to a header name (appends the .h)

Which is coming from "select.h" :

Well, in the normal "sample" project to blink the LED seems to be able to find the header file A8.h... I examine the exact same headers and #define, and it IS trying to open a header file named A8.h .But my project can't.

HOW IS AN EXAMPLE PROJECT ABLE TO FIND A HEADER WHICH DOES NOT EXIST?

As is typical of these examples, and the CS environment as a whole, there is a bunch of stuff going on "under the covers" which is not explained.

  • Here is an update...

    The goal was to have a library (not executable) that has SYS/BIOS support for mutexes, semaphores, etc...  When you create a library project, you are not given the option of including SYS/BIOS

    First of all, don't trust what CCS is telling you.  Apparently the value of xdc_target_name__ is NOT what the IDE told me it was.

    Next, to solve this, copy in some other app.cfg file.  I just stole the one from a "New Project"  template used to create a "SYS/BIOS - TI Target Typical Examples - Typical"  project.

    When you copy it into your folder, CCS will ask if you wich to add SYS/BIOS support.  Say yes, but be ready for the IDE to corrupt your project.  Because the IDE turned on EVERY package option.  So, go into properties and uncheck all that other nonsense it threw in there.

    Also be aware that once you add it to the project, there is no removing it.  Deleting the app.cfg file just screws up the entire project. (nice, huh?)

    (This is just so much fun...  because embedded developers programming in assembler and C are just enthralled with the idea of having to master JAVA just to get their environment to behave, especially when some of the packages are not documented. )

    Also, I discovered that apparently the defined value of xdc_target_name__  comes from the target in the properties, toward the bottom of the properties page, "products" tab.

    So, actually the header that was being dynamically named and included was "A8Fnv.h".  I found it by digging through the makefile of a functioning project, where it was auto-generated when SYS/BIOS was added.

    Would be really nice if there were comprehensive tutorials on how this eco-system works.  Not just tutorials on how to use SYS/BIOS to create tasks, SWIs, and semaphores.