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

storing data in code memory of 87LPC764

Hi everyone,
j developed a C program that use the philips 87LPC764 8051 derivative.
This micro needs to store at specific addresses in code memory 2 bytes for the configuration options (type of oscillator, speed etc.)...how can j do this? Maybe using the "_at_" keyword?
Any ideas welcomed bye!

Massimo.

Parents
  • Andrew wrote:
    As I said, judging by the number of times the question gets asked here, there's a lot of people who do want to do it! They don't usually say why they want to do it, so it's hard to say whether they have good reasons!

    True, so let's show them alternatives that they can have now.

    For case 1: For the ROM case linker will create an image size large enough to capture the _at_ address. On a 64kB ROM this may not pose a real problem, but in principle I don't like padding out my image (.bin) just to get up to the checksum value up at 0xFFFE. What if I have to download this upgrade image over a slow link?

    For the RAM case, be explicit and just do it at run-time. I, again, stipulate that no one in their right mind would allow some memcpy routine to initialize memory mapped I/O addresses in XDATA.

    As for case 2: We really need to get comfortable with .a51 files.

    :-)

    - Mark

Reply
  • Andrew wrote:
    As I said, judging by the number of times the question gets asked here, there's a lot of people who do want to do it! They don't usually say why they want to do it, so it's hard to say whether they have good reasons!

    True, so let's show them alternatives that they can have now.

    For case 1: For the ROM case linker will create an image size large enough to capture the _at_ address. On a 64kB ROM this may not pose a real problem, but in principle I don't like padding out my image (.bin) just to get up to the checksum value up at 0xFFFE. What if I have to download this upgrade image over a slow link?

    For the RAM case, be explicit and just do it at run-time. I, again, stipulate that no one in their right mind would allow some memcpy routine to initialize memory mapped I/O addresses in XDATA.

    As for case 2: We really need to get comfortable with .a51 files.

    :-)

    - Mark

Children
No data