Detailed description
- This is a small new feature, existing code from cortexar.c
- The problem is Cortex-A/R Breakpoint Unit count is reported in logs but Cortex-M FPB (or BPU) slot count is not (and DWT). Other debug servers print them.
- This PR solves it by copying a couple lines from cortexar.c into cortexm.c
This is an old patch of mine from almost two years ago, related to some hardware breakpoint funkiness on STM32F411 DUT, then fixed by PR2010 or something. I still believe it is beneficial to report whether the processor core (which BMP attaches to) happens to offer 4, 6 or 8 hardware breakpoint slots. Even riscv_debug.c:riscv_hart_discover_triggers() does it.
Tested on BMDA, example -tv 5 output is
*** 1 AT32F403A/407 M4
Attaching to target..
Halting target
Target halted: Halt requested
AT32F403A/407 M4 core has 6 breakpoint and 4 watchpoint slots available
Attach success
Your checklist for this pull request
Closing issues
## Detailed description
* This is a small new feature, existing code from cortexar.c
* The problem is Cortex-A/R Breakpoint Unit count is reported in logs but Cortex-M FPB (or BPU) slot count is not (and DWT). Other debug servers print them.
* This PR solves it by copying a couple lines from cortexar.c into cortexm.c
This is an old patch of mine from almost two years ago, related to some hardware breakpoint funkiness on STM32F411 DUT, then fixed by PR2010 or something. I still believe it is beneficial to report whether the processor core (which BMP attaches to) happens to offer 4, 6 or 8 hardware breakpoint slots. Even `riscv_debug.c:riscv_hart_discover_triggers()` does it.
Tested on BMDA, example -tv 5 output is
```
*** 1 AT32F403A/407 M4
Attaching to target..
Halting target
Target halted: Halt requested
AT32F403A/407 M4 core has 6 breakpoint and 4 watchpoint slots available
Attach success
```
## Your checklist for this pull request
* [x] I've read the [Code of Conduct](https://codeberg.org/blackmagic-debug/blackmagic/src/CODE_OF_CONDUCT.md)
* [x] I've read the [guidelines for contributing](https://codeberg.org/blackmagic-debug/blackmagic/src/CONTRIBUTING.md) to this repository
* [x] It builds for hardware native (see [Building the firmware](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-the-firmware))
* [x] It builds as BMDA (see [Building the BMDA](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-app))
* [x] I've tested it to the best of my ability
* [x] My commit messages provide a useful short description of what the commits do
## Closing issues