-
Notifications
You must be signed in to change notification settings - Fork 2k
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
boards/stm32f3discovery: fix openocd config to flash from invalid state #11550
boards/stm32f3discovery: fix openocd config to flash from invalid state #11550
Conversation
@aabadie I think you may have more insight on this, how to do a failing test and what should be changed in general. It would be nice to add a testable firmware to show it must be fixed in general. |
If it is any help I have a commit and firmware (though it is for the nucleo-l073rz, maybe it would also work for your board) documented in #10343. |
@MrKevinWeiss unfortunately it does not make it non flashable |
I mean, it isn't the worst thing if we can't break the board 😄 |
It only breaks the flasher configuration, not the board :) |
3a18eaa
to
81f6323
Compare
Now depending on #11976 |
e579f97
to
1f6f008
Compare
Rebased and kept only the update after #11976 was merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this PR and couldn't find any obvious regression. My main problem with testing is to find a firmware that avoid reflashing the board after. I tried to toggle the CPU to deep sleep, but OpenOCD is still able to reflash.
In any case, the changes strengthen the actual configuration. So ACK
Please fix the minor typo reported and squash directly.
@@ -8,5 +8,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk | |||
DEBUG_ADAPTER ?= stlink | |||
STLINK_VERSION ?= 2 | |||
|
|||
# The board can become un-flashable after a some execution, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/after a some execution/after some execution/
Somehow I think it would need to be a firmware that does it, or a hardfault as it was for the Because if openocd resets the board, and manages to start writing before it hardfaults or sleep, it would work. |
When flashing some applications the flasher sometimes gets stuck which prevents flashing after. It may be from a specific firmware or operation but do not have one yet. Connect with reset asserted fix flashing from this state. It was found after the `stm32f3discovery` get stuck in a non-flashable mode after some firmwares.
f5bafa0
to
f5f275b
Compare
Typo fixed and squashed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK and go (when Murdock is ready ;) )
Thank you for the review. |
Contribution description
When flashing some applications the flasher sometimes gets stuck which
prevents flashing after.
It may be from a specific firmware or operation but do not have one yet.
Connect with reset asserted fix flashing from this state.
It was found after the
stm32f3discovery
get stuck in a non-flashable modeafter some firmwares.
Testing procedure
TODO: find a firmware that prevents re-flashing it
Flashing still works.
It should also fix flashing from invalid state but I do not know any way of re-creating it.
Issues/PRs references
Found while running the test suite on the board in #10870
Depends on #11976