Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 305d4d0

Browse files
committed
meson: Added logic to find the newer bmputil-cli and handle how it does firmware Flashing
1 parent 3b834d1 commit 305d4d0

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

meson.build

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,31 @@ If you did not touch the build system this is not your fault, please report it
259259
## Utility targets
260260
## _______________
261261

262-
# Black Magic Probe Firmware Manager
263-
bmputil = find_program('bmputil', required: false)
262+
# Black Magic Probe companion utility
263+
bmputil = find_program('bmputil-cli', required: false)
264264
if bmputil.found()
265265
message('Adding target for firmware update')
266266

267267
# Firmware update target
268268
run_target(
269269
'flash',
270-
command: [bmputil, 'flash', bmf_elf.full_path()],
270+
command: [bmputil, 'probe', 'update', bmf_elf.full_path()],
271271
depends: bmf_elf,
272272
)
273+
# If we couldn't find the utility, look for the older pre-v1.0 version of it
274+
else
275+
# Black Magic Probe Firmware Manager
276+
bmputil = find_program('bmputil', required: false)
277+
if bmputil.found()
278+
message('Adding target for firmware update')
279+
280+
# Firmware update target
281+
run_target(
282+
'flash',
283+
command: [bmputil, 'flash', bmf_elf.full_path()],
284+
depends: bmf_elf,
285+
)
286+
endif
273287
endif
274288
endif
275289

0 commit comments

Comments
 (0)