Saving to EEProm
pjv
Posts: 1,903
Hi All;
A question here on the the Propeller IDE.
I have a Prop program running on a PDB that writes a little data via I2C to that Prop's EEProm in an unused area. Then I wish to save that data to a file on my PC. So I press the F8 key to bring up the program information/hex screen, and push the SAVE_to_EEProm button to initiate the transfer to the PC.
But then when I open the PC file with an editor, the programs are there, but the data I wrote is absent. Yet I know it existed, because I also have a piece of code on that Prop that reads the EEprom and show its contents. So what happens??
Does the Propeller IDE re-compile the application code an save a clean copy, effectively flushing the data I wrote to the EEProm?
I thought others had written to unused sections of the EEProm; but perhaps it cannot be saved to an external PC file using the F8 rendered screen??
If what I am trying is not possible, then what is an easy way to dump Prop generated I2C strings via the PDB (or other) USB connector directly to a file on a PC?
Help ?!
Cheers, (from the PC-illiterate)
Peter (pjv)
A question here on the the Propeller IDE.
I have a Prop program running on a PDB that writes a little data via I2C to that Prop's EEProm in an unused area. Then I wish to save that data to a file on my PC. So I press the F8 key to bring up the program information/hex screen, and push the SAVE_to_EEProm button to initiate the transfer to the PC.
But then when I open the PC file with an editor, the programs are there, but the data I wrote is absent. Yet I know it existed, because I also have a piece of code on that Prop that reads the EEprom and show its contents. So what happens??
Does the Propeller IDE re-compile the application code an save a clean copy, effectively flushing the data I wrote to the EEProm?
I thought others had written to unused sections of the EEProm; but perhaps it cannot be saved to an external PC file using the F8 rendered screen??
If what I am trying is not possible, then what is an easy way to dump Prop generated I2C strings via the PDB (or other) USB connector directly to a file on a PC?
Help ?!
Cheers, (from the PC-illiterate)
Peter (pjv)
Comments
The IDE will write to the entire 32K of the EEprom, wiping out anything in the region and re-writing it, and clearing space to 32K, IIRC.
The easiest way out of this predicament, is to throw hardware at it. Replace the 24LC256 with a 24LC512 and write all your stuff above 32K and the IDE will not touch it upon reprogramming.
Jim
The simplest thing to do is to write a program to read the EEPROM and send the data up the serial line to PST and capture and save it that way. The trick is to just Load that data retrieval program to RAM only leaving the initial program and your interleaved data alone untouched in the EEPROM.
The next step would be, since the PDB has the EEPROM socketed would be to pry out the 24LC256 and replace it with a 24LC512 and use the upper half which never gets touched by the bootloader.
If you move this program to a project board, the Parallax Propeller Proto, or Nick's whole family of Propeller Platform boards all come with 24LC512's
cheers ... BBR
I am not sure what you mean by "I2C strings" You can write the data to the PC using one of the serial objects. With PST you can copy the data and then paste it into you editor of choice and save that file. Some terminal programs have a save to file capability. If you can describe the data you are writing to EEProm, we may have better answers.
John Abshier
Thanks for the responses.
I think I understand what my mis-understanding was..... the button in the F8 window is labeled "Save EEPROM File", and I took that to mean that the IDE would copy the EEProm contents (with my changes as written) to the PC.
But now I understand that the IDE simply copies the code of the IDE to a binary file on the PC and lables it with an ".eeprom" extension. So in fact the EEProm itself is never copied, just what the IDE thought should be in the EEProm is saved to the file.
Or do I still mis-understand my mis-understanding?
Cheers,
Peter (pjv)
I understand the misunderstanding of my misunderstanding of the problem.
Yes, The F8 "Save EEPROM FILE" does not look at the EEPROM, but just saves the program from the IDE to a binary file to be ready to be loaded to the EEPROM.
Jim
You should have a look at Phil's unload application which grabs the EEPROM content from the board and saves it PC-side.
http://forums.parallax.com/showthread.php?t=91596&highlight=Hydra+Asset+Manager+released
Never used it, but it was supposed to save EEPROM data to the PC side also.
I would try Phil's first, as I don't know if HAM is still supported, and we all know where Phil lives.
Jim
Presently I have no 512 EEProms, so I tried dumping directly to PST, but unfortunately that did not work because the data I wrote to the EEProm is raw binary. Some are interpreted as control characters such as erase screen, line feed etc., and thus not capturable.
I will give Phil's program a go. I'm sure it will do what I want....... thanks Phil!
Cheers,
Peter (pjv)