AnsweredAssumed Answered

Placing strings

Question asked by Teckna Teckna on Nov 13, 2012
Latest reply on Dec 13, 2012 by Teckna Teckna

Hi everyone,

 

I'm using CW 10.2, MQX 3.8.1 and Kinetis K60.

Due to an alomst full RAM use, I'm doing some optimization in my code.

I noticed that the instruction:

printf( "String to print\n");

Is compiled putting the pointer to the string in the register and then calling the printf function: the pointer points to an address placed in RAM that is initialized in the startup phase by copying data from the flash to the RAM.

I would like to put the string "String to printf\n" only in flash the way the copying phase is not needed and the RAM location can be used in another way.

 

How must I specify this requirement in CW?

 

Many thanks

Teckna

Outcomes