Hi everybody,
I'm using a lot of strings in my code, and I suppose that this string must remain into flash mamory. But the strings are occuping a lot of RAM space. How can I avoid that?
Thanks an best regards!
Solved! Go to Solution.
I created a new stationery project for the V1 QE128 and used a string in main.c.
The string gets allocated in flash just as code is, so I wonder if you have some other special setup or if your diagnosis that the string ends up using RAM is not correct and the RAM is eaten up by something else.
Here's what I got out of the xmap file:
000007D8 0000000C .text _ewl_exit (librt.a abort_exit.o ) 000007E4 00000009 .rodata @8 (main.c)
As you see the string ends up in .rodata just after the last code function from .text .
As you see the strings also ending up in .rodata (good) is the issue that your lcf places .rodata inproperly?
Daniel
Hello,
the target processor is a ColdFire V1 (QE128), I´m using CodeWarrior V6.2.
I´m using a lot of strings in my code, for example:
strstr(myBuffer, "MyString");
When I compile the proyect, in the proyect window says that I have a lot of RAM usage, while only are declared a few variables.
In the .MAP file, these strings appears into the .rodata section.
How can I avoid this behaivor?
thanks in advance!
I created a new stationery project for the V1 QE128 and used a string in main.c.
The string gets allocated in flash just as code is, so I wonder if you have some other special setup or if your diagnosis that the string ends up using RAM is not correct and the RAM is eaten up by something else.
Here's what I got out of the xmap file:
000007D8 0000000C .text _ewl_exit (librt.a abort_exit.o ) 000007E4 00000009 .rodata @8 (main.c)
As you see the string ends up in .rodata just after the last code function from .text .
As you see the strings also ending up in .rodata (good) is the issue that your lcf places .rodata inproperly?
Daniel
Which processor are you targeting? Which tools are using?
And how do you use the string constants? Can you provide a sample application?
Daniel