Hello,
Thank you Wayne for your response.
Best Regards,
..:: කසුන් චන්ද්රනාත් ::..
..:: Kasun Chandranath ::..
Wayne Uroda wrote:
> You can put the const keyword in front of your definition of the string.
> Example:
>
>
> #include <stdio.h>
>
> const char stringInFlash[] = "Hello world, this string is in flash memory!";
>
> int main(void)
> {
> printf("%s", stringInFlash);
> return 0;
> }
>
>
> This is just an example of course, your MSP430 won't really be able to printf
> unless you have done something special.
> Note also that you can't modify the string directly in flash since it is read
> only. You would need to copy it into a ram buffer to do that.
>
> I hope that helps you out.
>
> - Wayne