-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[feature] --mass-erase for st-flash write commands #1397
Conversation
My thoughts on open points:
In general, I think it’s not worth adding mass_erase field to struct _stlink. It would be nice to add a erase type parameter to the stlink_write_flash and stlink_mwrite_flash functions. |
c3c9a59
to
8cc6396
Compare
I changed the the type of the I think it's a bit unclean in the regard that calling With the introduction of the Regarding the Do you imagine a command like: |
@hannesweisbach |
I changed the I have NO_ERASE yet to implement. |
@hannesweisbach Thank you very much for the update. There is no need to squash the commits. An upcoming merge will add all separate changes at once and basically has the same effect seen from the perspective of the destination branch. |
Yes, I know. I'm always unhappy with the resulting commit message though. Atleast on GitLab. I haven't done merge squashes with the UI on Github. |
Force a flash mass erase instead a flash sector erase when programming the flash by providing a '--mass-erase' flag for the 'write' and 'erase' commands. Signed-off-by: Hannes Weisbach <weisbach@neosat.de>
93bfa23
to
1fbf1d9
Compare
Sorry for the delay. I squashed the commits and cleaned the commit message up (no code changes). |
@hannesweisbach: I've noticed that you force pushed in order to squash. It shall be ok here, but please take into account for future contributions that this is not considered a good practise for technical reasons: https://docs.github.com/de/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests. |
Hello,
I have an STM32H7 where flash verification fails (probably somehow related to #1249 and/or #1294). #1238 indicates that a
--mass-erase
-flag forst-flash write
would be welcome.Open points:
I useChanged to int32_t._Bool
to store flags, instead ofint32_t
, which conveys better the meaning of the variable. However, I have no issue changing toint32_t
or something similar to keep the codebase uniform.Should passing--mass-erase
toread
,erase
, andreset
commands issue an error? As it has no meaning nor impact on those commands, it is currently silently ignored.stlink --mass-erase erase
implemented.This PR is against theBase branch changed todevelop
branch, as indicated by the Contributing Guidelines. Is this correct?testing
.Best regards,
Hannes
(Closes #1238) (Closes #1366)