-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix for breakpoints on F7 #340
Comments
The number of code breakpoint comparators and the number of literal comparators can/should? be read from the FP_CTRL register. |
In RM0385, reference manual for STM32F74xx, section 40.12 it says: |
For the record, I'm seeing a bit of weirdness with this "fix": on some breakpoints, it stops on the instruction before the breakpoint address, which means gdb can't continue until the breakpoint is deleted. I haven't had any time to look into this yet, just noting it here in case someone else is seeing the same thing. (Or knows off-hand what the issue might be.) |
Can you check if the addresses where the halt is before the intended bp are halfword or word aligned? The old brk->type field in the FP_COMP register (bits 30:31) could be used to select address match against upper or lower halfword of the always 4 byte aligned address, since bits 0:1 were not used. Now this has been removed so perhaps the FP_COMP register uses halfword aligned addresses. In that case only the first bit of the address should be masked, not the first two bits as is done now. |
I couldn't reproduce the breakpoint issue, had no problem stopping at both word-aligned and halfword-aligned addresses on the latest build of my board. Hardware problem, I guess? Who knows.. |
Oh, ha. I missed the bit at the beginning of update_code_breakpoint() that was clearing the two low bits. I changed that to
and it works much better now. :) |
I have created a pull request for M7 breakpoint handling, please test on M7 but also on other targets. |
As all the code has been merged into master, this problem should not exist anymore. But feel free to open a new issue if still something is remaining. Thanks for all the effort. |
Fixed with #341. |
I had to make a couple of tweaks to get breakpoints working on the F7 (custom board with an STM32F746). I can't find anything in the Cortex-M7 docs about the type flags disappearing from the F_COMP register, but it only works if I remove it. (I found this in a patch submitted to OpenOCD.) I figured I'd let someone with more experience with the st-util code add the checking for cpu type and all that..
The text was updated successfully, but these errors were encountered: