7
31
Fork
You've already forked blackmagic
23

STM32H7RSx #2081

Closed
opened 2025年02月18日 09:04:33 +01:00 by oclyke · 3 comments
oclyke commented 2025年02月18日 09:04:33 +01:00 (Migrated from github.com)
Copy link

Please report unknown device with Designer 0x20 Part ID 0x4850

Hi all. I am developing on a newer ST part. After finding that OpenOCD did not support this MCU I figured I'd give it a try on BMP.

Family: STM32H7RSx
MCU: STM3H7S3x8
Board: Nucleo-H7S3L8
Interface: SWD

I don't really understand all of what it takes to properly config a new target. Maybe I can start with an openocd config and work my way to BMP.

P.s. thanks to all you contributors. Tools like BMP and OpenOCD are so much better to work with than the gimmicky all-in-one IDEs.

`Please report unknown device with Designer 0x20 Part ID 0x4850` Hi all. I am developing on a newer ST part. After finding that OpenOCD did not support this MCU I figured I'd give it a try on BMP. Family: STM32H7RSx MCU: STM3H7S3x8 Board: Nucleo-H7S3L8 Interface: SWD I don't really understand all of what it takes to properly config a new target. Maybe I can start with an openocd config and work my way to BMP. P.s. thanks to all you contributors. Tools like BMP and OpenOCD are so much better to work with than the gimmicky all-in-one IDEs.

Before we can hope to help here:

  1. What version of the firmware are you trying to use?
  2. Did you try latest main and if so, did you make sure you used a configuration that enables the STM parts?

Regarding being able to use OpenOCD configurations as a basis.. the way that OOCD works is very different. BMD does full automatic discovery and then dispatches to part-specific routines based on what has been discovered. The STM32H7R parts should at least be detected generically and be debuggable on main even if they aren't detected as H7 series parts directly so their Flash gets registered and made rewritable.

Support for these parts should be able to be added to the existing H7 support (src/targets/stm32h7.c), and the target drivers guide documents how the interfaces in question work. You can also use the efforts of other contributors such as zyp as inspiration: https://github.com/zyp/blackmagic/tree/stm32h7rs

Before we can hope to help here: 1) What version of the firmware are you trying to use? 2) Did you try latest `main` and if so, did you make sure you used a configuration that enables the STM parts? Regarding being able to use OpenOCD configurations as a basis.. the way that OOCD works is very different. BMD does full automatic discovery and then dispatches to part-specific routines based on what has been discovered. The STM32H7R parts should at least be detected generically and be debuggable on `main` even if they aren't detected as H7 series parts directly so their Flash gets registered and made rewritable. Support for these parts should be able to be added to the existing H7 support (src/targets/stm32h7.c), and [the target drivers guide](https://black-magic.org/hacking/target-drivers.html) documents how the interfaces in question work. You can also use the efforts of other contributors such as zyp as inspiration: https://github.com/zyp/blackmagic/tree/stm32h7rs
oclyke commented 2025年02月21日 09:20:02 +01:00 (Migrated from github.com)
Copy link

Thanks dragonmux.

Original report was made with a recent copy of prebuilt firmware.

u@h:~/Desktop/tmp/blackmagic✨ bmputil info
Found: Black Magic Probe v1.10.2
 Serial: 72AE07F3
 Port: 0-1

Thanks to your prompt I built fw from main (v2.0.0-rc1 woo!) and flashed.

u@h:~/Desktop/tmp/blackmagic✨ bmputil flash ./build/blackmagic_native_firmware.elf
Found: Black Magic Probe v1.10.2
 Serial: 72AE07F3
 Port: 0-1
Erasing flash...
Flashing...
 100% |██████████████████████████████████████████████████| 118.63 KiB/118.63 KiB [4.28 KiB/s 28s] [2025年02月20日T21:35:42Z WARN bmputil] Possibly spurious error from OS at the very end of flashing: Black Magic Probe device did not come back online (invalid firmware?)
 Caused by: rusb: Other error
 
Black Magic Probe successfully rebooted into firmware version v2.0.0-rc1-47-g3148437e-dirty
u@h:~/Desktop/tmp/blackmagic✨bmputil info
Found: Black Magic Probe v2.0.0-rc1-47-g3148437e-dirty
 Serial: 72AE07F3
 Port: 0-1

With the new firmware loaded I got the same message as before (ok, expected) and could see that as you suggested the probe seems to have connected to the AP just fine. I suppose your point is that without a positive ID on the device, and corresponding firmware support, it is impossible to perform flash operations.

u@h:~/Desktop/tmp/blackmagic✨ gdb
GNU gdb (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 15.2.90.20241130-git
...
(gdb) tar ext /dev/cu.usbmodem72AE07F31
Remote debugging using /dev/cu.usbmodem72AE07F31
(gdb) mon swd
Target voltage: 3.3V
Please report unknown device with Designer 0x20 Part ID 0x4850
Available Targets:
No. Att Driver
*** 1 Unknown ARM Cortex-M Designer 0x20 Part ID 0x4850 M7
(gdb) 

I started down the path of adding flash support (following zyp's example, and cross-referencing with RM0477) and it generally looked pretty straightforward.

Then there was a crash between my (present) skill ceiling and my (present) time constraints. My application requires flash memory in excess of the 64 KB built in to the STM32H7Rx/7Sx parts. For the time being I have to take an off-ramp.

Leaving this report here to encourage others. The BMP firmware and build system is very nicely maintained and easy to get started with! Go ahead and give it a shot.

(maybe I'll find time to come back and finish the job... I sure would be interested in how to operate the FMC peripheral through the debug probe and gain access to the XSPI memory regions.)

Thanks dragonmux. Original report was made with a recent copy of prebuilt firmware. ```sh u@h:~/Desktop/tmp/blackmagic✨ bmputil info Found: Black Magic Probe v1.10.2 Serial: 72AE07F3 Port: 0-1 ``` Thanks to your prompt I built fw from main (v2.0.0-rc1 woo!) and flashed. ``` u@h:~/Desktop/tmp/blackmagic✨ bmputil flash ./build/blackmagic_native_firmware.elf Found: Black Magic Probe v1.10.2 Serial: 72AE07F3 Port: 0-1 Erasing flash... Flashing... 100% |██████████████████████████████████████████████████| 118.63 KiB/118.63 KiB [4.28 KiB/s 28s] [2025年02月20日T21:35:42Z WARN bmputil] Possibly spurious error from OS at the very end of flashing: Black Magic Probe device did not come back online (invalid firmware?) Caused by: rusb: Other error Black Magic Probe successfully rebooted into firmware version v2.0.0-rc1-47-g3148437e-dirty u@h:~/Desktop/tmp/blackmagic✨bmputil info Found: Black Magic Probe v2.0.0-rc1-47-g3148437e-dirty Serial: 72AE07F3 Port: 0-1 ``` With the new firmware loaded I got the same message as before (ok, expected) and could see that as you suggested the probe seems to have connected to the AP just fine. I suppose your point is that without a positive ID on the device, and corresponding firmware support, it is impossible to perform flash operations. ```sh u@h:~/Desktop/tmp/blackmagic✨ gdb GNU gdb (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 15.2.90.20241130-git ... (gdb) tar ext /dev/cu.usbmodem72AE07F31 Remote debugging using /dev/cu.usbmodem72AE07F31 (gdb) mon swd Target voltage: 3.3V Please report unknown device with Designer 0x20 Part ID 0x4850 Available Targets: No. Att Driver *** 1 Unknown ARM Cortex-M Designer 0x20 Part ID 0x4850 M7 (gdb) ``` I started down the path of adding flash support (following zyp's example, and cross-referencing with [RM0477](https://www.st.com/resource/en/reference_manual/rm0477-stm32h7rx7sx-armbased-32bit-mcus-stmicroelectronics.pdf)) and it generally looked pretty straightforward. Then there was a crash between my (present) skill ceiling and my (present) time constraints. My application requires flash memory in excess of the 64 KB built in to the STM32H7Rx/7Sx parts. For the time being I have to take an off-ramp. Leaving this report here to encourage others. The BMP firmware and build system is very nicely maintained and easy to get started with! Go ahead and give it a shot. (maybe I'll find time to come back and finish the job... I sure would be interested in how to operate the FMC peripheral through the debug probe and gain access to the XSPI memory regions.)

This has now been addressed by the support merged in #2170 - so closing as complete.

This has now been addressed by the support merged in #2170 - so closing as complete.
Sign in to join this conversation.
No Branch/Tag specified
main
fix/pre-bmp-v3-cross-file-cleanup
feature/bmda-remote-comms
ALTracer/feature/aarch64-ident
feature/better-meson-optimisation-handling
feature/am335x-support
feature/esp32-c3-support
feature/cortex-ar-software-breakpoints
feature/unit-testing
feature/windows-usb-serial-interface-naming
fix/bmp-external-spi
ALTracer/feature/bluepillplus-platform
ALTracer/feature/at32f43x-unrdp
feature/const-correctness
ALTracer/feature/fault_handlers
ALTracer/feature/hazard3-ice40-support
fix/ci-cleanup
ALTracer/fix/gdb-10-12-thread
ALTracer/feature/blackpill-f4-adc
ALTracer/fix/cortex-desc-allocfail-report
ALTracer/feature/spi-perf
ALTracer/feature/calibrate_swd
ALTracer/feature/blank-check
feature/avr
v2.0
v1.9
v1.10
v1.8
v2.1.0-rc1
v2.0.0
v2.0.0-rc2
v2.0.0-rc1
v1.9.3
v1.10.2
v1.10.1
v1.10.0
v1.10.0-rc1
v1.10.0-rc0
v1.9.2
v1.8.3
v1.9.1
v1.9.0
v1.9.0-rc1
v1.9.0-rc0
v1.8.2
v1.8.1
v1.8.0
v1.7.1
v1.7
v1.6.2-rc1
1.6.2-rc0
v1.6.1
v1.6
v1.6-rc1
v1.6-rc0
production_01
production_00
Labels
Clear labels
BMD App
Black Magic Debug App (aka. PC hosted) (not firmware)
BMP Firmware
Black Magic Probe Firmware (not PC hosted software)
Bug
Confirmed bug
Build system
Build system
Can't reproduce
Maintainers can't reproduce this problem
CI
Continuous Integration System
Contribution wanted
User contributions welcome
Documentation
Project documentation
Draft
Work in progress draft
Duplicate
This issue or pull request already exists
Enhancement
General project improvement
Feedback wanted
Requires additional submitter feedback
Foreign Host Board
Non Native hardware to runing Black Magic firmware on
GDB
Issue/PR related to GDB
Good first issue
Good for newcommers
HwIssue Mitigation
Solving or mitigating a Hardware issue in Software
Information Needed
Maintainers need more information
NativeHardware
Official Black Magic Debug Hardware
New Host Board
New hardware to run Black Magic firmware on
New Target
New debug target
Off Topic
Something that does not involve the project in any way
Potential Bug
A potential, unconfirmed or very special circumstance bug
Regression
Bug caused by a regression
User Interest Needed
More user interest required before consideration
User Testing Needed
Looking for user testing reports
Won't fix
Outside of the project scope or works as intended
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blackmagic-debug/blackmagic#2081
Reference in a new issue
blackmagic-debug/blackmagic
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?