I just ran into the same problem, but wanted to preserve flash within the project so other developers could do the same without changing any files on their systems. This is a round about way to do it, but it works pretty well for our purposes:
Changes to Project files:
1. In the PRM file, set aside a part of RAM: STORAGE_RAM = READ_WRITE 0x0E00 TO 0x0E7F;
2. In the PRM file, set aside a part of Flash: SAVE_DATA_ROM = READ_ONLY 0x1080 TO 0x17FF;
3. In the Preload.cmd file, add the following: SAVE 0x0E00..0x0E7F XBEE_FLASH_DATA.S19
4. In the Postload.cmd file, add the following: SREC XBEE_FLASH_DATA.S19
So far what we have is duplicate data in the flash and RAM. The only purpose for the RAM object is when you program, the data will be saved to a S19 file, the chip will be erased (RAM and Flash) and then the data will be re-written back into RAM. It would be nice to do this directly to Flash, but unfortunately it does not work with flash.
Note: In my data structure that has all the data to be stored, I have an initialzed byte that needs to be set to a predefined value (I use 0x24).
In your code, do the following:
1. In the code, create two pointers to your stored data structures; RAM and Flash.
2. If the RAM has been initialized (0x24) and the flash has not been initialized (not 0x24), you know that you just programmed the chip. Now you can program your data into flash from your RAM object.
Hope this helps!