I'm working with CW 10.2 and Kinetis MK60DN512.
I created a bareboard project with a single test file:
#include "derivative.h" /* include peripheral declarations */
const char *str;
const TEST Test0 =
const TEST Test1 =
const TEST *Test[ 2 ] =
int main( void )
for( i = 0; i < 2; i++ )
printf( Test[ i ]->str );
while( 1 )
return( 0 );
In the map file the two const structs Test0 and Test1 are located in .rodata section (flash), but the const struct Test is located in the .app_data section (ram) even if it's declared as const.
Why is there such difference? I expected all the structs to be located in the .rodata section.