Page 1 of 1

[solved] Static EEPROM Data

Posted: Mon Oct 03, 2011 2:00 pm
by dbasnett
Lets say I have some static data like copyright information. I know that I can write that data to the eeprom using code, but is there a way that data can be written to the eeprom during programming of the chip by PPP?

Re: Static EEPROM Data

Posted: Mon Oct 03, 2011 3:07 pm
by Steve
Please see the #pragma data technique described here:

http://www.matrixmultimedia.com/mmforum ... ata#p16442

Re: Static EEPROM Data

Posted: Tue Oct 04, 2011 12:48 pm
by dbasnett
I assume you meant this;

Alternatively you can place the EEPROM data into your program using the following BoostC directives.

// Initializes EEPROM with data: 0x0C 0x22 0x38 0x48 0x45 0x4C 0x4C 0x4F 0x00 0xFE 0x99
#pragma DATA _EEPROM, 12, 34, 56, "HELLO", 0xFE, 0b10011001


Where does that go? I tried adding a c code block to my application with that in it and received errors.

Re: Static EEPROM Data

Posted: Tue Oct 04, 2011 1:13 pm
by Benj
Hello,

If you click View -> Project Options.

Then tick the box that says include supplementary code.

Then click the edit supplementary code button and add the line of C code to the top supp code window.

Re: Static EEPROM Data

Posted: Tue Oct 04, 2011 1:49 pm
by dbasnett
Thanks.