Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Collect Stub Information Fails To Find Identifier

z_lwray
z_lwray Posts: 3

Hello,

I am using Parasofts C/C++ Test in an embedded environment;

  • IDE: Code Composer Studio v8.2.0.00007
  • Device: TMS320f28075
  • Compiler: ti-cgt-c2000_18.1.3.LTS
  • Product: Parasoft C/C++ Test Professional 10.4.2

Whilst trying to run the built in "Collect Stub Information" operation Parasoft cannot find certain identifier definitions defined outside the project directory;
One of the errors is:

C/C++test analysis errors in /motor_controller/stubs/autogenerated/auto_a4bee246.c
1. Test execution: error preparing instrumentation / symbols data for file.
"X:\Library\TI Library\C2000Ware_2_00_00_02\device_support\f2807x\common\include\F2807x_GlobalPrototypes.h", line 58: error: identifier "Uint16" is undefined
extern void InitECap1Gpio(Uint16 pin);
^

There are 100 of these errors repeated for different functions, so I haven't provide the full console output.

The definition of "Uint16" is in a file "F2807x_device.h" which is in the same directory as the file where the missing identifier error appears (a shared network location). So it seems the software is aware of the directory but isn't seeing the definition.

How do I provide the identifier definition?

Comments

  • Tejashree
    Tejashree Posts: 3

    Hi,
    Did you receive any solution to this Problem? I am facing similar issue.
    Best regards.

  • Mirek
    Mirek Posts: 141 admin
    edited July 2020

    Hi,

    When generating stub files, C/C++test tries to automatically detect all header files that are required for the stub definitions and adds them at the beginning of the stub file. Due to technical reasons (like circular dependencies, header files that are not "self-contained", etc..) it is not always possible to calculate a complete list of required header files. In such a case, C/C++test will generate the stub file which may not be compilable in the initial form. It is recommended for the user to analyze compilation errors and manually add missing header files.

    In case of the problem reported by @z_lwray, I suspect that "auto_a4bee246.c" stub file requires an #include directive with the header file where "Uint16" is typedefed.