We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
C code can access the flash data just as it can access RAM. The ARM chips don't have separate data spaces for code and data.
But the C code can only read the flash contents, and a compiler can't solve that issue. But the chip manual have information about IAP - In Application Programming - that describes how your C program can change the contents of flash sectors.
Have you really spent time with the documentation available from NXP? They tend to have excellent documentation, but you still need to read it...