How can errors in 'Run C/C++ code analysis' be resolved?

How can errors in 'Run C/C++ code analysis' be resolved?
  • Example: Symbol '__NVIC_PRIO_BITS' could not be resolved in Resource: core_armv8mbl.h in folder  $(PROJECT)/synergy/ssp/inc/bsp/cmsis/include/

  • I want to know how to configure the C/C++ Code Analysis from Eclipse CDT to find all the required include files and resolve all errors as is intended! Is there an external resource related to Eclipse that shows how to set it up?

  • In reply to Keith:

    I don't know of a single resource that shows the configuration options (and issues) of using the CDT CODAN.

    A few I found by googling are (though they are not all for the same version of eclipse as the latest version of e2studio is based on) :-

    For the specific example you give :-

    '__NVIC_PRIO_BITS' could not be resolved in Resource: core_armv8mbl.h

    If the device you are using is not an ARMV8M core (only the S1JA is an ARMV8-M core, of the current Synergy devices), then the file core_armv8mbl.h is not actually used by any of the active code in the project. __NVIC_PRIO_BITS is defined in the device header file. E.g. for the S5D5 :-



    This isn't an issue for the compiler, as it only uses the header files included from the source code. However the indexer can be configured to index unused header files (though that option is unchecked in my project ):-

    So I only get the error "'__NVIC_PRIO_BITS' could not be resolved in Resource: core_armv8mbl.h" reported if I actually open the file core_armv8mbl.h (maybe the SSP shouldn't actually extract the header files for ARM CPU cores that aren't currently being used)

  • In reply to Jeremy:

    I first needed to add the path to the S7G2 micro to the C++ Paths and Symbols, as a workspace path, which is /${ProjName}/synergy/ssp/src/bsp/cmsis/Device/RENESAS/S7G2/Include

    Then after I disabled the checkbox for "Index source files not included in the build", then rebuilt the Index, all symbols were indexed with no errors. I did this as the Workspace default. Thanks for this hint!