This is the mail archive of the
mailing list for the eCos project.
On 02/15/2011 11:45 AM, Andrew Lunn wrote:
If I understand correctly, the cyg_flash_program() operation erases
before program such that the resulting bit pattern in the Flash always
represents the input bit pattern exactly, instead of being the result
of an "and-mask" operation.
I think you are wrong. Take a look at the code. cyg_flash_program()
does not call any erase functions.
I've done exactly what you want to do in the past. I implemented an
log of panic messages which just appended to the end of the current
log. No API change was needed.
I found the other behaviour in the atmel dataflash implementation
(current CVS tree).
In function df_flash_program()
cyg_dataflash_program_buf(&priv->dev, 1, page, true)
Hence for atmel dataflash the "erase" is always true.
So which one should it be?
From the eCos documentation it isn't really clear what the correct
behaviour should be.
To erase or not to erase?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss