1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-23 05:23:50 +01:00

10 Commits

Author SHA1 Message Date
Bas Stottelaar
9efc41dbf4 dist/tools/bmp: support newer firmware versions
Some commands have been renamed since version 1.9.0 and 1.10.0.

To still provide compatibility with older debuggers, allow one to
override the firmware version assumed. A dependency for packaging
was added for comparing version numbers.
2024-12-23 23:00:14 +01:00
Bas Stottelaar
96dbd33507 dist/tools/bmp: revisit probe detection
The tool would always exit if no probes are detected, even if `--port`
was provided. By making this assertion conditional, it becomes
possible to override the port in any case.

Use cases for this is running the BMP externally, and connecto to it
via ser2net, for example.
2024-12-23 23:00:14 +01:00
Bas Stottelaar
e55da6ad82 dist/tools/bmp: add logging
Print action to console for reset and flash action, similar to the
erase action.
2024-12-23 22:58:20 +01:00
Bas Stottelaar
c57fe9bd79 dist/tools/bmp: restructure to meet conventions
Per conventions:

- Put main code in a function.
- Move argument parsing to separate function to not pollute global
  scope. This does mean that all invocations now need `args` as an
  additional argument.
2024-12-23 22:58:20 +01:00
Bas Stottelaar
7c36145eea dist/tools/bmp: replace distutils with shutil
Python 3.12 removed the `distutils` package, which is only used for
checking if GDB is available on PATH.

The `shutil.which` method does the same, and is available since
Python 3.3.
2024-12-23 22:58:20 +01:00
Marian Buschsieweke
c56f50a2eb
dist/tools/bmp: fix target parsing
Either GDB or pygdbmi changed behavior to trim off whitespace following
the message, resulting in the `\\n` at the end of the regex no longer
matching. This replaces the `\\n` with `\s*` to match both old and new
output.

Fixes: https://github.com/RIOT-OS/RIOT/issues/20604
2024-05-09 12:56:01 +02:00
Alain Péteut
25df307ea1 dist/tools: Use /usr/bin/env to lookup Python.
Fixes some Python scripts which didn't use `/usr/bin/env`.
2023-04-10 14:39:42 +02:00
Alexandre Abadie
438464b5fa
dist/tools/bmp: fix flake8 issue E741
E741: ambiguous variable name
2021-01-07 19:11:20 +01:00
Marian Buschsieweke
71b2860322
dist/tools/bmp: Fix flashing with pygdbmi 0.10.0
The flashing script for the black magic probe stopped working with pygdbmi in
version 0.10.0 due to an API change. This adapts the code to first try
initialization with the old pygdbmi API (as before), but tries again with the
new API if that fails.
2020-11-03 16:33:46 +01:00
Maximilian Deubel
30f12c9058 Add helper script for Black Magic Probe
This script can detect [Black Magic Probes](https://github.com/blacksphere/blackmagic/wiki) and act as a flashloader (and more).
It is compatible with Linux and macOS.

All important options that can be set via the monitor command are available as arguments.

Makefiles for using `make flash`, `make erase`, `make debug` and `make term` with the script are included.
2019-10-15 12:58:24 +02:00