Modelling of block sizes in AVRDUDE #1077
Replies: 3 comments
-
Wow, this is really complicated. I guess we have to live some levels of complexity as some programmers may have some limitations to make it different. That being said, if we can combine certain things and reduce the complexities, why not? And if there are bugs in avrdude in this aspect, then we have to fix it. |
Beta Was this translation helpful? Give feedback.
-
True. I looked into all this to figure out what a good cache size for Issue #1020 is (I still plan to solve this generically) only to discover the intricate complexities of page sizes and blocksizes. But I am glad I went down this road. I am sure we'll be able to use the 22k settings in parameters.txt file for some automated updating/rewriting of In the first instance I might use There is still the question as to how well paged read/write routines should understand the 28 potentially different block sizes in addition to the flash/EEPROM page sizes that memories already have. |
Beta Was this translation helpful? Give feedback.
-
The different |
Beta Was this translation helpful? Give feedback.
-
The blocksize for reading or writing chunks of flash or EEPROM memory not only varies wildly between parts (that much is known) but can also vary, for a fixed part, with the interface it is programmed with, and worse, with the programmer that is used. Pertinent question at the end of the (long) post.
I took a look at the atdf files with a view to extract the parameters for parts used in different interfaces: parameters.txt
Q: How many parameter settings?
Q: Show me a few examples
Q: Which interfaces are we talking about?
Q: Which interfaces define blocksizes for access?
Q: ... and which blocksize parameters are we talking about?
Q: Blimey, there are 7 interfaces with 12 different blocksize parameters?
A: Actually, there are 28 different combinations
Q: Surely, once you've decided on the part, which memory and whether you want to read or write, then all the blocksizes are the same?
A: No such luck...
This means there are 145 parts that have at least 2 different blocksizes to write flash to, which depend on the protocol; and there are 172 different parts that have at least 2 different blocksizes for writing EEPROM.
Q: Surely, at least, once one fixes PP, ISP or HVSP in addition then the blocksize is unique, ie, it does not depend on the device one programs with?
A: Not really, no.
There are 13 parts that have different blocksizes to write flash, depending whether it's STK600 or not, ...
Q: Surely, AVRDUDE models that zoo, not?
A: Well, there are four parameters in
avrdude.conf
, flash readsize (ReadFlash in atdf), eeprom readsize (ReadEeprom), flash blocksize (ProgamFlash) and eeprom blocksize (ProgramEeprom). There is no distinction as to the different programming interfaces, and even less as to the different programmers using the different interfaces. And there are not many places wherereadsize
andblocksize
are actually used.--
Now what?
Beta Was this translation helpful? Give feedback.
All reactions