west: runners: blackmagicprobe: fix on windows
We need to give gdb slash-separated paths to ELF files on Windows. Just make sure we always have slash-separated paths. We use this technique in various places around the tree. Fixes: #50789 Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
98580f1c22
commit
98bcc2d88e
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
# https://github.com/blacksphere/blackmagic/wiki
|
||||
|
||||
import signal
|
||||
from pathlib import Path
|
||||
|
||||
from runners.core import ZephyrBinaryRunner, RunnerCaps
|
||||
|
||||
|
@ -15,7 +16,11 @@ class BlackMagicProbeRunner(ZephyrBinaryRunner):
|
|||
def __init__(self, cfg, gdb_serial, connect_srst=False):
|
||||
super().__init__(cfg)
|
||||
self.gdb = [cfg.gdb] if cfg.gdb else None
|
||||
self.elf_file = cfg.elf_file
|
||||
# as_posix() because gdb doesn't recognize backslashes as path
|
||||
# separators for the 'load' command we execute in bmp_flash().
|
||||
#
|
||||
# https://github.com/zephyrproject-rtos/zephyr/issues/50789
|
||||
self.elf_file = Path(cfg.elf_file).as_posix()
|
||||
self.gdb_serial = gdb_serial
|
||||
if connect_srst:
|
||||
self.connect_srst_enable_arg = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue