Hi Group,
I am developing firmware for LPC1756 ARM Cortex-M3 processor, where I want to place my constant data into the internal flash(code memory) by specifying the address explicitly.
For example,
#define MyValue (*(volatile unsigned char *)(0x00001000)) MyValue = 10;
Here 0x00001000 is Internal Flash address, is it possible to access the Code memory directly by the C code or is there any commands available for it in ARM Compilers. Please suggest/advise me with your experience to satisfy the above requirement.
Regards, Vijay
place my constant data into the internal flash(code memory) by specifying the address explicitly. (emphasis mine)
The usage of the word "by" in that place bodes trouble. I indicates you think fixing the address is necessary to locate the variable in flash. It's quite certainly not.
Placing constants in flash is a job for the tools --- but what you're doing is essentially an attempt to fight them. What's worse, the linker would have no idea what you're using that address for, because you're operating behind its back.
You really should look up the documentation (C compiler and linker) about how to put consts in ROM.