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.

returning a struct produces no match for CALL error

Hello,

I want do return a struct as suggestet in the last post in this article:

But including the line "MeasuredCurrents = getStrom();"

gives me an error: "INTERNAL ERROR: no match for CALL"


I am using CCS  Version: 6.1.0.00104 with the SRV8301-LS31-Kit

typedef struct Strom{
	float PhaseU;
	float PhaseV;
	float PhaseW;
}Strom_t;

typedef struct adcData
{
    uint32 id;     /**< Channel/Pin Id        */
    uint16 value;  /**< Conversion data value */
} adcData_t;

--my function
Strom_t getStrom(void) { adcData_t ADCResults[3]; //make an array of type adcData_t Strom_t CurrentResults; adcGetData(adcREG1, adcGROUP1, ADCResults); //write conversion results into Array CurrentResults.PhaseU =( ( (float)ADCResults[0].value * 3.3) + 0.5 ) / 4096; // calculate currents CurrentResults.PhaseV =( ( (float)ADCResults[1].value * 3.3) + 0.5 ) / 4096; CurrentResults.PhaseW =( ( (float)ADCResults[2].value * 3.3) + 0.5 ) / 4096; return CurrentResults; } -- in an RTI i have this code Strom_t MeasuredCurrents; MeasuredCurrents = getStrom(); //including this line i get an error

  • Which compiler are you using?  What is the version of that compiler?  Please show the exact build options used.

    Thanks and regards,

    -George

  • I use the TI Armcompiler Version TI v5.2.2 here are the build options from the console output:

    **** Build of configuration Debug for project Blink ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../BlinkHCG/source/sys_main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/include" --include_path="C:/Users/fschulle/Desktop/CCS Workspace/Blink/EigeneQuellen" --include_path="C:/Users/fschulle/Desktop/CCS Workspace/Blink/BlinkHCG/include" -g --display_error_number --diag_warning=225 --diag_wrap=off --enum_type=packed --printf_support=full --preproc_with_compile --preproc_dependency="BlinkHCG/source/sys_main.pp" --obj_directory="BlinkHCG/source"  "../BlinkHCG/source/sys_main.c"
    >> ../BlinkHCG/source/sys_main.c, line 165: INTERNAL ERROR: no match for CALL
    
    
    This may be a serious problem.  Please contact customer support with a
    description of this problem and a sample of the source files that caused this
    INTERNAL ERROR message to appear.

  • I cannot reproduce the issue.  What are the definitions of adcREG1 and adcGROUP1?

  • Thank you for submitting a test case.  I can reproduce the same results.  I filed SDSCM00051848 in the SDOWP system to have this investigated.  Feel free to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George