This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Identify Storage of String Literals in Mapfile

Is it possible to identify the storage of String Literals from the mapfile?

I asume they will be in the ?CO? segment for the module?
eg,

void func( void )
{
   code unsigned int NumConst = 1;

   printf( "NumConst = %u", NumConst );
}

Will both the integer constant NumConst and the string literal "NumConst = %u" be stored in the same ?CO? segment, or will they be listed separately in the map?

Parents
  • The ?CO?your_source_file_name is the Room size of all your string literal.

    Not quite sure what you mean by, "Room size?"

    I think you are using L251, which might give more details, but with BL51 I can't see any way to tell from the mapfile how much of the ?CO?your_source_file_name segment is occupied by String Literals, and how much by "real" constants.

    Basically I need to cut down my code size, and I think that String Literals are a prime target; therefore, I need some easy way to confirm just how much code is being used by String Literals (rather than "real" constants, which must be retained).

Reply
  • The ?CO?your_source_file_name is the Room size of all your string literal.

    Not quite sure what you mean by, "Room size?"

    I think you are using L251, which might give more details, but with BL51 I can't see any way to tell from the mapfile how much of the ?CO?your_source_file_name segment is occupied by String Literals, and how much by "real" constants.

    Basically I need to cut down my code size, and I think that String Literals are a prime target; therefore, I need some easy way to confirm just how much code is being used by String Literals (rather than "real" constants, which must be retained).

Children
  • Hummmm... unfortunately the ?CO?your_file_source_name is showing your literals and other "real" constants, I could not find a way to see only the literals.

    When I add another code variable to the source file, the length of ?CO?xxx increase.

    Yes, I was using L251 ( FF0000h ).