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.

CCSV6 MSP430 shows unresolved va_argref Function, but code compiles with no error

I am using the latest CCSV6 Version: 6.1.3.00033 with MSP430 Compiler 4.4.7.

This previously showed no errors in the earlier CCS 6.1.1.

Within the IDE I get an error marker in my reduced function printf.c code when I us va_start

The Problems tab shows:

Description Resource Path Location Type
Function '__va_argref' could not be resolved PRINTF.C /APIA30307/SOURCE line 66 Semantic Error
Function '__va_argref' could not be resolved PRINTF.C /APIA30307/SOURCE line 239 Semantic Error
Function '__va_parmadr' could not be resolved PRINTF.C /APIA30307/SOURCE line 66 Semantic Error
Function '__va_parmadr' could not be resolved PRINTF.C /APIA30307/SOURCE line 66 Semantic Error
Function '__va_parmadr' could not be resolved PRINTF.C /APIA30307/SOURCE line 239 Semantic Error
Function '__va_parmadr' could not be resolved PRINTF.C /APIA30307/SOURCE line 239 Semantic Error

However when I click on the va_start function (which generates the errors) it correctly goes to the MSP430 stdarg.h file.

Also, when I compile the file, the compiler reports no errors (So presumably it can correctly resolve the includes).

C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.7/bin/cl430 --fp_reassoc=off --sat_reassoc=off --symdebug:dwarf --plain_char=signed --opt_level=2 --silicon_version=msp -DMSP_CPU=1612 -I=C:/ti/ccsv6/ccs_base/msp430/include -I=../ -I=C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.7/lib/src -DPCB_MODEL=1 printf.c

I have tried using the index menu item to resolve externals but nothing changes.

How do I fix these unresolved Functions?

This version of the CCS also reports that my function has no return for a function which should return short.

The function does in fact have a return within a for(;;), if I put an unreachable return after the for(;;) this removes this warning.

  • Barry Andrews said:

    I am using the latest CCSV6 Version: 6.1.3.00033 with MSP430 Compiler 4.4.7.

    This previously showed no errors in the earlier CCS 6.1.1.

    Are you opening the older 6.1.1 workspace in CCS 6.1.3 or opening a new workspace in 6.1.3 and importing the project into it? 
    Using the same workspace across different versions of CCS is not recommended. This is mainly because the underlying Eclipse does not support this very well. The general recommendation, for each new release of CCS, is to start up a new workspace and import projects into the new workspace.

    These errors are semantic errors coming from the built-in Eclipse code analysis tool and not from the CCS compiler tools, so as you noted, they should not affect the output of the build itself. But please check this wiki section and see if the suggestions there help eliminate the errors.

  • I was using old 6.1.1 workspace which CCSV6 had asked me did I want to convert to 6.1.3.

    However changing to a new workspace created from scratch and then importing the project results in the same unresolved Functions.

  • Did the suggestion in the wiki link I sent help eliminate the errors?
  • No, the wiki did not really solve my issue.
    None of the indexer settings fixed the issue other than turning off the particular error being detected.
    So it did tell me how to hide the markers but not how to eliminate the error.
  • Barry Andrews said:
    Function '__va_argref' could not be resolved PRINTF.C /APIA30307/SOURCE line 239 Semantic Error
    Function '__va_parmadr' could not be resolved PRINTF.C /APIA30307/SOURCE line 66 Semantic Error

    According to the old thread Where is definition of _va_argref and _va_parmadr ? __va_argref and __va_parmadr are internal compiler operators only for use only in the stdarg.h macros, which explains why __va_argref and __va_parmadr aren't defined in any of the run time library source files.

    Barry Andrews said:
    I am using the latest CCSV6 Version: 6.1.3.00033 with MSP430 Compiler 4.4.7.

    Using CCS 6.1.3 and MSP430 compiler v4.4.7 I am unable to repeat the problem, in that when created a test program which uses va_start, va_arg and va_end the code analysis feature didn't report any errors.

    Looking in the CCS Project Properties -> C/C++ General -> Paths and Symbols under symbols shows a built-in value for a definition of __va_argref :

    If you compare the built-in symbols for CCS 6.1.1 and 6.1.3 are there any differences?

    [To see the C/C++ general properties you have to select the "Show advanced settings" in the bottom left of the CCS project properties dialogue]

  • Hello Chester

    Thanks very much for your input.

    I think the problem is that my project is not a managed project by CCS but a makefile project and as such the symbols are not included.

    The code I am having an issue with is building a library of our own functions for use with a range of PCBs and processors.

    As such, my makefile builds a number of variants of the code and includes the appropriate processor headers depending upon the defines used for the build.

    See my project properties below: