boards/nucleo-f767zi: add correct flash bank openocd config [backport 2020.01]#13219
Merged
fjmolinas merged 2 commits intoRIOT-OS:2020.01-branchfrom Jan 28, 2020
Conversation
Allow specifying index of `flash bank` to read configuration from in cases where the configuration provided in openocd is incorrect. This is the case for the majority of stm32 boards where it relies on `flash probe` to get the correct value. (cherry picked from commit 53f60db)
openocd configuration file for `stm32f7` relies on probing to find out FLASH_ADDR. On nucleo-f767zi board probing (`flash probe 0`) fails when `srst` is asserted, but `srst` needs to be asserted to be able to flash the `BOARD` when sleeping or after a hardfault. To circumvent this in boards/common/stm32/dist/stm32f7.cfg we define a new flash bank with the appropriate fash start address and specify that this is the flash bank to be used as default configuration instead of the default by setting FLASH_BANK=4 (cherry picked from commit 1dec5ba)
This was referenced Feb 28, 2020
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #13179
Contribution description
This pr fixes flashing bin files on
nucleo-f767zi, this issue is not present on allnucleo-f7*boards.Flashing bin files on
nucleo-f767zifails for two reasons:Playing around with
openocd.shI have found thatflash probe 0fails on thisBOARDwhensrstisasserted, but ifsrstisdeassertedprobing fails anyway if the device ishardfaultedor insleep mode.I couldn't find the reason why probing fails in this case, but to keep asserting
srstI added the correctFLASH_ADDRin ourstm32f7.cfgfile and addedFLASH_BANKto allow specifying whichflash bankto use as configuration input and not use the one intarget/stm32f7x.cfgTesting procedure
make -C tests/riotboot/ BOARD=nucleo-f767zi flash