-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Issue #915 wrong or missing SPI commands in .conf #934
Conversation
…ress bits There are two types of warning: one given by default (without -v, can be squashed by -qq) if the defined SPI command is unlikely to work; the other warning is given when -v is issued and the defined SPI command uses address bits that the part does not have, but which is unlikely to affect functionality.
The formatting in avrdude.conf is a bit off in several places. Would be great if you could make sure the indentation level and spaces between numbers match the existing content or the content it replaces. |
As first step, I think the PR should be reviewed. After all, it fixes serious SPI command problems of some 25% of SPI programming capable parts. Once that's done and people are happy with it then I am most happy to rewrite the formatting of the SPI programming commands. BTW, what is the expected formatting? The current formatting of the 1371 commands in
Don't just take my word for it, look at: Lines 8648 to 8661 in 60960ba
or Lines 8848 to 8854 in 60960ba
The venerable Lines 9596 to 9604 in 60960ba
|
The vast majority (5382) of assignments happen at column position 25:
How about I
when no address bit is used in the command, and something like
when at least one address bit is used? I'll make sure that after parsing the Answers on a postcard, please. |
Unless there are more comments I consider this PR now finished |
Thank you for spending the time doing all this! I'm just a contributor that just hangs around here. @dl8dtl has to review this in detail. |
I am closing this PR, as avrdude.conf has been fixed and more general work is on the way to make AVRDUDE alert to users entering implausibe SPI commands or wrong address lines. |
Makes avrdude warn about SPI programming command definitions in
.conf
with too few bits or with incorrect address bits; two levels of warning exist:Ensures that a lone
a
in SPI programming commands uses the correct address bit number (depending on its position in the command). This includesload_ext_addr
and considers the use of word addresses in flash memories and byte addresses everywhere else. The previous initialisation for lonea
was not helpful, which may be the reason why it never could have been, and indeed never was, used in.conf
files.Also repairs the
avrdude.conf.in
file for the serious errors mentioned in Issue #915, most of which avrdude now warns about.This PR addresses two types of human error that have kept appearing in the
.conf
files:a
bits or missing address bitsparent
inherited part description (in fact it zaps all parameters first)The reason why
avrdude -v
warns about superfluous address bit errors in SPI commands is that these indicate copy/paste errors that warrant a further look at the description.Limitations of the PR: The first type of human error is now thoroughly handled in that avrdude warns when it sees this behaviour, and that the current
.conf
file has been scrubbed of these errors. The second problem is only partially handled by this PR in that only some obvious errors affecting some 5 parts have been corrected in.conf
.