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