This is the mail archive of the
mailing list for the GDB project.
Re: GDB support for Flash memory programming
Jim Blandy wrote:
>On the board I happen to have handy, it takes 26 seconds to write a
>full 128k flash sector over the JTAG interface. Unless this is
>extremely slow compared to what's typical out there, I'd tend to agree
>that preserving unloaded sector contents is important to leave
>optional, or not require at all. I wouldn't mind waiting a handful of
>seconds, but even ten would be too long.
Yes, also, you don't want (or need) to do it if the whole sector is
going to be programmed. Maybe another memory attribute would be
"Preserve unaltered contents of flash on reprogram"
To put it in perspective (I don't know what type of flash you have, if
you give me a part number, I'd be interested to do this analysis on your
Using an accelerated buffer programming algorithm for the Spansion S29GL
family of flash the following is the theoretical typical case sector
Typical time to program 32 bytes = 240us
Therefore 128K Bytes / 32 * 240us = 983ms total typical sector
It might be an unfair comparison, so using the traditional "Byte at a
time" algorithm for the same family, we get:
Typical time to program 1 byte = 60us
Therefore 128K Bytes * 60us = 7.8 seconds total typical sector
Both of which are significantly under your JTag Speeds to do the same
However that said, your Jtag speeds are very respectable, I've seen lots
worse, 10-20 (or more) times slower programming of flash over Jtag.