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 V5 compiler crash: "INTERNAL ERROR: no match for ANDB"

Other Parts Discussed in Thread: MSP430G2533

Anybody have a suggestion for what to do when the CCS ( Version: 5.1.1.00031) compiler gives the following error:

 

'Building file: ../accesscode.c'

'Invoking: MSP430 Compiler'

"C:/ti/ccsv5/tools/compiler/msp430/bin/cl430" -vmsp --abi=coffabi -g --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430/include" --gcc --define=__MSP430G2533__ --diag_warning=225 --display_error_number --printf_support=minimal --preproc_with_compile --preproc_dependency="accesscode.pp" --cmd_file="./configPkg/compiler.opt"  "../accesscode.c"

"../accesscode.c", line 45: warning #225-D: function declared implicitly

"../accesscode.c", line 54: warning #225-D: function declared implicitly

>> ../accesscode.c, line 122: INTERNAL ERROR: no match for ANDB

 

 

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.

 

Cannot continue compilation - ABORTING!

Thanks in advance for any help!

 

  • This is an internal error coming from the compiler. We would need the C source file that generates this error so we can reproduce it and file a bug report to get it fixed.

    Please attach the source file accesscode.c (as well as any specific header file it includes other than the standard MSP430 header files) to this post so we can reproduce the error.

    Can you also confirm the version of compiler you are using? Right-click on your project, go to Properties->General and check the compiler version listed under Advanced Settings.

  • Well, as this post has not a solution and I've found the same problem, I am posting a test program that reproduces it. My CCS version is 5.3.0.00090, MSP430 16KB size limited.

    I've tried to split the line "strBuf[i] = (v & 0x0f) + 48;" into more lines, created intermediary variables but no success.

    7z file atached with the test project, just import, hit compile and open the console output.

    http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/343/3036.test.7z

    Thank You,

    Fernando.

  • Thank you for submitting a test case.  I can reproduce the error.  It turns out the bug does not occur in releases 4.1.7 or later.  See this wiki article about updating the compiler.  I was not able to find any bug report on this issue.  So I filed SDSCM00048496 in the SDOWP system to have this looked at.  We need to be sure the root cause is addressed, and will not somehow come back.  Feel free to check on SDSCM00048496 with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • George Mock said:
     It turns out the bug does not occur in releases 4.1.7 or later.

    To clarify ... That's a compiler version number, not a CCS version number.

    -George

  • This issue was addressed with the fix for SDSCM00046800.   The bug does not occur in releases 4.1.6 or later.  Can the customer move to the 4.1.7 version of the tools? 

    -Mack

  • Thank you so mutch! Both of you.

    I updated it, and now it works!

    But anyway , on the old version, I could work workaround if anyone interested:

    typedef unsigned long uint32;
    ...
    void UInt64ToText(uint64 v, uint8 *dest) {
    	uint8 i;
    	uint8 strBuf[18];
    	uint32 vh = (uint32)((v >> 32) & 0x00000000FFFFFFFF);
    	uint32 vl = (uint32)(v & 0x00000000FFFFFFFF);
    
    	strBuf[0] = 48; // "0"
    	strBuf[1] = 120; // "x"
    	for (i = 17; i != 9; i--) {
    		strBuf[i] = (vl & 0x0f) + 48; // char "0-?"
    		if (strBuf[i] > 57)
    			strBuf[i] += 7; // char ":-?" -> "A-F"
    		vl >>= 4;
    	}
    	for (i = 9; i != 1; i--) {
    		strBuf[i] = (vh & 0x0f) + 48; // char "0-?"
    		if (strBuf[i] > 57)
    			strBuf[i] += 7; // char ":-?" -> "A-F"
    		vh >>= 4;
    	}
    	memcpy(strBuf, dest, 18);
    }

    I declared a uint32 type and splited the value in 2 parts of 32 bits. I tought that it could be a 64 bits to something problem.

    Today I looked SDSCM00046800, it is exaclty a 64bits problem : "Internal error: no match for 64-bit to 8-bit narrowing conversion";

    I also created a intermediary variable, but the optimizer seems to eliminate it as described, and I got the same problem.

    With the 32bit variables, everything was fine. But now it is best with new compiler and no need to workaround!

    I couldn't help this time as I tought I would, but I hope will do next time.

    Thank you.