Keil Logo

ARMCC: Internal Fault 0xda55d9


Information in this knowledgebase article applies to:

  • MDKv5
  • ARM Compiler 5.04u1 or later version of armcc

SYMPTOM

Project is built with options (--c99 && -Otime && (-O2 || -O3)). On a specific source file, the compiler shows the following message in the build output:

Internal fault: [0xda55d9:50#####] in {function_name}
Please contact your supplier.

CAUSE

In this file, the function from fault message is within the scope of a named register variable and causes the compiler to fault. armcc does not commit to a successful compile with every use-case of named register variables. See the Restrictions section in the description of named register variables.

Here is one code example that can cause the issue. With the compiler command line options above, use

struct b
{
   int w;
};

register int a  __asm( "r0" );

struct b B;

void func1() {
  char * q;
  char * c[] = {
          [0] = "A",
          [1] = "B",
          [2] = "C",
          [3] = "D",
          [4] = "E",
          [5] = "F",
          [6] = "G",
          [7] = "H",
          [8] = "I",
          [9] = "J",
          [10] = "K",
          [11] = "L",     //comment out this line and compile is successful

  };

  while (1) {
     if( c[ B.w ] )
        q = "A";
     }

}

For this example, a structure or a union can be used as "b". The named register line can also be located in an included header file, because this is in the same scope. The function must use a continuous loop, and the array "c" must use designated initializers.

WORKAROUND

The workaround is to wrap the function definition in:

#pragma push
#pragma O1 //or #pragma Ospace
//func1() definition
#pragma pop

Another workaround is to limit the scope of named register variables to source files that do not use similar code to the example above.

STATUS

This issue will not be resolved in armcc. The current development effort is focused on ARM Compiler 6 (armclang). Critical issues in armcc will be resolved and some safety-critical versions will still be maintained, but major new features, like including new ways to handle named register variables, will not be added to armcc.

MORE INFORMATION

Last Reviewed: Thursday, August 4, 2016


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.