8
33
Fork
You've already forked blackmagic
23

Build blackmagic app to run on arm orangepi #2146

Open
opened 2025年08月30日 14:59:25 +02:00 by pistoletov1974 · 5 comments
pistoletov1974 commented 2025年08月30日 14:59:25 +02:00 (Migrated from github.com)
Copy link

Hi! I want to try running a debugging application on a single-board computer, but I get an error when I try to build it.

root@orangepipc:~/blackmagic# meson setup build -Dprobe=''
The Meson build system
Version: 0.53.2
Source dir: /root/blackmagic
Build dir: /root/blackmagic/build
Build type: native build
meson.build:196:3: ERROR: Expecting rparen got string.
 f'@bmf_base_name@_firmware',
 ^
For a block that started at 195,21
 bmf_elf = executable(
 ^

Does anyone have experience running an application on a device like this? This would be a great way to debug remote devices.

Hi! I want to try running a debugging application on a single-board computer, but I get an error when I try to build it. ``` root@orangepipc:~/blackmagic# meson setup build -Dprobe='' The Meson build system Version: 0.53.2 Source dir: /root/blackmagic Build dir: /root/blackmagic/build Build type: native build meson.build:196:3: ERROR: Expecting rparen got string. f'@bmf_base_name@_firmware', ^ For a block that started at 195,21 bmf_elf = executable( ^ ``` Does anyone have experience running an application on a device like this? This would be a great way to debug remote devices.

For that setup, you want to build BMDA - drop the -Dprobe='' part. meson setup build w/ the gpiod dev libraries installed will get you a suitable binary to work with your SBC.

For that setup, you want to build BMDA - drop the `-Dprobe=''` part. `meson setup build` w/ the gpiod dev libraries installed will get you a suitable binary to work with your SBC.
pistoletov1974 commented 2025年08月31日 12:31:02 +02:00 (Migrated from github.com)
Copy link

For that setup, you want to build BMDA - drop the -Dprobe='' part. meson setup build w/ the gpiod dev libraries installed will get you a suitable binary to work with your SBC.
I installed gpiod lib - apt install gpiod
and try to build BMDA without Dprobe option. Result is the same error.
May be problem in meson version?

root@orangepipc:~/blackmagic# meson setup build
The Meson build system
Version: 0.53.2
Source dir: /root/blackmagic
Build dir: /root/blackmagic/build
Build type: native build
meson.build:196:3: ERROR: Expecting rparen got string.
 f'@bmf_base_name@_firmware',
 ^
For a block that started at 195,21
 bmf_elf = executable(
 ^
A full log can be found at /root/blackmagic/build/meson-logs/meson-log.txt
> For that setup, you want to build BMDA - drop the `-Dprobe=''` part. `meson setup build` w/ the gpiod dev libraries installed will get you a suitable binary to work with your SBC. I installed gpiod lib - apt install gpiod and try to build BMDA without Dprobe option. Result is the same error. May be problem in meson version? ``` root@orangepipc:~/blackmagic# meson setup build The Meson build system Version: 0.53.2 Source dir: /root/blackmagic Build dir: /root/blackmagic/build Build type: native build meson.build:196:3: ERROR: Expecting rparen got string. f'@bmf_base_name@_firmware', ^ For a block that started at 195,21 bmf_elf = executable( ^ A full log can be found at /root/blackmagic/build/meson-logs/meson-log.txt ```

Yeah, per the build guides and the meson.build in the root of the project, minimum Meson version is 0.63 - you'll need to get this from PyPI.

With regards gpiod, you'll need the -dev package too (libgpiod-dev) so the build system can find the development files to link against. This is just a quirk of Debian-based distros like Raspberian.

Yeah, per the build guides and the meson.build in the root of the project, minimum Meson version is 0.63 - you'll need to get this from PyPI. With regards gpiod, you'll need the `-dev` package too (`libgpiod-dev`) so the build system can find the development files to link against. This is just a quirk of Debian-based distros like Raspberian.
pistoletov1974 commented 2025年09月03日 16:26:49 +02:00 (Migrated from github.com)
Copy link

Thank you! I was able to build the firmware and the app. I tried to connect to the AT32F437ZMT7, but it seems that the chip is not being detected correctly. Is it fully supported, or only certain versions?
UART work fine at 460800 speed-) minicom -b 460800 -D /dev/ttyBmpTarg

root@orangepipc:~/blackmagic/build# ./blackmagic -t
Black Magic Debug App v2.0.0-95-g1e3bcd8a
 for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, J-Link, FTDI (MPSSE) and WCH-Link
Using 1d50:6018 306C33683235 Black Magic Debug
 Black Magic Probe (BlackPill-F401CC) v2.0.0-95-g1e3bcd8a-dirty
Running in Test Mode
Target voltage: Unknown
Speed set to 7.000MHz for SWD
Switching from JTAG to dormant
Switching out of dormant state into SWD
DP DPIDR 0x2ba01477 (v1 rev2) designer 0x43b partno 0xba
AP 0: IDR=24770011 CFG=00000000 BASE=e00ff000 CSW=e3000040 (AHB3-AP var1 rev2)
Halt via DHCSR(01030003): success after 22ms
ROM Table: BASE=0xe00ff000 SYSMEM=1, Manufacturer 43b Partno 4c4 (PIDR = 0x04000bb4c4)
0 0x0e000e000: Generic IP component - Cortex-M4 SCS (System Control Space) (PIDR = 0x04000bb00c DEVTYPE = 0x00 ARCHID = 0x0000)
-> cortexm_probe
CPUID 0x410fc241 (M4 var 0 rev 1)
Invalid vendor ID read
LPC546xx: Part ID 0x00000000
1 0x0e0001000: Generic IP component - Cortex-M3 DWT (Data Watchpoint and Trace) (PIDR = 0x04003bb002 DEVTYPE = 0x00 ARCHID = 0x0000)
2 0x0e0002000: Generic IP component - Cortex-M3 FBP (Flash Patch and Breakpoint) (PIDR = 0x04002bb003 DEVTYPE = 0x00 ARCHID = 0x0000)
3 0x0e0000000: Generic IP component - Cortex-M3 ITM (Instrumentation Trace Module) (PIDR = 0x04003bb001 DEVTYPE = 0x00 ARCHID = 0x0000)
4 0x0e0040000: Debug component - Cortex-M4 TPIU (Trace Port Interface Unit) (PIDR = 0x04000bb9a1 DEVTYPE = 0x11 ARCHID = 0x0000)
 5 0x0e0041000: 0x00000000 <- does not match preamble (0xb105000d)
ROM Table: END
*** 1 AT32F435 M4
RAM Start: 0x20000000 length = 0x10000
RAM Start: 0x20010000 length = 0x50000
Flash Start: 0x08000000 length = 0x200000 blocksize 0x1000
Flash Start: 0x08200000 length = 0x1f0000 blocksize 0x1000
Thank you! I was able to build the firmware and the app. I tried to connect to the AT32F437ZMT7, but it seems that the chip is not being detected correctly. Is it fully supported, or only certain versions? UART work fine at 460800 speed-) minicom -b 460800 -D /dev/ttyBmpTarg ``` root@orangepipc:~/blackmagic/build# ./blackmagic -t Black Magic Debug App v2.0.0-95-g1e3bcd8a for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, J-Link, FTDI (MPSSE) and WCH-Link Using 1d50:6018 306C33683235 Black Magic Debug Black Magic Probe (BlackPill-F401CC) v2.0.0-95-g1e3bcd8a-dirty Running in Test Mode Target voltage: Unknown Speed set to 7.000MHz for SWD Switching from JTAG to dormant Switching out of dormant state into SWD DP DPIDR 0x2ba01477 (v1 rev2) designer 0x43b partno 0xba AP 0: IDR=24770011 CFG=00000000 BASE=e00ff000 CSW=e3000040 (AHB3-AP var1 rev2) Halt via DHCSR(01030003): success after 22ms ROM Table: BASE=0xe00ff000 SYSMEM=1, Manufacturer 43b Partno 4c4 (PIDR = 0x04000bb4c4) 0 0x0e000e000: Generic IP component - Cortex-M4 SCS (System Control Space) (PIDR = 0x04000bb00c DEVTYPE = 0x00 ARCHID = 0x0000) -> cortexm_probe CPUID 0x410fc241 (M4 var 0 rev 1) Invalid vendor ID read LPC546xx: Part ID 0x00000000 1 0x0e0001000: Generic IP component - Cortex-M3 DWT (Data Watchpoint and Trace) (PIDR = 0x04003bb002 DEVTYPE = 0x00 ARCHID = 0x0000) 2 0x0e0002000: Generic IP component - Cortex-M3 FBP (Flash Patch and Breakpoint) (PIDR = 0x04002bb003 DEVTYPE = 0x00 ARCHID = 0x0000) 3 0x0e0000000: Generic IP component - Cortex-M3 ITM (Instrumentation Trace Module) (PIDR = 0x04003bb001 DEVTYPE = 0x00 ARCHID = 0x0000) 4 0x0e0040000: Debug component - Cortex-M4 TPIU (Trace Port Interface Unit) (PIDR = 0x04000bb9a1 DEVTYPE = 0x11 ARCHID = 0x0000) 5 0x0e0041000: 0x00000000 <- does not match preamble (0xb105000d) ROM Table: END *** 1 AT32F435 M4 RAM Start: 0x20000000 length = 0x10000 RAM Start: 0x20010000 length = 0x50000 Flash Start: 0x08000000 length = 0x200000 blocksize 0x1000 Flash Start: 0x08200000 length = 0x1f0000 blocksize 0x1000 ```

Sorry for not getting back to you sooner! Having had a check of the AT32F4 parts and how the support works - looks like there's no real way to tell the F435 and F437 apart and they work the same for all intents and purposes to BMD. Same Flash, same controller, just different names and peripherals. So this is working exactly as it should, and your part is fully supported.

Sorry for not getting back to you sooner! Having had a check of the AT32F4 parts and how the support works - looks like there's no real way to tell the F435 and F437 apart and they work the same for all intents and purposes to BMD. Same Flash, same controller, just different names and peripherals. So this is working exactly as it should, and your part is fully supported.
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#2146
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?