Hi,
The most probably you didn't put const in front of the string defined:
const char mystring[] = "Hello";
With the const, constant string can be allocated to Flash, otherwise it will be distributed to RAM.
Also, you can use us #pragma declaration define a segment (constant, data, code) and still 'const' is necessary
Syntax: #pragma CONST_SEG <name>|DEFAULT
This segment must be explicitly allocated within the PLACEMENT block in the link parameter file. For more information, refer to the chapter Linker Issues of the Build Tools Utilities reference manual.
The following listing exemplifies the correct usage of the CONST_SEGpragma:
/* p.h */
#pragma CONST_SEG MY_ROM
extern const int cx;
#pragma CONST_SEG DEFAULT
extern const int y;
/* p.c */
#pragma CONST_SEG MY_RAM
const int cx = 1;
#pragma CONST_SEG DEFAULT
const int cy = 2;
/* main.c */
#include "p.h"
void main(void)
{s = cx + cy;}
Find more info in CodeWarrior Help by searching "S12Z Pragmas".
Regards,
iggi