Skip to content

Conversation

kfessel
Copy link
Contributor

@kfessel kfessel commented Feb 24, 2020

Reverts #13179

this line in boards/common/stm32/dist/stm32f7.cfg
flash bank $_FLASHNAME.riot stm32f2x 0x08000000 0 0 0 $_TARGETNAME

leads to misinformation of openocd about the memory layout (there is an extra flash region at the same place) and since gdb gets its memory map information from openocd it will detect Overlapping regions in memory map and will not use it. this will hamper debugging.

gdb: warning: Overlapping regions in memory map: ignoring

For me it was:
gdb tells openocd to set soft break points, if it does not know about the memory map, which do not work (in flash regions?).

older versions of openocd (current ubuntu) ignore if gdb tells them to set soft breakpoints and decide on their own depending o the address. newer version respect what gdb tells them to do.

i am not sure how to fix the issue that #13179 tried to fix but i think i should be in openocd.sh

which states:

# Probing can fail when the board is in a non flashable state or
# maybe probing would need a different init procedure.
# At least, currently fallback to returning the configured value

i think the nucleo-f767zi is in a non flashable state with its reset being pulled there for the procedure should be pull the reset the release it then read the flash information

flash probe 0 allways fails for the nucleo-f767zi in that with the current procedure

the flash procedure does it like this

${OPENOCD_EXTRA_RESET_INIT} \
-c 'init' \
-c 'targets' \
-c 'reset halt' \

after this the flash is accessible and the flash probe 0 should not fail

@benpicco benpicco added Area: boards Area: Board ports Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Feb 24, 2020
@kfessel
Copy link
Contributor Author

kfessel commented Feb 24, 2020

in my test the procedure with added:

-c 'targets' \
-c 'reset halt' \

is working for RIOT/tests/riotboot on the nucleo-f767zi
without it, it failed after the patch was reverted

for #13179 this was the test which lead to it beeing pulled

but i am not sure if i should open an extra PR or add it to this

@kfessel
Copy link
Contributor Author

kfessel commented Feb 28, 2020

handled with #13470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants