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.

Bug in C6000 Code Generation Tools v6.1.21



CCS3.3 SR12, with C6000 Code Generation Tools v6.1.21

wrong parameter in the last function call.

//source code: draw a cross and double lines at the end of cross

void drawCrossLine(int x, int y, int cenX, int cenY,int outR, int inR)
{
    fillRectangle(x+(cenX-outR), y+cenY, outR<<(1), 1, cRed);
     fillRectangle(x+cenX, y+(cenY-outR), 1, outR<<(1), cRed);
     fillRectangle(x+(cenX-outR), y+(cenY-25), 1, 25<<(1), cRed);
     fillRectangle(x+(cenX-inR),  y+(cenY-15), 1, 15<<(1), cRed);
     fillRectangle(x+(cenX+outR), y+(cenY-25), 1, 25<<(1), cRed);
     fillRectangle(x+(cenX+inR),  y+(cenY-15), 1, 15<<(1), cRed);         
     fillRectangle(x+(cenX-25),   y+(cenY-outR), 25<<(1), 1, cRed);
     fillRectangle(x+(cenX-15),   y+(cenY-inR) , 15<<(1), 1, cRed);
     fillRectangle(x+(cenX-25),   y+(cenY+outR), 25<<(1), 1, cRed);
     fillRectangle(x+(cenX-15),   y+(cenY+inR) , 15<<(1), 1, cRed);    
}

Mix Source/ASM:

At the last call of fillRectangle(), use B12 stand for y+(cenY+inR) @00003D20. However B12=y+(cenY-15) @00003C60.

The result of C6000 Code Generation Tools v6.0.8 is correct. It use two ADD instruction to caculate y+(cenY+inR) @000031B8 and @000031C4

  • Try different version:

    6.0.8      good

    6.0.31   good

    6.1.21  error

    6.1.11   error

    6.1.22  installation error

    6.1.2     INTERNAL ERROR: C:\Texas Instruments\C6000 Code Generation Tools 6.1.2\bin\opt6x.exe experienced a segmentation fault while
                    processing function _FS_selfExamine file c:\\Temp\\162603

    7.3.8    good

    It seem the bug fix after 7.x. I did not try 7.3.8 first because the comment mislead me: [Requires CCS v4 or later; not compatible with CCS v3].

    v7.3.8 actually works fine with CCS3.3.

  • Exactly what command line options are you using?

    What is the definition of cRed?

    The optimizer segmentation fault involving FS_selfExamine is a separate bug.  Could you post that function here so we can analyze that bug, too?

  • I simpified my project and make sure error appear and can run in DM642 simulator.

    5810.App_IDOIV20Test.zip

    Options=-g -pdsw225 -o3 -fr"$(Proj_dir)\Debug"  -d"_DEBUG" -mf3 -mv6400 -c

    Without -mf3 option, the result asm is different but same error apears in drawing result.

    Segmentation fault involving FS_selfExamine didnot apear with 6.1.11 and 6.1.21, so it would not a problem.

    I would turn to 7.3.x, so this problem would not bother me no more.

  • I was able to reproduce a failure with the test case and options given.  I haven't proven this conclusively, but it is extremely likely that the bug is SDSCM00043966, which was fixed in 7.2.10, 7.3.6, and 7.4.0, but will not be fixed in 6.1.x.  The versions of the compiler which carry this bug match with your observations about which versions fail, and the description of the bug matches your test case.

    I was not able to reproduce the segmentation fault.

  • Glad to know bug fix in later version! Is there any document about considerations using 7.3.x in CCS3.3?

  • I'm sorry, I don't know anything about that.  You might want to start a new thread in the CCS forum with just that question in it.