Skip to content

Commit

Permalink
Start adding picoprobe as debug tool
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgerhardt committed Aug 8, 2021
1 parent 77e0d3a commit c0653a3
Show file tree
Hide file tree
Showing 5 changed files with 5,630 additions and 68 deletions.
3 changes: 2 additions & 1 deletion boards/nanorp2040connect.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool"
"picotool",
"picoprobe"
]
},
"url": "https://blog.arduino.cc/2021/01/20/welcome-raspberry-pi-to-the-world-of-microcontrollers/",
Expand Down
3 changes: 2 additions & 1 deletion boards/pico.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool"
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
Expand Down
18 changes: 14 additions & 4 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,25 @@ def _jlink_cmd_script(env, source):
openocd_args.extend(
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
)
openocd_args.extend([
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
board.get("upload.offset_address", "")
])
if "uploadfs" in COMMAND_LINE_TARGETS:
# filesystem upload. use FS_START.
openocd_args.extend([
"-c", "program {$SOURCE} ${hex(FS_START)} verify reset; shutdown;"
])
else:
# normal firmware upload. flash starts at 0x10000000
openocd_args.extend([
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
board.get("upload.offset_address", "0x10000000")
])
openocd_args = [
f.replace("$PACKAGE_DIR", platform.get_package_dir(
"tool-openocd-raspberrypi") or "")
for f in openocd_args
]
# use ELF file for upload, not bin (target_firm). otherwise needs
# offset 0x10000000
#upload_source = target_elf
env.Replace(
UPLOADER="openocd",
UPLOADERFLAGS=openocd_args,
Expand Down
Loading

0 comments on commit c0653a3

Please sign in to comment.