Skip to content

Commit c0653a3

Browse files
committed
Start adding picoprobe as debug tool
1 parent 77e0d3a commit c0653a3

File tree

5 files changed

+5630
-68
lines changed

5 files changed

+5630
-68
lines changed

boards/nanorp2040connect.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"cmsis-dap",
4949
"jlink",
5050
"raspberrypi-swd",
51-
"picotool"
51+
"picotool",
52+
"picoprobe"
5253
]
5354
},
5455
"url": "https://blog.arduino.cc/2021/01/20/welcome-raspberry-pi-to-the-world-of-microcontrollers/",

boards/pico.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"cmsis-dap",
4545
"jlink",
4646
"raspberrypi-swd",
47-
"picotool"
47+
"picotool",
48+
"picoprobe"
4849
]
4950
},
5051
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

builder/main.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,15 +356,25 @@ def _jlink_cmd_script(env, source):
356356
openocd_args.extend(
357357
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
358358
)
359-
openocd_args.extend([
360-
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
361-
board.get("upload.offset_address", "")
362-
])
359+
if "uploadfs" in COMMAND_LINE_TARGETS:
360+
# filesystem upload. use FS_START.
361+
openocd_args.extend([
362+
"-c", "program {$SOURCE} ${hex(FS_START)} verify reset; shutdown;"
363+
])
364+
else:
365+
# normal firmware upload. flash starts at 0x10000000
366+
openocd_args.extend([
367+
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
368+
board.get("upload.offset_address", "0x10000000")
369+
])
363370
openocd_args = [
364371
f.replace("$PACKAGE_DIR", platform.get_package_dir(
365372
"tool-openocd-raspberrypi") or "")
366373
for f in openocd_args
367374
]
375+
# use ELF file for upload, not bin (target_firm). otherwise needs
376+
# offset 0x10000000
377+
#upload_source = target_elf
368378
env.Replace(
369379
UPLOADER="openocd",
370380
UPLOADERFLAGS=openocd_args,

0 commit comments

Comments
 (0)