Detailed description
This PR implements basic support for HDSC HC32F4xx (Cortex-M4) series.
HC32F460 documentation page: https://www.xhsc.com.cn/product/1246.html
A few important notes:
- I was able to buy only the HC32F460JETA, so testing was done only on this MCU.
- About target detection: I could not find in the documentation or in the BSP any mention that this target has any hint of an IDCODE-like register.
So the detection of HC32F4xx is based on the UID registers (EFM_UQID0..2) being not 0x00 and not 0xFF.
I know this is not a great method, I’m not happy about it either, but I couldn’t come up with another way.
For the same reason I puthc32f4_probeincortexm.cat the very end of the list. - This MCU, as far as I can tell, supports programming only one 32-bit word at a time (Section 7.6 in the Series Reference Manual).
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 PR implements basic support for HDSC HC32F4xx (Cortex-M4) series.
HC32F460 documentation page: https://www.xhsc.com.cn/product/1246.html
A few important notes:
- I was able to buy only the HC32F460JETA, so testing was done only on this MCU.
- About target detection: I could not find in the documentation or in the BSP any mention that this target has any hint of an IDCODE-like register.
So the detection of HC32F4xx is based on the UID registers (EFM_UQID0..2) being not 0x00 and not 0xFF.
I know this is not a great method, I’m not happy about it either, but I couldn’t come up with another way.
For the same reason I put `hc32f4_probe` in `cortexm.c` at the very end of the list.
- This MCU, as far as I can tell, supports programming only one 32-bit word at a time (Section 7.6 in the Series Reference Manual).
## 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