This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Placing Constant data in Internal flash by specifying explicit address

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

Parents
  • 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...

Reply
  • 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...

Children
No data