Detailed description
- This is a small bugfix.
- The existing problem is
CSR access failed: 4in new code in #2194 - The PR solves that by reordering the clearing of triggers to happen after the halt in
riscv_attach(). Detach is fine.
Tested on blackpill-f411ce against Icebreaker v1.0e (Hazard3 rv32ic) running Hazard3-minimal semihosting test in SPRAM, and
on BMDA via d6e7:3507 Sipeed Slogic Combo8 CMSIS-DAP against Sipeed Longan Nano (GD32VF1 rv32imac) running some default demo (likely badapple).
Your checklist for this pull request
- I've read the Code of Conduct
- I've read the guidelines for contributing to this repository
- It builds for hardware native (see Building the firmware)
- It builds as BMDA (see Building the BMDA)
- I've tested it to the best of my ability
- My commit messages provide a useful short description of what the commits do
Closing issues
## Detailed description
* This is a small bugfix.
* The existing problem is `CSR access failed: 4` in new code in https://codeberg.org/blackmagic-debug/blackmagic/pulls/2194
* The PR solves that by reordering the clearing of triggers to happen after the halt in `riscv_attach()`. Detach is fine.
Tested on `blackpill-f411ce` against Icebreaker v1.0e (`Hazard3 rv32ic`) running Hazard3-minimal semihosting test in SPRAM, and
on BMDA via d6e7:3507 Sipeed Slogic Combo8 CMSIS-DAP against Sipeed Longan Nano (`GD32VF1 rv32imac`) running some default demo (likely badapple).
## 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