-
Notifications
You must be signed in to change notification settings - Fork 136
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
Ignore target memories not present in avrdude.conf #1036
Conversation
I think this is useful.
|
The only thing I wonder is whether it makes sense to have an additional option for this. Otherwise it's fine. |
@MCUdude I like permissive behaviour and support this PR, in principle. I don't "get" the change in main.c, and I would leave main.c unchanged. I think I know what's intended: unless -V is given, any I have in mind (should create an issue lest I forget) to propose a change of how verification is done. This automatic insertion of AVRDUDE has a great overall structure of encapsulation and modularisation, but this comes at a price where the individual units often don't know what the overall task is (like verify/do not verify). Having spotted similar problems in other parts (switch off trailing-0xff optimisation, do not complain that verification fails when the memory cannot be read owing to a such configured bootloader, etc) I would encourage all user options to be global. Global variables have been vilified in the 70s and 80s but really, they can be quite helpful. [edit: should read in the 80s and 90s, not 70s and 80s] |
Good question. So, If I mistype a memory, say a fuse, could a situation arise where being permissive damages the part (or my expectation)? |
And here is another reason why: |
The idea was to prevent the warning message to be printed twice when trying to write to an invalid memory space. Is there a different and hopefully better way we can handle this? (Without changes to main.c)
|
Yes, do nothing here and wait until Issue #1044 is solved (or solve that first). |
Assuming PR #1051 is accepted, one could change this PR to make The double warning is no longer an issue should PR #1051 be accepted. |
I'm closing this in favor of #1053, which provides a more elegant fix than this PR. |
I'm just throwing this one in to check if there's any interest. Please close if permissive "features" like this are out of the question.
This is basically a more generic approach to #981.
Instead of terminating, it will now ignore a memory passed to Avrdude using
-U
, but not present in avrdude.conf.The changes in main.c is there to prevent Avrdude from both trying to write and then verify a memory not present, which would lead to duplicated warning messages
Without this PR:
With this PR: