Code Monkey home page Code Monkey logo

openocd's Introduction

Welcome to OpenOCD!
===================

OpenOCD provides on-chip programming and debugging support with a
layered architecture of JTAG interface and TAP support including:

- (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
  programming;
- debug target support (e.g. ARM, MIPS): single-stepping,
  breakpoints/watchpoints, gprof profiling, etc;
- flash chip drivers (e.g. CFI, NAND, internal flash);
- embedded TCL interpreter for easy scripting.

Several network interfaces are available for interacting with OpenOCD:
telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
"remote target" for source-level debugging of embedded systems using
the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
Pro).

This README file contains an overview of the following topics:

- quickstart instructions,
- how to find and build more OpenOCD documentation,
- list of the supported hardware,
- the installation and build process,
- packaging tips.


============================
Quickstart for the impatient
============================

If you have a popular board then just start OpenOCD with its config,
e.g.:

  openocd -f board/stm32f4discovery.cfg

If you are connecting a particular adapter with some specific target,
you need to source both the jtag interface and the target configs,
e.g.:

  openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
          -f target/ti_calypso.cfg

  openocd -f interface/stlink.cfg -c "transport select hla_swd" \
          -f target/stm32l0.cfg

After OpenOCD startup, connect GDB with

  (gdb) target extended-remote localhost:3333


=====================
OpenOCD Documentation
=====================

In addition to the in-tree documentation, the latest manuals may be
viewed online at the following URLs:

  OpenOCD User's Guide:
    http://openocd.org/doc/html/index.html

  OpenOCD Developer's Manual:
    http://openocd.org/doc/doxygen/html/index.html

These reflect the latest development versions, so the following section
introduces how to build the complete documentation from the package.

For more information, refer to these documents or contact the developers
by subscribing to the OpenOCD developer mailing list:

	[email protected]

Building the OpenOCD Documentation
----------------------------------

By default the OpenOCD build process prepares documentation in the
"Info format" and installs it the standard way, so that "info openocd"
can access it.

Additionally, the OpenOCD User's Guide can be produced in the
following different formats:

  # If PDFVIEWER is set, this creates and views the PDF User Guide.
  make pdf && ${PDFVIEWER} doc/openocd.pdf

  # If HTMLVIEWER is set, this creates and views the HTML User Guide.
  make html && ${HTMLVIEWER} doc/openocd.html/index.html

The OpenOCD Developer Manual contains information about the internal
architecture and other details about the code:

  # NB! make sure doxygen is installed, type doxygen --version
  make doxygen && ${HTMLVIEWER} doxygen/index.html


==================
Supported hardware
==================

JTAG adapters
-------------

AICE, AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
Cortino, Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
embedded projects, Espressif USB JTAG Programmer,
eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
Xverve.

Debug targets
-------------

ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
FA526, Feroceon/Dragonite, XScale.
ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8,
Xtensa.

Flash drivers
-------------

ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
GD32, i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
NUC910, Nuvoton NPCX, onsemi RSL10, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6,
Raspberry RP2040, Renesas RPC HF and SH QSPI,
S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
XMC1xxx, XMC4xxx.


==================
Installing OpenOCD
==================

A Note to OpenOCD Users
-----------------------

If you would rather be working "with" OpenOCD rather than "on" it, your
operating system or JTAG interface supplier may provide binaries for
you in a convenient-enough package.

Such packages may be more stable than git mainline, where
bleeding-edge development takes place. These "Packagers" produce
binary releases of OpenOCD after the developers produces new "release"
versions of the source code. Previous versions of OpenOCD cannot be
used to diagnose problems with the current release, so users are
encouraged to keep in contact with their distribution package
maintainers or interface vendors to ensure suitable upgrades appear
regularly.

Users of these binary versions of OpenOCD must contact their Packager to
ask for support or newer versions of the binaries; the OpenOCD
developers do not support packages directly.

A Note to OpenOCD Packagers
---------------------------

You are a PACKAGER of OpenOCD if you:

- Sell dongles and include pre-built binaries;
- Supply tools or IDEs (a development solution integrating OpenOCD);
- Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).

As a PACKAGER, you will experience first reports of most issues.
When you fix those problems for your users, your solution may help
prevent hundreds (if not thousands) of other questions from other users.

If something does not work for you, please work to inform the OpenOCD
developers know how to improve the system or documentation to avoid
future problems, and follow-up to help us ensure the issue will be fully
resolved in our future releases.

That said, the OpenOCD developers would also like you to follow a few
suggestions:

- Send patches, including config files, upstream, participate in the
  discussions;
- Enable all the options OpenOCD supports, even those unrelated to your
  particular hardware;
- Use "ftdi" interface adapter driver for the FTDI-based devices.


================
Building OpenOCD
================

The INSTALL file contains generic instructions for running 'configure'
and compiling the OpenOCD source code. That file is provided by
default for all GNU autotools packages. If you are not familiar with
the GNU autotools, then you should read those instructions first.

The remainder of this document tries to provide some instructions for
those looking for a quick-install.

OpenOCD Dependencies
--------------------

GCC or Clang is currently required to build OpenOCD. The developers
have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
and more) and use C99-specific features: inline functions, named
initializers, mixing declarations with code, and other tricks. While
it may be possible to use other compilers, they must be somewhat
modern and could require extending support to conditionally remove
GCC-specific extensions.

You'll also need:

- make
- libtool
- pkg-config >= 0.23 or pkgconf

OpenOCD uses jimtcl library; build from git can retrieve jimtcl as git
submodule.

Additionally, for building from git:

- autoconf >= 2.69
- automake >= 1.14
- texinfo >= 5.0

Optional USB-based adapter drivers need libusb-1.0.

Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter
drivers need:
  - libftdi: http://www.intra2net.com/en/developer/libftdi/index.php

Optional CMSIS-DAP adapter driver needs HIDAPI library.

Optional linuxgpiod adapter driver needs libgpiod library.

Optional JLink adapter driver needs libjaylink; build from git can
retrieve libjaylink as git submodule.

Optional ARM disassembly needs capstone library.

Optional development script checkpatch needs:

- perl
- python
- python-ply

Permissions delegation
----------------------

Running OpenOCD with root/administrative permissions is strongly
discouraged for security reasons.

For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
file. It probably belongs somewhere in /etc/udev/rules.d, but
consult your operating system documentation to be sure. Do not forget
to add yourself to the "plugdev" group.

For parallel port adapters on GNU/Linux and FreeBSD please change your
"ppdev" (parport* or ppi*) device node permissions accordingly.

For parport adapters on Windows you need to run install_giveio.bat
(it's also possible to use "ioperm" with Cygwin instead) to give
ordinary users permissions for accessing the "LPT" registers directly.

Compiling OpenOCD
-----------------

To build OpenOCD, use the following sequence of commands:

  ./bootstrap (when building from the git repository)
  ./configure [options]
  make
  sudo make install

The 'configure' step generates the Makefiles required to build
OpenOCD, usually with one or more options provided to it. The first
'make' step will build OpenOCD and place the final executable in
'./src/'. The final (optional) step, ``make install'', places all of
the files in the required location.

To see the list of all the supported options, run
  ./configure --help

Cross-compiling Options
-----------------------

Cross-compiling is supported the standard autotools way, you just need
to specify the cross-compiling target triplet in the --host option,
e.g. for cross-building for Windows 32-bit with MinGW on Debian:

  ./configure --host=i686-w64-mingw32 [options]

To make pkg-config work nicely for cross-compiling, you might need an
additional wrapper script as described at

  https://autotools.io/pkgconfig/cross-compiling.html

This is needed to tell pkg-config where to look for the target
libraries that OpenOCD depends on. Alternatively, you can specify
*_CFLAGS and *_LIBS environment variables directly, see "./configure
--help" for the details.

For a more or less complete script that does all this for you, see

  contrib/cross-build.sh

Parallel Port Dongles
---------------------

If you want to access the parallel port using the PPDEV interface you
have to specify both --enable-parport AND --enable-parport-ppdev, since
the later option is an option to the parport driver.

The same is true for the --enable-parport-giveio option, you have to
use both the --enable-parport AND the --enable-parport-giveio option
if you want to use giveio instead of ioperm parallel port access
method.


==========================
Obtaining OpenOCD From GIT
==========================

You can download the current GIT version with a GIT client of your
choice from the main repository:

   git://git.code.sf.net/p/openocd/code

You may prefer to use a mirror:

   http://repo.or.cz/r/openocd.git
   git://repo.or.cz/openocd.git

Using the GIT command line client, you might use the following command
to set up a local copy of the current repository (make sure there is no
directory called "openocd" in the current directory):

   git clone git://git.code.sf.net/p/openocd/code openocd

Then you can update that at your convenience using

   git pull

There is also a gitweb interface, which you can use either to browse
the repository or to download arbitrary snapshots using HTTP:

   http://repo.or.cz/w/openocd.git

Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
each at this writing.

openocd's People

Contributors

afaerber avatar borneoa avatar broadcom-wiced-admin avatar dinomight avatar erhankur avatar frantony avatar freddiechopin avatar hsiangkai avatar janmatcodasip avatar jaouen avatar jordens avatar karlp avatar marex avatar nattgris avatar ndreys avatar nemuisan avatar ntfreak avatar oharboe avatar olerem avatar paulfertser avatar plagnioj avatar rlrosa avatar sysgo-maw avatar tarek-bochkati avatar thinkfat avatar timsifive avatar tom-van avatar uwebonnes avatar yurovsky avatar zapb-0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openocd's Issues

Build fails on MacOS

This is MacOS 11.5.2, M1 chip. Build output is attached.

./bootstrap and ./configure --enable-picoprobe --disable-werror both run without error.

Expected behaviour: make -j4 finishes cleanly, per the documentation.
Observed behaviour: make -j4 errors (output in openocd failed build log.txt)

Flash error using openocd

I am trying to flash a binary with the following layout:

MEMORY
{
  /* boot from Flash */
  rom (rx)  : ORIGIN = 0x10000000, LENGTH = 128K
  prog (rx) : ORIGIN = 0x10020000, LENGTH = 1920K
  ram (rwx) : ORIGIN = 0x20004000, LENGTH = 256K
}

MPU_MIN_ALIGN = 8K;
PAGE_SIZE = 4K;

When trying to flash, I get the following openocd output:

$ openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg 
Open On-Chip Debugger 0.10.0+dev-geb22ace-dirty (2021-02-23-15:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 1001 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : RP2040 B0 Flash Probe: 2097152 bytes @10000000, in 512 sectors

Info : New GDB Connection: 1, Target rp2040.core0, state: halted
undefined debug reason 8 - target needs reset
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
Error: Whole bank access must start at beginning of bank.
Error: flash_erase returned -904

Flashing works fine if I remove the prog line from the layout file or put the address somewhere in RAM (> 0x2000000).

Picoprobe on Windows: GDBServerConsole: onBackendConnect: gdb-server program client error Error: read ECONNRESET

TLDR: Current problem see last post at the bottom.
#70 (comment)

Hi there,

I'm having a hard time getting my environment set up to debug a Pico on Windows 11.
In general I tried to follow the guideline getting-started-with-pico as close as possible.
Now I'm at a point where I:

  • Installed the ARM GNU Toolchain
  • Installed CMake
  • Installed Build Tools for Visual Studio (Visual Studio already has been installed)
  • Installed Python
  • Git already has been installed
  • Installed Visual Studio Code (after i gave up getting Visual Studio up running)
  • Installed extensions C/C++, CMake, CMake Tools, Cortex-Debug for Visual Studio Code
  • Cloned the pico-sdk repo and its submodules
  • Cloned the pico-examples repo
  • Set up Visual Studio Code like described in getting-started-with-pico and also added all necessary stuff to my PATH environment variable

Then i was able to successfully compile all pico-examples from within Visual Studio code!

But i want to be able to do online-debugging so i did the next steps like described in getting-started-with-pico:

  • Installed MSys2
  • Set up MSys2 and its packages like described in getting-started-with-pico
  • Installed libusb-win32 picoprobe driver using Zadig like described in getting-started-with-pico
  • Cloned openocd rp2040 branch
  • Tried to build it, failed because libusb was missing
  • Tried couple of things, but in the end it only worked after I: cloned libusb repo
  • Build libusb and added it to PATH
  • Tried again to build openocd, succeeded and added it to PATH
  • Added GDB from MSys2 to PATH
  • Set up Visual Studio Code like described in getting-started-with-pico (launch.json & settings.json)

Now finally the actual problem:
When starting debugging Pico Debug on project blink of pico-examples this error occurs.
Unbenannt1

Debugging console output:

Cortex-Debug: VSCode debugger extension version 1.6.3 git(6285985). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from arm-none-eabi-objdump --syms -C -h -w D:/Projects/pico/pico-examples/build/blink/blink.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p D:/Projects/pico/pico-examples/build/blink/blink.elf
Launching GDB: arm-none-eabi-gdb -q --interpreter=mi2
    IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
Launching gdb-server: openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\Projects\\pico\\pico-examples" -f "c:/Users/***/.vscode/extensions/marus25.cortex-debug-1.6.3/support/openocd-helpers.tcl" -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
    Please check TERMINAL tab (gdb-server) for output from openocd.exe
Finished reading symbols from objdump: Time: 1939 ms
Finished reading symbols from nm: Time: 1868 ms
Error: Unable to start GDB even after 5 seconds or it couldn't even start Make sure you can start gdb from the command-line and run any command like "echo hello".
    If you cannot, it is most likely because "libncurses5" or "python" is not installed. Some GDBs require these
Finished reading symbols from nm: Time: 473 ms
GDB could not start as expected. Bad installation or version mismatch. See if you can start gdb from a shell prompt and check its version (Must be >= 9)

Terminal output:

Waiting for gdb server to start...[2022-09-09T10:58:15.558Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\Projects\\pico\\pico-examples" -f "c:/Users/***/.vscode/extensions/marus25.cortex-debug-1.6.3/support/openocd-helpers.tcl" -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
[2022-09-09T10:58:15.782Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

Previous CMake/Build output:

[variant] Loaded new set of variants
[kit] Successfully loaded 5 kits from C:\Users\***\AppData\Local\CMakeTools\cmake-tools-kits.json
[proc] Executing command: "C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin\arm-none-eabi-gcc.exe" -v
[main] Configuring folder: pico-examples 
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug "-DCMAKE_C_COMPILER:FILEPATH=C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin\arm-none-eabi-gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin\arm-none-eabi-g++.exe" -Sd:/Projects/pico/pico-examples -Bd:/Projects/pico/pico-examples/build -G "NMake Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] PICO_SDK_PATH is D:/Projects/pico/pico-sdk
[cmake] PICO platform is rp2040.
[cmake] Build type is Debug
[cmake] Using regular optimized debug build (set PICO_DEOPTIMIZED_DEBUG=1 to de-optimize)
[cmake] PICO target board is pico.
[cmake] Using board configuration from D:/Projects/pico/pico-sdk/src/boards/include/boards/pico.h
[cmake] TinyUSB available at D:/Projects/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
[cmake] Compiling TinyUSB with CFG_TUSB_DEBUG=1
[cmake] cyw43-driver available at D:/Projects/pico/pico-sdk/lib/cyw43-driver
[cmake] lwIP available at D:/Projects/pico/pico-sdk/lib/lwip
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: D:/Projects/pico/pico-examples/build
[main] Building folder: pico-examples blink
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build d:/Projects/pico/pico-examples/build --config Debug --target blink -j 14 --
[build] Warning: NMake does not support parallel builds. Ignoring parallel build command line option.
[build] Scanning dependencies of target bs2_default
[build] [  0%] Built target bs2_default
[build] [  0%] Built target bs2_default_padded_checksummed_asm
[build] [  0%] Performing build step for 'ELF2UF2Build'
[build] 
[build] Microsoft (R) Program Maintenance Utility, Version 14.29.30146.0
[build] Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
[build] 
[build] [100%] Built target elf2uf2
[build] [  0%] No install step for 'ELF2UF2Build'
[build] [  0%] Completed 'ELF2UF2Build'
[build] [  0%] Built target ELF2UF2Build
[build] Scanning dependencies of target blink
[build] Consolidate compiler generated dependencies of target blink
[build] [100%] Built target blink
[build] Build finished with exit code 0

I'm kind of clueless right now, also can't find any useful information regarding this specific error on the web.
So any help would be welcome.
Unbenannt2

After lot's of struggeling I almost think I'm the only person who tries to DEBUG an Pico on Windows... also I would have some feedback to the getting-started-with-pico guideline, where would be the correct place to share it?

Ah yes and I almost forget...
Of course I did wire up 2 Picos like described in Appendix A Using Picoprobe in the getting-started-with-pico guide and flashed the Picoprobe Pico with the Picoprobe UF2.
The electrical work was the easy part... honestly I would never expect setting up a debugging workspace to be complicated like this - and I worked with ARM microcontrollers before.

Kind regards,
Michel-0

FT2232H support requested

Hello RPi team again,

I have attempted to see if FT2232H actually supports the Pico.

Unfortunately, all it said was this after using the config file for rp2040 and the adafruit's FT2232:

 $  openocd -f tcl/interface/ftdi/ft232h-module-swd.cfg -f tcl/target/rp2040.cfg
Open On-Chip Debugger 0.10.0+dev-g7c96119-dirty (2021-01-25-21:56)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
adapter speed: 8 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 8 kHz
Info : DAP init failed

I have inserted the 470 ohm resistor between ADBUS1 and ADBUS2 (from the swd-resistor-hack.cfg), but DAP init failed.

The USB drivers are being switched using Zadig to WinUSB.

Maybe I might have wired it wrongly, or it isn't supported right now?

cant connect on ubuntu 20.04

Hi, i am having connected picoprobe device, wired with tested device and with UART/ACM it works, but when i am trying to use openocd it fails to connect to TCP/3333:

Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-27-21:15)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Warn : Transport "swd" was already selected
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections

Info : New GDB Connection: 1, Target rp2040.core0, state: halted
Warn : ignoring character 0x47
Warn : ignoring character 0x45
Warn : ignoring character 0x54

....

....
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1068 ms). Workaround: increase "set remotetimeout" in GDB

BTW i have to use openocd with sudo.

OpenOCD can't find the CMSIS-DAP device, but pyocd can.

New to hardware and MCUs in general; apologies in advance if there's something obvious going on here.

I have a Picoprobe with the latest firmware which is ostensibly connected correctly to another Pico. I built openocd out of this repo, which fails with the following log when running src/openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -s tcl -d: https://hastebin.com/nahocejomu.apache

The line Debug: 162 16 cmsis_dap_usb_bulk.c:177 cmsis_dap_usb_open(): enumerating interfaces of 0x2e8a:0x0004 is intriguing to me because the Picoprobe is connected to my machine with the vendor ID 0x2e8a.

I tried pyocd after getting this error repeatedly, which has been working well; I'd like to be using openocd, though.

Thanks in advance.

Windows compilation problems.

Building under MINGW / MSYS causes one of two problems :

  1. Using the current latest version of libusb (1.0.24-3) causes a segmentation fault.
  2. Using the previous version 1.0.23, causes the picoprobe not to be detected.

Building under cygwin which has an earlier version of libusb (1.0.20-1), produces a working executable.

Cheers.

Phill.

building openocd v0.11.0 in ubuntu 20.10

How to build openocd v0.11.0 in ubuntu 20.10:

  1. Add to Makefile '-Wno-stringop-overflow' for src/target/arm920t.c (dirty hack)
    $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_target_libtarget_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -Wno-stringop-overflow -MT src/target/libtarget_la-arm920t.lo -MD -MP -MF src/target/$(DEPDIR)/libtarget_la-arm920t.Tpo -c -o src/target/libtarget_la-arm920t.lo `test -f 'src/target/arm920t.c' || echo '$(srcdir)/'`src/target/arm920t.c

  2. Cut one tab in ./src/flash/nor/numicro.c (avoid -Wmisleading-indentation, may be small bug) in strings
    1246, 1515, 1604 before LOG_DEBUG("status: 0x%" PRIx32 "", status);

Segmentation fault with libusb 1.0.24 and msys2 / Windows

It seems the picoprobe USB code has problems with libusb-1.0.24. The executable can be started, but will segfault when trying to talk to the picoprobe with libusb. When using an older libusb-1.0.23 openocd works normally. A similar problem also occurs for picotool.

I'm running on Windows 10 Build 19042.746 and did setup msys2 from scratch following the docs.

flash Pico use openocd failed with

Followed by getting-started-with-pico.pdf
5.3. Loading a Program
Use picoprobe wiring connections to flash a pico through another one.
I'm running Ubuntu20.04.1 64bit, and use the following command:
$ openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl -c "program hello_serial.elf verify reset exit"
but failed with the following msg:
Error: Failed to invoke ROM function FC (@00002361)

By downloading:
openocd rp2040.c from openocd-org's repo, and replace
pico/openocd/src/flash/nor/rp2040.c
then, rebuild rearberry's openocd.

$ openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl -c "program hello_serial.elf verify reset exit"

can flash pico successfully.

Packaging

Any chance mu branch could be rebased on or merged with d46f28c? That would make it a lot easier to package.

Jlink support

I have a jlink ob with swd port available but it seems not working with the RP2040. I don't understand why, and there is some debug log.

openocd "-c" "gdb_port 50000" "-f" "interface/jlink.cfg" -c "transport select swd" -c "adapter_khz 2000" "-f" "target/rp2040.cfg" --debug
Open On-Chip Debugger 0.10.0+dev-g7c96119-dirty (2021-01-25-20:18)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
User : 13 1 options.c:63 configuration_output_handler(): debug_level: 3
User : 14 1 options.c:63 configuration_output_handler(): 
Debug: 15 1 options.c:244 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 1 options.c:245 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 1 options.c:246 add_default_dirs(): exepath=/usr/bin
Debug: 18 1 options.c:247 add_default_dirs(): bin2data=../share/openocd
Debug: 19 1 configuration.c:42 add_script_search_dir(): adding /home/user/.config/openocd
Debug: 20 1 configuration.c:42 add_script_search_dir(): adding /home/user/.openocd
Debug: 21 1 configuration.c:42 add_script_search_dir(): adding /usr/bin/../share/openocd/site
Debug: 22 1 configuration.c:42 add_script_search_dir(): adding /usr/bin/../share/openocd/scripts
Debug: 23 1 command.c:146 script_debug(): command - gdb_port 50000
Debug: 25 1 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/interface/jlink.cfg
Debug: 26 1 command.c:146 script_debug(): command - adapter driver jlink
Debug: 28 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 29 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 30 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 31 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 32 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 33 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 34 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 35 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 36 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 37 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 38 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 39 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 40 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 41 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 42 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 43 1 command.c:352 register_command_handler(): registering 'jlink'...
Debug: 44 1 command.c:146 script_debug(): command - transport select swd
Debug: 45 1 command.c:352 register_command_handler(): registering 'swd'...
User : 46 1 options.c:63 configuration_output_handler(): swdUser : 47 1 options.c:63 configuration_output_handler(): 
Debug: 48 1 command.c:146 script_debug(): command - echo DEPRECATED! use 'adapter speed' not 'adapter_khz'
User : 50 1 command.c:767 jim_echo(): DEPRECATED! use 'adapter speed' not 'adapter_khz'
Debug: 51 1 command.c:146 script_debug(): command - adapter speed 2000
Debug: 53 1 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 54 1 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 55 1 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 56 1 options.c:63 configuration_output_handler(): adapter speed: 2000 kHz
User : 57 1 options.c:63 configuration_output_handler(): 
Debug: 58 1 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/target/rp2040.cfg
Debug: 59 1 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 60 1 command.c:146 script_debug(): command - transport select
Debug: 61 1 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/mem_helper.tcl
Debug: 62 1 command.c:146 script_debug(): command - add_usage_text mrw address
Debug: 64 1 command.c:1123 help_add_command(): added 'mrw' help text
Debug: 65 1 command.c:146 script_debug(): command - add_help_text mrw Returns value of word in memory.
Debug: 67 1 command.c:1136 help_add_command(): added 'mrw' help text
Debug: 68 1 command.c:146 script_debug(): command - add_usage_text mrh address
Debug: 70 1 command.c:1123 help_add_command(): added 'mrh' help text
Debug: 71 1 command.c:146 script_debug(): command - add_help_text mrh Returns value of halfword in memory.
Debug: 73 1 command.c:1136 help_add_command(): added 'mrh' help text
Debug: 74 1 command.c:146 script_debug(): command - add_usage_text mrb address
Debug: 76 1 command.c:1123 help_add_command(): added 'mrb' help text
Debug: 77 1 command.c:146 script_debug(): command - add_help_text mrb Returns value of byte in memory.
Debug: 79 1 command.c:1136 help_add_command(): added 'mrb' help text
Debug: 80 1 command.c:146 script_debug(): command - add_usage_text mmw address setbits clearbits
Debug: 82 1 command.c:1123 help_add_command(): added 'mmw' help text
Debug: 83 1 command.c:146 script_debug(): command - add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 85 1 command.c:1136 help_add_command(): added 'mmw' help text
Debug: 86 1 command.c:146 script_debug(): command - swd newdap rp2040.core0 cpu -dp-id 0x01002927 -instance-id 0
Debug: 87 1 tcl.c:604 jim_newtap_cmd(): Creating New Tap, Chip: rp2040.core0, Tap: cpu, Dotted: rp2040.core0.cpu, 4 params
Debug: 88 1 tcl.c:618 jim_newtap_cmd(): Processing option: -dp-id
Debug: 89 1 tcl.c:618 jim_newtap_cmd(): Processing option: -instance-id
Debug: 90 1 core.c:1484 jtag_tap_init(): Created Tap: rp2040.core0.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 91 1 command.c:146 script_debug(): command - swd newdap rp2040.core1 cpu -dp-id 0x01002927 -instance-id 1
Debug: 92 1 tcl.c:604 jim_newtap_cmd(): Creating New Tap, Chip: rp2040.core1, Tap: cpu, Dotted: rp2040.core1.cpu, 4 params
Debug: 93 1 tcl.c:618 jim_newtap_cmd(): Processing option: -dp-id
Debug: 94 1 tcl.c:618 jim_newtap_cmd(): Processing option: -instance-id
Debug: 95 1 core.c:1484 jtag_tap_init(): Created Tap: rp2040.core1.cpu @ abs position 1, irlen 0, capture: 0x0 mask: 0x0
Debug: 96 1 command.c:146 script_debug(): command - dap create rp2040.core0.dap -chain-position rp2040.core0.cpu
Debug: 97 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 98 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 99 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 100 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 101 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 102 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 103 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 104 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 105 1 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 106 1 command.c:146 script_debug(): command - target create rp2040.core0 cortex_m -endian little -coreid 0 -dap rp2040.core0.dap -rtos hwthread
Info : 107 1 hwthread.c:378 hwthread_create(): Hardware thread awareness created
Debug: 108 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 109 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 110 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 111 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 112 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 113 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 114 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 115 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 116 1 command.c:352 register_command_handler(): registering 'arm'...
Debug: 117 1 command.c:352 register_command_handler(): registering 'tpiu'...
Debug: 118 1 command.c:352 register_command_handler(): registering 'itm'...
Debug: 119 1 command.c:352 register_command_handler(): registering 'itm'...
Debug: 120 1 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 121 1 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 122 1 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 123 1 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 124 1 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 125 1 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 126 2 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 127 2 command.c:373 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 128 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 129 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 130 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 131 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 132 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 133 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 134 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 135 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 136 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 137 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 138 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 139 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 140 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 141 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 142 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 143 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 144 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 145 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 146 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 147 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 148 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 149 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 150 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 151 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 152 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 153 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 154 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 155 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 156 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 157 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 158 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 159 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 160 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 161 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 162 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 163 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 164 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 165 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 166 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 167 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 168 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 169 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 170 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 171 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 172 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 173 2 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 174 2 command.c:373 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 175 2 command.c:146 script_debug(): command - rp2040.core0 configure -work-area-phys 0x20010000 -work-area-size 0x10000 -work-area-backup 0
Debug: 176 2 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 177 2 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 178 2 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 179 2 command.c:146 script_debug(): command - cortex_m reset_config sysresetreq
Debug: 181 2 command.c:146 script_debug(): command - dap create rp2040.core1.dap -chain-position rp2040.core1.cpu
Debug: 182 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 183 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 184 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 185 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 186 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 187 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 188 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 189 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 190 2 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 191 2 command.c:146 script_debug(): command - target create rp2040.core1 cortex_m -endian little -coreid 1 -dap rp2040.core1.dap -rtos hwthread
Info : 192 2 hwthread.c:378 hwthread_create(): Hardware thread awareness created
Debug: 193 2 command.c:373 register_command(): command 'arm' is already registered in '<global>' context
Debug: 194 2 command.c:373 register_command(): command 'reg' is already registered in 'arm' context
Debug: 195 2 command.c:373 register_command(): command 'core_state' is already registered in 'arm' context
Debug: 196 2 command.c:373 register_command(): command 'disassemble' is already registered in 'arm' context
Debug: 197 2 command.c:373 register_command(): command 'mcr' is already registered in 'arm' context
Debug: 198 2 command.c:373 register_command(): command 'mrc' is already registered in 'arm' context
Debug: 199 2 command.c:373 register_command(): command 'semihosting' is already registered in 'arm' context
Debug: 200 2 command.c:373 register_command(): command 'semihosting_cmdline' is already registered in 'arm' context
Debug: 201 2 command.c:373 register_command(): command 'semihosting_fileio' is already registered in 'arm' context
Debug: 202 2 command.c:373 register_command(): command 'semihosting_resexit' is already registered in 'arm' context
Debug: 203 2 command.c:373 register_command(): command 'tpiu' is already registered in '<global>' context
Debug: 204 2 command.c:373 register_command(): command 'config' is already registered in 'tpiu' context
Debug: 205 2 command.c:373 register_command(): command 'itm' is already registered in '<global>' context
Debug: 206 2 command.c:373 register_command(): command 'port' is already registered in 'itm' context
Debug: 207 2 command.c:373 register_command(): command 'ports' is already registered in 'itm' context
Debug: 208 2 command.c:373 register_command(): command 'cortex_m' is already registered in '<global>' context
Debug: 209 2 command.c:373 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 210 2 command.c:373 register_command(): command 'maskisr' is already registered in 'cortex_m' context
Debug: 211 2 command.c:373 register_command(): command 'vector_catch' is already registered in 'cortex_m' context
Debug: 212 2 command.c:373 register_command(): command 'reset_config' is already registered in 'cortex_m' context
Debug: 213 2 command.c:373 register_command(): command 'smp' is already registered in 'cortex_m' context
Debug: 214 2 command.c:373 register_command(): command 'smp_on' is already registered in 'cortex_m' context
Debug: 215 2 command.c:373 register_command(): command 'smp_off' is already registered in 'cortex_m' context
Debug: 216 2 command.c:373 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 217 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 218 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 219 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 220 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 221 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 222 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 223 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 224 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 225 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 226 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 227 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 228 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 229 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 230 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 231 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 232 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 233 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 234 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 235 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 236 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 237 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 238 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 239 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 240 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 241 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 242 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 243 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 244 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 245 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 246 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 247 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 248 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 249 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 250 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 251 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 252 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 253 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 254 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 255 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 256 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 257 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 258 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 259 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 260 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 261 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 262 2 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 263 2 command.c:373 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 264 2 command.c:146 script_debug(): command - rp2040.core1 configure -work-area-phys 0x20010000 -work-area-size 0x10000 -work-area-backup 0
Debug: 265 2 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 266 2 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 267 2 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 268 2 command.c:146 script_debug(): command - cortex_m reset_config sysresetreq
Debug: 270 2 command.c:146 script_debug(): command - target smp rp2040.core0 rp2040.core1
Debug: 271 2 target.c:5727 jim_target_smp(): 3
Debug: 272 2 target.c:5737 jim_target_smp(): rp2040.core0 
Debug: 273 2 target.c:5737 jim_target_smp(): rp2040.core1 
Debug: 274 2 hwthread.c:200 hwthread_update_threads(): hwthread_update_threads current_thread=-1
Debug: 275 2 command.c:146 script_debug(): command - flash bank rp2040.flash rp2040_flash 0x10000000 0x200000 1 32 rp2040.core0
Info : 277 2 rp2040.c:351 rp2040_flash_bank_command(): RP2040 Flash Bank Command
Debug: 278 2 tcl.c:1258 handle_flash_bank_command(): 'rp2040_flash' driver usage field missing
Debug: 279 2 command.c:146 script_debug(): command - reset_config srst_nogate
Debug: 281 2 command.c:146 script_debug(): command - gdb_flash_program enable
Debug: 283 2 command.c:146 script_debug(): command - gdb_memory_map enable
Info : 285 2 server.c:310 add_service(): Listening on port 6666 for tcl connections
Info : 286 2 server.c:310 add_service(): Listening on port 4444 for telnet connections
Debug: 287 2 command.c:146 script_debug(): command - init
Debug: 289 2 command.c:146 script_debug(): command - target init
Debug: 291 2 command.c:146 script_debug(): command - target names
Debug: 292 2 command.c:146 script_debug(): command - rp2040.core0 cget -event gdb-flash-erase-start
Debug: 293 2 command.c:146 script_debug(): command - rp2040.core0 configure -event gdb-flash-erase-start reset init
Debug: 294 2 command.c:146 script_debug(): command - rp2040.core0 cget -event gdb-flash-write-end
Debug: 295 2 command.c:146 script_debug(): command - rp2040.core0 configure -event gdb-flash-write-end reset halt
Debug: 296 2 command.c:146 script_debug(): command - rp2040.core0 cget -event gdb-attach
Debug: 297 2 command.c:146 script_debug(): command - rp2040.core0 configure -event gdb-attach halt 1000
Debug: 298 2 command.c:146 script_debug(): command - rp2040.core1 cget -event gdb-flash-erase-start
Debug: 299 2 command.c:146 script_debug(): command - rp2040.core1 configure -event gdb-flash-erase-start reset init
Debug: 300 2 command.c:146 script_debug(): command - rp2040.core1 cget -event gdb-flash-write-end
Debug: 301 2 command.c:146 script_debug(): command - rp2040.core1 configure -event gdb-flash-write-end reset halt
Debug: 302 2 command.c:146 script_debug(): command - rp2040.core1 cget -event gdb-attach
Debug: 303 2 command.c:146 script_debug(): command - rp2040.core1 configure -event gdb-attach halt 1000
Debug: 304 2 target.c:1458 handle_target_init_command(): Initializing targets...
Debug: 305 2 semihosting_common.c:97 semihosting_common_init():  
Debug: 306 2 semihosting_common.c:97 semihosting_common_init():  
Debug: 307 2 command.c:352 register_command_handler(): registering 'target_request'...
Debug: 308 2 command.c:352 register_command_handler(): registering 'trace'...
Debug: 309 2 command.c:352 register_command_handler(): registering 'trace'...
Debug: 310 2 command.c:352 register_command_handler(): registering 'fast_load_image'...
Debug: 311 2 command.c:352 register_command_handler(): registering 'fast_load'...
Debug: 312 2 command.c:352 register_command_handler(): registering 'profile'...
Debug: 313 2 command.c:352 register_command_handler(): registering 'virt2phys'...
Debug: 314 2 command.c:352 register_command_handler(): registering 'reg'...
Debug: 315 2 command.c:352 register_command_handler(): registering 'poll'...
Debug: 316 2 command.c:352 register_command_handler(): registering 'wait_halt'...
Debug: 317 2 command.c:352 register_command_handler(): registering 'halt'...
Debug: 318 2 command.c:352 register_command_handler(): registering 'resume'...
Debug: 319 2 command.c:352 register_command_handler(): registering 'reset'...
Debug: 320 2 command.c:352 register_command_handler(): registering 'soft_reset_halt'...
Debug: 321 2 command.c:352 register_command_handler(): registering 'step'...
Debug: 322 2 command.c:352 register_command_handler(): registering 'mdd'...
Debug: 323 2 command.c:352 register_command_handler(): registering 'mdw'...
Debug: 324 2 command.c:352 register_command_handler(): registering 'mdh'...
Debug: 325 3 command.c:352 register_command_handler(): registering 'mdb'...
Debug: 326 3 command.c:352 register_command_handler(): registering 'mwd'...
Debug: 327 3 command.c:352 register_command_handler(): registering 'mww'...
Debug: 328 3 command.c:352 register_command_handler(): registering 'mwh'...
Debug: 329 3 command.c:352 register_command_handler(): registering 'mwb'...
Debug: 330 3 command.c:352 register_command_handler(): registering 'bp'...
Debug: 331 3 command.c:352 register_command_handler(): registering 'rbp'...
Debug: 332 3 command.c:352 register_command_handler(): registering 'wp'...
Debug: 333 3 command.c:352 register_command_handler(): registering 'rwp'...
Debug: 334 3 command.c:352 register_command_handler(): registering 'load_image'...
Debug: 335 3 command.c:352 register_command_handler(): registering 'dump_image'...
Debug: 336 3 command.c:352 register_command_handler(): registering 'verify_image_checksum'...
Debug: 337 3 command.c:352 register_command_handler(): registering 'verify_image'...
Debug: 338 3 command.c:352 register_command_handler(): registering 'test_image'...
Debug: 339 3 command.c:352 register_command_handler(): registering 'reset_nag'...
Debug: 340 3 command.c:352 register_command_handler(): registering 'ps'...
Debug: 341 3 command.c:352 register_command_handler(): registering 'test_mem_access'...
Debug: 342 3 jlink.c:571 jlink_init(): Using libjaylink 0.2.0 (compiled with 0.2.0).
Debug: 343 6 jlink.c:526 jaylink_log_handler(): Found device (VID:PID = 1366:0105, bus:address = 003:027).
Debug: 344 11 jlink.c:526 jaylink_log_handler(): Device: USB address = 0.
Debug: 345 11 jlink.c:526 jaylink_log_handler(): Device: Serial number = 20190417.
Debug: 346 11 jlink.c:526 jaylink_log_handler(): Allocating new device instance.
Debug: 347 11 jlink.c:526 jaylink_log_handler(): Found 1 USB device(s).
Debug: 348 11 jlink.c:526 jaylink_log_handler(): Trying to open device (bus:address = 003:027).
Debug: 349 11 jlink.c:526 jaylink_log_handler(): Using endpoint 84 (IN) and 05 (OUT).
Debug: 350 11 jlink.c:526 jaylink_log_handler(): Device opened successfully.
Info : 358 12 jlink.c:696 jlink_init(): J-Link OB-STM32F072-CortexM compiled Jan  7 2019 14:09:37
Info : 371 12 jlink.c:737 jlink_init(): Hardware version: 1.00
Info : 384 13 jlink.c:778 jlink_init(): VTarget = 3.300 V
Debug: 397 13 jlink.c:931 jlink_reset(): TRST: 0, SRST: 0.
Debug: 408 17 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 409 17 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 416 17 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 417 17 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 418 17 core.c:1565 adapter_init(): clock speed 2000 kHz
Debug: 419 17 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 420 17 command.c:146 script_debug(): command - transport init
Debug: 422 17 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 423 17 command.c:146 script_debug(): command - dap init
Debug: 425 17 arm_dap.c:116 dap_init_all(): Initializing all DAPs ...
Error: 426 17 jlink.c:2153 jlink_swd_switch_seq(): Sequence 4 not supported.
Debug: 427 17 jlink.c:2138 jlink_swd_switch_seq(): SWD line reset
Debug: 428 17 jlink.c:2167 jlink_swd_run_queue(): Executing 5 queued transactions.
Debug: 438 17 jlink.c:2191 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 439 17 adi_v5_swd.c:655 swd_multidrop_select_target(): Failed to select core 0, retrying...
Debug: 440 17 jlink.c:2138 jlink_swd_switch_seq(): SWD line reset
Debug: 441 17 jlink.c:2167 jlink_swd_run_queue(): Executing 4 queued transactions.
Debug: 451 18 jlink.c:2191 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 452 18 adi_v5_swd.c:655 swd_multidrop_select_target(): Failed to select core 0, retrying...
Debug: 453 18 jlink.c:2138 jlink_swd_switch_seq(): SWD line reset
Debug: 454 18 jlink.c:2167 jlink_swd_run_queue(): Executing 4 queued transactions.
Debug: 464 18 jlink.c:2191 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 465 18 adi_v5_swd.c:655 swd_multidrop_select_target(): Failed to select core 0
Info : 466 18 arm_dap.c:337 handle_dap_init(): DAP init failed
Debug: 467 18 command.c:626 run_command(): Command 'dap init' failed with error code -4
User : 468 19 command.c:692 command_run_line(): 
Debug: 469 19 command.c:626 run_command(): Command 'init' failed with error code -4
User : 470 19 command.c:692 command_run_line(): 
Debug: 471 19 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 472 19 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Error: 473 19 jlink.c:2153 jlink_swd_switch_seq(): Sequence 3 not supported.
Error: 474 19 jlink.c:2153 jlink_swd_switch_seq(): Sequence 4 not supported.
Debug: 475 19 jlink.c:2138 jlink_swd_switch_seq(): SWD line reset
Debug: 476 19 jlink.c:2167 jlink_swd_run_queue(): Executing 5 queued transactions.
Debug: 486 19 jlink.c:2191 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 487 19 adi_v5_swd.c:655 swd_multidrop_select_target(): Failed to select core 0, retrying...
Debug: 488 19 jlink.c:2138 jlink_swd_switch_seq(): SWD line reset
Debug: 489 19 jlink.c:2167 jlink_swd_run_queue(): Executing 4 queued transactions.
Debug: 499 20 jlink.c:2191 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 500 20 adi_v5_swd.c:655 swd_multidrop_select_target(): Failed to select core 0, retrying...
Debug: 501 20 jlink.c:2138 jlink_swd_switch_seq(): SWD line reset
Debug: 502 20 jlink.c:2167 jlink_swd_run_queue(): Executing 4 queued transactions.
Debug: 512 20 jlink.c:2191 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 513 20 adi_v5_swd.c:655 swd_multidrop_select_target(): Failed to select core 0
Debug: 518 21 jlink.c:526 jaylink_log_handler(): Closing device (bus:address = 003:027).
Debug: 519 21 jlink.c:526 jaylink_log_handler(): Device closed successfully.
Debug: 520 21 jlink.c:526 jaylink_log_handler(): Device destroyed (bus:address = 003:027).

Also please provide some binary packages, as not everyone are familar with compiling the software.

If only this chip can be supported by SEGGER itself๏ผŒwe will be able to use the offical jlink software and it will simplify many steps.

Fails to compile on MacOS using the latest libftdi

I tried to compile this today for an M1 MacBook but ran into the following error while compiling:

src/jtag/drivers/presto.c:163:6: error: 'ftdi_usb_purge_buffers' is deprecated
      [-Werror,-Wdeprecated-declarations]
        if (ftdi_usb_purge_buffers(&presto->ftdic) < 0) {

Installing libftdi via:

brew install libftdi

installs version 1.5.0 which seems to be incompatible with the version of openOCD this was forked from. This was a known issue back in October (https://www.mail-archive.com/[email protected]/msg13025.html), but I am not sure if it has been resolved upstream.

It seems disabling FTDI support with ./configure --disable-ftdi does not resolve the issue.

Workarounds are:

  • Installing an older 1.4 release of libftdi
  • Disabling depreciation errors with -Wno-deprecated added to CFLAGS

Openocd fails to compile for rp2040

Following the steps from the rpi org guide: https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf#page=19&zoom=100,153,0

$ cd ~/pico
$ sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-
dev
$ git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
$ cd openocd
$ ./bootstrap
$ ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio
$ make -j4
$ sudo make install

Compilation fails with these errors/warnings regarding presto (I guess)

src/jtag/drivers/openjtag.c: In function โ€˜openjtag_init_standardโ€™:
src/jtag/drivers/openjtag.c:439:9: error: โ€˜ftdi_usb_purge_buffersโ€™ is deprecated [-Werror=deprecated-declarations]
  439 |         if (ftdi_usb_purge_buffers(&ftdic) < 0) {
      |         ^~

src/jtag/drivers/presto.c: In function โ€˜presto_open_libftdiโ€™:
src/jtag/drivers/presto.c:163:9: error: โ€˜ftdi_usb_purge_buffersโ€™ is deprecated [-Werror=deprecated-declarations]
  163 |         if (ftdi_usb_purge_buffers(&presto->ftdic) < 0) {
      |         ^~
In file included from src/jtag/drivers/presto.c:37:
/usr/include/libftdi1/ftdi.h:566:20: note: declared here
  566 |     int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro โ€˜DEPRECATEDโ€™
  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
      |                                                       ^~~~
src/jtag/drivers/presto.c:177:17: error: โ€˜ftdi_usb_purge_buffersโ€™ is deprecated [-Werror=deprecated-declarations]
  177 |                 if (ftdi_usb_purge_buffers(&presto->ftdic) < 0)
      |                 ^~
In file included from src/jtag/drivers/presto.c:37:
/usr/include/libftdi1/ftdi.h:566:20: note: declared here
  566 |     int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro โ€˜DEPRECATEDโ€™
  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) fun

I'm on arch linux (5.12.5-arch-1)

Uncompilable with GCC 11

Hello,

The actual state of the code from this repository doesn't compile with GCC 11 on Arch Linux (probably the distribution doesn't count). I even tried to manually solve the compile errors to a certain point, but I after a while get tired fixing the code which is already patched on the upstream repository. FYI, the upstream OpenOCD compiles well with GCC 11. Do you have any plans to merge the picoprobe branch into the upstream OpenOCD repository or merge the upstream OpenOCD into the Picoprobe branch in this repository?

Flashing Pico w/ Jlink

I'm not sure if this is the right place to ask this question, if not I apologise. I'm trying to flash my Pico with a Jlink.

[machinehum@whitebox rp2040-test]$ ls
blink  blink.elf  flash.sh  rp2040.cfg
[machinehum@whitebox rp2040-test]$ cat flash.sh 
#!/bin/bash

# openocd -f interface/jlink.cfg -f rp2040.cfg -c "program blink/blink.elf verify reset exit"
openocd -f interface/jlink.cfg -f target/rp2040.cfg -c "program blink/blink.elf verify reset exit"
[machinehum@whitebox rp2040-test]$ ./flash.sh 
Open On-Chip Debugger 0.11.0-g610f137d2 (2022-03-07-19:06)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl:28: Error: Unknown param: 0x01002927, try one of: -irlen, -irmask, -ircapture, -enable, -disable, -expected-id, -ignore-version, -dp-id, or -instance-id
in procedure 'script' 
at file "embedded:startup.tcl", line 26
in procedure 'swj_newdap' called at file "/usr/local/bin/../share/openocd/scripts/target/rp2040.cfg", line 8
at file "/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl", line 28

Any help would be appreciated.

Cannot flash nrf51822 using Picoprobe and windows build of OpenOCD

I cannot flash an nrf51822 using a Picoprobe and OpenOCD on windows (I know this is a copy that supports the picoprobe).

Error message from openocd, using the same arguments as Issue #37:

Open On-Chip Debugger 0.10.0+dev-geb22ace (2021-04-12-11:02)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Warn : Transport "swd" was already selected
adapter speed: 5000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x0bb11477
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for nrf51.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x00002fa0 msp: 0x20003d10
Info : nRF51822-QFAA(build code: H1) 256kB Flash, 16kB RAM
Warn : Prefer GDB command "target extended-remote 3333" instead of "target remote 3333"
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
Info : Flash write discontinued at 0x000007c0, next section at 0x00001000
Error: flash write algorithm aborted by target
Error: timed out while waiting for target halted

Output from arm-none-eabi-gdb firmware.hex

GNU gdb (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.1.90.20201028-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from firmware.hex...
(No debugging symbols found in firmware.hex)
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x00002fa0 in ?? ()
(gdb) load
Loading section .sec1, size 0x7c0 lma 0x0
Loading section .sec2, size 0xf000 lma 0x1000
Loading section .sec3, size 0xb4d8 lma 0x10000
Loading section .sec4, size 0x2c6c lma 0x1c000
Error finishing flash operation
(gdb) Quit
(gdb) reset
Undefined command: "reset".  Try "help".
(gdb) monitor reset
(gdb)

I have already tried the fix that #37 implemented, but I am unable to get a working result...

GDB error when debugging PIO projects on VSCode

OS: Ubuntu 22.04

Debug Setup: picoprobe, openocd, gdb-multiarch, arm-none-eabi, VSCode (Cortex-Debug, Cmake Tools, also see my settings.json and launch.json)

Description: I am able to program and debug pico programs using my setup without issues except when the program contains code related to PIO. Take the hello_pio example project, if I start debugging (F5) the pico is programmed and debugging starts, but if I am in the "Run and Debug" view (Ctrl + Shift + D) the VARIABLES>Locals section attempts to load and then cancels, followed by the debug ending. Here are the DEBUG_CONSOLE and TERMINAL outputs.
Something interesting I noted is that if VSCode is not in the "Run and Debug" view, I am able to step through the program without problems, but if I attempt to look at "Run and Debug" view before finishing line 28 of hello_pio: hello.c, the error occurs. If I look at "Run and Debug" after line 28, I am able to debug as expected.
Any ideas on how to resolve this?

Edit: After testing a few more things it seems like the issue may be related to debugging variables that have been optimized out or do not exist yet, it may not be PIO at all.

Note: I was not certain if this should be posted here, on picoprobe GitHub, or somewhere else, so please let me know

Error running interface picoprobe and target nrf52

I've compiled openocd from github branch picoprobe. When I execute openocd --file picoprobe.cfg --file nrf52.cfg I see the following error:

../share/openocd/scripts/target/swj-dp.tcl:30: Error: Unknown param: 0x2ba01477, try one of: -irlen, -irmask, -ircapture, -enable, -disable, -expected-id, -ignore-version, -dp-id, or -instance-id
in procedure 'script' 
at file "embedded:startup.tcl", line 26
in procedure 'swj_newdap' called at file "nrf52.cfg", line 27
at file "../share/openocd/scripts/target/swj-dp.tcl", line 30

Both .cfg files are form the installed scripts folder.

Make this program portable

is there any possibility to add a statically linked build option to the make file? This way the program could be "portable" as in no external dependencies needed. This is useful for publishing as a stand alone program for platformio or other platforms for example.

bcm2835gpio interface not found even thought --enable-bcm2835gpio

My system is Manjaro Cinnamon kernel 5.17.5-1, Ryzen 5 1600, RX480
I did follow the installation instructions for openocd in getting started, apart from some Debian-only steps (installing libraries with apt, I made sure I had those).
I made sure that there is no other openocd in the system.

Error when trying to run " openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg" in pico-examples folder:

Open On-Chip Debugger 0.11.0-g4f2ae6197 (2022-07-29-17:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (bcm2835gpio)
The following debug adapters are available:
1: parport
2: dummy
3: ftdi
4: usb_blaster
5: jtag_vpi
6: ft232r
7: amt_jtagaccel
8: gw16012
9: presto
10: usbprog
11: openjtag
12: jlink
13: vsllink
14: rlink
15: ulink
16: arm-jtag-ew
17: buspirate
18: remote_bitbang
19: hla
20: osbdm
21: opendous
22: sysfsgpio
23: xlnx_pcie_xvc
24: aice
25: picoprobe
26: cmsis-dap
27: kitprog
28: xds110
29: st-link

step to reproduce:

git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
$ cd openocd
$ ./bootstrap
$ ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio
$ make -j4
$ sudo make install

What I tried?
doing it more times :D didn't work obviously.
Trying PAMAC package: openocd-picoprobe - no difference

output of git:

git.log

output of bootstrap:

bootstrap.log

output of configure:

configureouput.log

make output:
ouput.make.log
sudo make install output:

sudomakeinstall.log

RPi and aduc7020

I want to do the following, I use the RPi as a chip programmer via JTAG / SWD, I have managed to program schellinde chips. now i would like to program the aduc7020. but that does not work. Anyone have a fix or can help me? I tried alot

openocd.cfg:

#log_output testlog

source [find interface/raspberrypi2-native.cfg]
transport select jtag

bcm2835gpio trst_num 8
bcm2835gpio tdi_num 7
bcm2835gpio tms_num 1
bcm2835gpio tck_num 12
bcm2835gpio tdo_num 16

adapter speed 400

set CHIPNAME aduc7020
source [find target/aduc702x.cfg]

reset config

reset_config trst_only

#jtag_ntrst_assert_width 200
jtag_ntrst_delay 200

#init
echo "target try halted"
#halt

soft_reset_halt

sleep 2000

#flash erase_address 0x80000 0x0F800

flash write_bank 0 testradar.hex
#flash write_image testradar.hex

#verify_image testradar.bin 0x80000

exit

Return from openocd:

/Radarchip $ openocd
Open On-Chip Debugger 0.11.0+dev-00590-g2586fec92 (2022-03-10-10:20)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
/usr/local/bin/../share/openocd/scripts/target/aduc702x.cfg:52: Error: -event: Unknown: reset-halt-post, try one of: gdb-halt, halted, resumed, resume-start, resume-end, step-start, step-end, gdb-start, gdb-end, reset-start, reset-assert-pre, reset-assert, reset-assert-post, reset-deassert-pre, reset-deassert-post, reset-init, reset-end, examine-start, examine-fail, examine-end, debug-halted, debug-resumed, gdb-attach, gdb-detach, gdb-flash-write-start, gdb-flash-write-end, gdb-flash-erase-start, gdb-flash-erase-end, trace-config, semihosting-user-cmd-0x100, semihosting-user-cmd-0x101, semihosting-user-cmd-0x102, semihosting-user-cmd-0x103, semihosting-user-cmd-0x104, semihosting-user-cmd-0x105, semihosting-user-cmd-0x106, or semihosting-user-cmd-0x107
in procedure 'script'
at file "embedded:startup.tcl", line 26
at file "openocd.cfg", line 16
at file "/usr/local/bin/../share/openocd/scripts/target/aduc702x.cfg", line 52
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 400 kHz
Info : JTAG tap: aduc7020.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787 (), part: 0xf0f0, ver: 0x3)
Info : Embedded ICE version 1
Info : aduc7020.cpu: hardware has 2 breakpoint/watchpoint units
Info : starting gdb server for aduc7020.cpu on 3333
Info : Listening on port 3333 for gdb connections

Send changes upstream

Any chance this is going upstream? I don't really want to maintain a
separate install just for the RPi pico.

sysfsgpio and bcm2835gpio not enabled after configurations step

After running config command:

./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio

The configuration summary is missing sysfsgpio and bcm2835gpio.

image

When running openocd it errors with

Error: The specified debug interface was not found (bcm2835gpio)

Not sure if I have missed something or this is an issue others are having?

Compile error MacOS: capstone.h not found

Capstone is installed via homebrew:

> brew info capstone
capstone: stable 4.0.2 (bottled), HEAD

After

./configure --enable-picoprobe --disable-werror
make -j4

The compiler errors with

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -I./jimtcl -I./jimtcl -I/opt/homebrew/Cellar/capstone/4.0.2/include/capstone -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -g -O2 -MT src/target/libtarget_la-armv4_5_mmu.lo -MD -MP -MF src/target/.deps/libtarget_la-armv4_5_mmu.Tpo -c src/target/armv4_5_mmu.c -o src/target/libtarget_la-armv4_5_mmu.o
src/target/arm_disassembler.c:30:10: fatal error: 'capstone/capstone.h' file not found
#include <capstone/capstone.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

The Capstone headers are installed in /opt/homebrew/Cellar/capstone/4.0.2/include

> ls /opt/homebrew/Cellar/capstone/4.0.2/include/capstone/
arm.h        capstone.h   m680x.h      mips.h       ppc.h        systemz.h    x86.h
arm64.h      evm.h        m68k.h       platform.h   sparc.h      tms320c64x.h xcore.h

A similar issue has occurred here WerWolv/ImHex#145

Flashing through openocd doesn't work as expected

Flashing through gdb connected to openocd using the load command does work as expected. But flashing using the program command in openocd doesn't:

openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -c "program test.elf"
Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-22-17:37)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Warn : Transport "swd" was already selected
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
** Programming Started **
Warn : no flash bank found for address 0x10000000
Warn : no flash bank found for address 0x10002aac
** Programming Finished **
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
^Cshutdown command invoked

Trying flash banks:

openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -c "flash banks"
Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-22-17:37)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Warn : Transport "swd" was already selected
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
#0 : rp2040.flash (rp2040_flash) at 0x10000000, size 0x00200000, buswidth 32, chipwidth 1

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections
^Cshutdown command invoked

add support for stlink

I am trying to use an stlink to program my rp2040

openocd -f interface/stlink.cfg -f target/rp2040.cfg

And end up with this issue:
/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl:30: Error: Unknown param: -dp-id, try one of: -irlen, -irmask, -ircapture, -enable, -disable, -expected-id, or -ignore-version
in procedure 'script'

Rebase onto latest upstream master

I have re-based non recent code, however there is a merge conflict with some of our latest additions.

@majbthrd can you please take a look, as you upstreamed our code causing the conflict.

Configuration Failure On Ubuntu

When I go to configure open OCD i get the following:

./configure --enable-picoprobe

checking for makeinfo... makeinfo
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for ranlib... ranlib
./configure: line 4513: syntax error near unexpected token 0.23' ./configure: line 4513: PKG_PROG_PKG_CONFIG(0.23)'

Why can't I find picoprobe?; on macOS Monterey

What problem

I wanted to use picoprobe for debuging Raspberry Pi pico as mentioned in Getting Started document.
So I tried build and use openocd as usual mentioned in Internet (and document):
$ openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl
but, i got these error logs:

Open On-Chip Debugger 0.11.0-g228ede43d (2022-11-11-01:03)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Failed to open or find the device
Error: Can't find a picoprobe device! Please check device connections and permissions.

What I tried

I will write what i tried:

Hardware problem?

I think it is NOT hardware problems
I checked the connections and change USB-cable to another, but it doesnt got better.
(And I tried on other computer, but the tool couldn't go well)

Software problem?

For solving permission, I tried abobe-mentioned command with sudo like this:
sudo openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl -c "bindto 0.0.0.0"
but I got same error.
the environment is here:

  • macOS Monterey 12.6 (macbook pro 2017, Intel core-i7)
  • OpenOCD (cloned on rp2040 branch, commit on [228ede4])
  • Picoprobe(cloned on master, commit on [b1799bf]])

Conclusion

So I think the tool cannot run well on macOS.
Is there anyone who had same problem like me?

thanks,

libusb errors seen on both RPiOS and macOS

Note Previously posted in raspberrypi/picoprobe, but this is a more appropriate place.

With a fresh builds of openocd and picoprobe (using Pico Getting Started Guide instructions) on a Pi 400, I'm seeing:

sudo openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl                                    [ pico ]
Open On-Chip Debugger 0.11.0-g228ede4-dirty (2022-08-10-09:29)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 kHz
Error: libusb_bulk_read error: LIBUSB_ERROR_TIMEOUT
Error: libusb_bulk_read error: LIBUSB_ERROR_OVERFLOW
Info : DAP init failed

Error: libusb_bulk_read error: LIBUSB_ERROR_OVERFLOW
openocd: src/jtag/drivers/picoprobe.c:101: picoprobe_bulk_write: Assertion `pkt_hdr->total_packet_length <= PICOPROBE_MAX_PACKET_LENGTH' failed.

I did this on a Pi because I was seeing exactly the same issue under macOS (12.5 on an M1 Mac Mini) and wanted to see if I could get it working a more 'official' way.

Picoprobe is running on a Pico, as is the target.

Let me know if there's more info you need.

libusb is at 1.0.26

Upstream v0.11.0 introduced breaking change

As described in https://openocd.org/doc/html/TAP-Declaration.html at 10.8 DAP declaration:

Since OpenOCD version 0.11.0, the Debug Access Port (DAP) is no longer implicitly created together with the target. It must be explicitly declared using the dap create command. For all ARMv6-M, ARMv7 and ARMv8 targets, the option "-dap dap_name" has to be used instead of "-chain-position dotted.name" when the target is created.

The result is :

$ make ocd
openocd -f interface/stlink.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-02-19-14:57)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Warn : Could not determine executable path, using configured BINDIR.
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl:30: Error: Unknown param: -dp-id, try one of: -irlen, -irmask, -ircapture, -enable, -disable, -expected-id, or -ignore-version
in procedure 'script'
at file "embedded:startup.tcl", line 26
in procedure 'swj_newdap' called at file "/usr/local/bin/../share/openocd/scripts/target/rp2040.cfg", line 8
at file "/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl", line 30
*** Error 1 in /home/josuah/Code/libzmcu/rp2040/examples (../Makefile.mk:21 'ocd')

The relevant message is : Error: Unknown param: -dp-id.

At this line:

swj_newdap $_CHIPNAME.core0 cpu -dp-id $_CPUTAPID -instance-id 0

With swj_newdap defined in "/usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl" as:

proc swj_newdap {chip tag args} {
 if [using_jtag] {
     eval jtag newtap $chip $tag $args
 } elseif [using_swd] {
     eval swd newdap $chip $tag $args
 } else {
     echo "Error: transport '[ transport select ]' not supported by swj_newdap"
     shutdown
 }
}

As I understand, the flag -dp-id passed directly to swd newdap should now be passed to an extra dap create before that, as stated by https://openocd.org/doc/html/Debug-Adapter-Configuration.html at 8.3.2 SWD Transport:

The newer SWD devices (SW-DP v2 or SWJ-DP v2) support the multi-drop extension of SWD protocol: two or more devices can be connected to one SWD adapter. SWD transport works in multi-drop mode if DAP is configured with both -dp-id and -instance-id parameters regardless how many DAPs are created.

I have not a good enough understanding of OpenOCD and SWD to fix it myself at time of writing, in hope that changes some day!

FreeRTOS awareness + SMP

See discussion at earlephilhower/arduino-pico#1122.

Does this OpenOCD version have the capability to recognize FreeRTOS on top the symmetric multiprocessing awareness (dual-core Cortex-M0+)?

The FreeRTOS port used is https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/ThirdParty/GCC/RP2040 as is e.g. used in the popular Arduino core https://github.com/earlephilhower/arduino-pico.

Trying to mess around with the rp2040.cfg file with -rtos FreeRTOS has not gotten me anywhere since this FreeRTOS version does not use pxCurrentTCB but the "multicore" version of with pxCurrentTCBs that OpenOCD version does not recognize, unlike the e.g. ESP32 version.

It would be really nice to have GDB be able to decode the FreeRTOS tasks running on both Cortex-M0+s.

./bootstrap fails ... repo.or.cz is down?

when I try to compile the project it fails at the first ./bootstrap stage:

sal โžœ  openocd (rp2040) โœ— ./bootstrap
+ aclocal --warnings=all
+ libtoolize --automake --copy
+ autoconf --warnings=all
+ autoheader --warnings=all
+ automake --warnings=all --gnu --add-missing --copy
Setting up submodules
Cloning into '/home/gbin/projects/openocd/src/jtag/drivers/libjaylink'...
fatal: unable to access 'https://repo.or.cz/libjaylink.git/': Failed to connect to repo.or.cz port 443 after 128844 ms: Connection timed out
fatal: clone of 'https://repo.or.cz/libjaylink.git' into submodule path '/home/gbin/projects/openocd/src/jtag/drivers/libjaylink' failed
Failed to clone 'src/jtag/drivers/libjaylink'. Retry scheduled
Cloning into '/home/gbin/projects/openocd/tools/git2cl'...

it looks like repo.or.cz as a host is not responsive.

Using a Pico W for a picoprobe not working

I have been naively trying to use a PICO W for my picoprobe. However, it does not appear to work properly.
See below for detailed error messages.

I did some investigating and found the following:
In the driver file picoprobe.c (line 33), the PID is hardcoded for a regular pico.

#define PID 0x0004 /* Picoprobe */

However, the PID for the PICO W is 0x000C. I think this may be what is causing the device not to be found.

Command & Response (also tested using sudo and got the same output)
$ openocd -s ~/pico/openocd/tcl -f interface/picoprobe.cfg -f target/rp2040.cfg

Open On-Chip Debugger 0.11.0-g8e3c38f (2023-01-24-14:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Failed to open or find the device
Error: Can't find a picoprobe device! Please check device connections and permissions.

"PAGE_SIZE redefined error" during compilation

Hello rpi team,

I'm compiling this RPi's OpenOCD to use the FT2232 on the Pico using Windows 10 (with Cygwin).

However during the compilation, it gives this message:

src/flash/nor/rp2040.c:150: error: "PAGE_SIZE" redefined [-Werror]
150 | #define PAGE_SIZE 256
|
In file included from /usr/lib/gcc/x86_64-pc-cygwin/10/include/limits.h:195,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/syslimits.h:7,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/limits.h:34,
from /usr/include/sys/param.h:12,
from ./src/helper/system.h:75,
from ./config.h:350,
from src/flash/nor/rp2040.c:2:
/usr/include/limits.h:223: note: this is the location of the previous definition
223 | #define PAGE_SIZE PAGESIZE
|

Should we have include guards for the PAGE_SIZE? This occurs in commit 7c96119.

Add hint on how to disable jimtcl

Hello,

This might be a corner-case, but on quite few boxes I don't have git installed.
And when running ./configure for openOCD it fails "jimtcl" with just a hint to run "git submodule and git submodule update".

However it would be nice with a hint on how to disable it in the error code as can be seen for i.e "libjaylink":

configure: error: Internal libjaylink not found, run either 'git submodule init' and 'git submodule update' or disable internal libjaylink with --disable-internal-libjaylink.

It is possible to disable jimtcl with --disable-internal-jimtcl

Greetings,

Failed to launch OpenOCD GDB Server

I'm trying to get debugging to work with VS Code on my M1 Mac, but I'm getting this Error Failed to launch OpenOCD GDB Server: Error: spawn openocd ENOENT and I can't find any solution on how to fix it.

debug console output:

Cortex-Debug: VSCode debugger extension version 1.6.9 git(4c381ef). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /Users/tim/Downloads/sequencer/build/sequencer.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /Users/tim/Downloads/sequencer/build/sequencer.elf
Launching GDB: arm-none-eabi-gdb -q --interpreter=mi2
1-gdb-version
Launching gdb-server: openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /Users/tim/Downloads/sequencer -f /Users/tim/.vscode/extensions/marus25.cortex-debug-1.6.9/support/openocd-helpers.tcl -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
    Please check TERMINAL tab (gdb-server) for output from openocd
Failed to launch OpenOCD GDB Server: Error: spawn openocd ENOENT

terminal output:

[2023-01-16T18:48:45.864Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /Users/tim/Downloads/sequencer -f /Users/tim/.vscode/extensions/marus25.cortex-debug-1.6.9/support/openocd-helpers.tcl -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
[2023-01-16T18:48:47.989Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Pico Debug",
            "cwd": "${workspaceRoot}",
            "executable": "${command:cmake.launchTargetPath}",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "openocd",
            "gdbPath" : "arm-none-eabi-gdb",
            "device": "RP2040",
            "configFiles": [
                "interface/raspberrypi-swd.cfg",
                "target/rp2040.cfg"
            ],
            "svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
            "runToMain": true,
            // Work around for stopping at main on restart
            "postRestartCommands": [
                "break main",
                "continue"
            ],
            "showDevDebugOutput": "raw"
        }
    ]
}

Openocd one-liner for proper multicore RP2040 MCU reset?

Hi all,

First, copying my query from https://stackoverflow.com/questions/72745969/openocd-one-liner-for-proper-multicore-mcu-reset :

I am working with a RP2040 multicore MCU running FreeRTOS SMP; and so far I have used the following one-liner command to restart the code running on the MCU (I use openocd in MINGW64 bash):

/c/path/to/openocd/src/openocd.exe -s /c/path/to/openocd/tcl -f interface/picoprobe.cfg -f target/rp2040.cfg -c "init ; reset ; exit"

A lot of the times this command works for me, but occasionally I've experienced, that when I use certain construct (e.g. timer ISR), and I use this command, something goes wrong - either the timer ISR does not start, or some FreeRTOS task does not start.

I spent quite a bit of time thinking this happens either due to improper coding on my side, or a bug in FreeRTOS - however, I almost by accident noticed, that if instead of the above command, I restart the code in a gdb session - which means that in one terminal I have openocd running:

/c/path/to/openocd/src/openocd.exe -s /c/path/to/openocd/tcl -f interface/picoprobe.cfg -f target/rp2040.cfg

... and in another terminal, I have gdb running:

gdb-multiarch my_progam.elf -ex 'target extended-remote localhost:3333'

... and I restart via run command in gdb:

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: C:\path\to\my_progam\build\my_progam.elf

... then my code starts running properly, as expected!!

My only guess for this problem is, that when running the one-liner openocd command, access to both cores is probably not "simultaneous" and so there might happen a discrepancy in timing of the startup routine on the MCU; gdb on the other hand, when starting up the session, halts both cores, and so (I guess), when doing run, the code is restarted synchronously across both cores, and things work as intended.

So, my question is: is there an openocd one-liner command, that would restart the code on the MCU in the same way run in gdb does?


I've also tried to run openocd with -d, and captured the output while doing run in gdb; I don't really understand it at this time, but I tried to isolate the openocd commands that run as a result of gdb run command:

Debug: 743 10952 command.c:146 script_debug(): command - target names
Debug: 744 10953 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-start
Debug: 745 10953 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-start
Debug: 746 10953 command.c:146 script_debug(): command - transport select
Debug: 747 10953 command.c:146 script_debug(): command - transport select
Debug: 748 10954 command.c:146 script_debug(): command - rp2040.core0 invoke-event examine-start
Debug: 749 10954 command.c:146 script_debug(): command - rp2040.core0 arp_examine allow-defer

Debug: 758 10958 command.c:146 script_debug(): command - rp2040.core0 invoke-event examine-end
Debug: 759 10958 command.c:146 script_debug(): command - transport select
Debug: 760 10958 command.c:146 script_debug(): command - rp2040.core1 invoke-event examine-start
Debug: 761 10958 command.c:146 script_debug(): command - rp2040.core1 arp_examine allow-defer

Debug: 770 10962 command.c:146 script_debug(): command - rp2040.core1 invoke-event examine-end
Debug: 771 10962 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-assert-pre
Debug: 772 10962 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-assert-pre
Debug: 773 10963 command.c:146 script_debug(): command - transport select
Debug: 774 10963 command.c:146 script_debug(): command - rp2040.core0 arp_reset assert 1

Debug: 796 11047 command.c:146 script_debug(): command - transport select
Debug: 797 11048 command.c:146 script_debug(): command - rp2040.core1 arp_reset assert 1

Debug: 818 11141 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-assert-post
Debug: 819 11141 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-assert-post
Debug: 820 11142 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-deassert-pre
Debug: 821 11142 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-deassert-pre
Debug: 822 11142 command.c:146 script_debug(): command - transport select
Debug: 823 11142 command.c:146 script_debug(): command - rp2040.core0 arp_reset deassert 1

Debug: 828 11143 command.c:146 script_debug(): command - transport select
Debug: 829 11144 command.c:146 script_debug(): command - rp2040.core1 arp_reset deassert 1

Debug: 832 11144 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-deassert-post
Debug: 833 11145 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-deassert-post
Debug: 834 11145 command.c:146 script_debug(): command - transport select
Debug: 835 11145 command.c:146 script_debug(): command - rp2040.core0 was_examined
Debug: 836 11145 command.c:146 script_debug(): command - rp2040.core0 arp_waitstate halted 1000

Debug: 954 11189 command.c:146 script_debug(): command - rp2040.core0 curstate
Debug: 955 11190 command.c:146 script_debug(): command - transport select
Debug: 956 11190 command.c:146 script_debug(): command - rp2040.core1 was_examined
Debug: 957 11190 command.c:146 script_debug(): command - rp2040.core1 arp_waitstate halted 1000

Debug: 1070 11232 command.c:146 script_debug(): command - rp2040.core1 curstate
Debug: 1071 11233 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-end
Debug: 1072 11233 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-end

Debug: 1084 11246 gdb_server.c:2744 gdb_handle_vcont_packet(): target rp2040.core0 continue

... so I tried something like this:

/c/path/to/openocd/src/openocd.exe -s /c/path/to/openocd/tcl -f interface/picoprobe.cfg -f target/rp2040.cfg -c "init ; reset halt ; sleep 100; target names; target rp2040.core0 continue"

... but that fails with Error: invalid subcommand "rp2040.core0 continue".

So, unfortunately, I cannot deduce from this log, what sort of command to use, to ensure RP2040 is properly started, like it happens with gdb run command - so I really hope someone can help with which commands I can use in an openocd one-liner, to properly restart the code ...

Segfault with -c "gdb_port disabled"

I am have set up the OpenOCD Runner action inside CLion IDE, if you just run the target it will start OpenOCD with few commands to disable ports and program flash.

This is example command created by IDE:

$ /usr/local/bin/openocd -s /usr/local/share/openocd/scripts -f /Volumes/Storage/Projects/RP2040/rp2040-project-template/openocd.cfg -c "tcl_port disabled" -c "gdb_port disabled" -c "tcl_port disabled" -c "program \"/Volumes/Storage/Projects/RP2040/rp2040-project-template/cmake-build-debug/rp2040_project.elf\"" -c reset -c shutdown

Running it causes segfault at this step:

Open On-Chip Debugger 0.10.0+dev-g71510a77a61c (2021-06-25-18:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
User : 13 0 options.c:63 configuration_output_handler(): debug_level: 3
User : 14 0 options.c:63 configuration_output_handler():
Debug: 15 0 options.c:244 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 0 options.c:245 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 0 options.c:246 add_default_dirs(): exepath=/usr/local/bin
Debug: 18 0 options.c:247 add_default_dirs(): bin2data=../share/openocd
Debug: 19 0 configuration.c:42 add_script_search_dir(): adding /Users/aurimas/Library/Preferences/org.openocd
Debug: 20 0 configuration.c:42 add_script_search_dir(): adding /Users/aurimas/.config/openocd
Debug: 21 0 configuration.c:42 add_script_search_dir(): adding /Users/aurimas/.openocd
Debug: 22 0 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/site
Debug: 23 0 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/scripts
Debug: 24 1 configuration.c:97 find_file(): found /Volumes/Storage/Projects/RP2040/rp2040-project-template/openocd.cfg
Debug: 25 1 configuration.c:97 find_file(): found /usr/local/share/openocd/scripts/interface/cmsis-dap.cfg
Debug: 26 1 command.c:146 script_debug(): command - adapter driver cmsis-dap
Debug: 28 1 command.c:352 register_command_handler(): registering 'cmsis-dap'...
Debug: 29 1 command.c:352 register_command_handler(): registering 'cmsis-dap'...
Debug: 30 1 command.c:352 register_command_handler(): registering 'cmsis_dap_vid_pid'...
Debug: 31 1 command.c:352 register_command_handler(): registering 'cmsis_dap_serial'...
Debug: 32 1 command.c:146 script_debug(): command - transport select swd
Debug: 33 1 command.c:352 register_command_handler(): registering 'swd'...
Debug: 34 1 command.c:146 script_debug(): command - adapter speed 4000
Debug: 36 1 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 37 1 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 38 1 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 39 1 configuration.c:97 find_file(): found /usr/local/share/openocd/scripts/target/rp2040.cfg
Debug: 40 1 configuration.c:97 find_file(): found /usr/local/share/openocd/scripts/target/swj-dp.tcl
Debug: 41 1 command.c:146 script_debug(): command - transport select
Debug: 42 1 configuration.c:97 find_file(): found /usr/local/share/openocd/scripts/mem_helper.tcl
Debug: 43 1 command.c:146 script_debug(): command - add_usage_text mrw address
Debug: 45 1 command.c:1123 help_add_command(): added 'mrw' help text
Debug: 46 1 command.c:146 script_debug(): command - add_help_text mrw Returns value of word in memory.
Debug: 48 1 command.c:1136 help_add_command(): added 'mrw' help text
Debug: 49 1 command.c:146 script_debug(): command - add_usage_text mrh address
Debug: 51 1 command.c:1123 help_add_command(): added 'mrh' help text
Debug: 52 1 command.c:146 script_debug(): command - add_help_text mrh Returns value of halfword in memory.
Debug: 54 1 command.c:1136 help_add_command(): added 'mrh' help text
Debug: 55 16 command.c:146 script_debug(): command - add_usage_text mrb address
Debug: 57 16 command.c:1123 help_add_command(): added 'mrb' help text
Debug: 58 16 command.c:146 script_debug(): command - add_help_text mrb Returns value of byte in memory.
Debug: 60 16 command.c:1136 help_add_command(): added 'mrb' help text
Debug: 61 16 command.c:146 script_debug(): command - add_usage_text mmw address setbits clearbits
Debug: 63 16 command.c:1123 help_add_command(): added 'mmw' help text
Debug: 64 16 command.c:146 script_debug(): command - add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 66 16 command.c:1136 help_add_command(): added 'mmw' help text
Debug: 67 16 command.c:146 script_debug(): command - transport select
Debug: 68 16 command.c:146 script_debug(): command - transport select
Debug: 69 16 command.c:146 script_debug(): command - swd newdap rp2040.core0 cpu -dp-id 0x01002927 -instance-id 0
Debug: 70 16 tcl.c:605 jim_newtap_cmd(): Creating New Tap, Chip: rp2040.core0, Tap: cpu, Dotted: rp2040.core0.cpu, 4 params
Debug: 71 19 tcl.c:618 jim_newtap_cmd(): Processing option: -dp-id
Debug: 72 19 tcl.c:618 jim_newtap_cmd(): Processing option: -instance-id
Debug: 73 19 core.c:1488 jtag_tap_init(): Created Tap: rp2040.core0.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 74 19 command.c:146 script_debug(): command - transport select
Debug: 75 19 command.c:146 script_debug(): command - transport select
Debug: 76 19 command.c:146 script_debug(): command - swd newdap rp2040.core1 cpu -dp-id 0x01002927 -instance-id 1
Debug: 77 19 tcl.c:605 jim_newtap_cmd(): Creating New Tap, Chip: rp2040.core1, Tap: cpu, Dotted: rp2040.core1.cpu, 4 params
Debug: 78 19 tcl.c:618 jim_newtap_cmd(): Processing option: -dp-id
Debug: 79 19 tcl.c:618 jim_newtap_cmd(): Processing option: -instance-id
Debug: 80 19 core.c:1488 jtag_tap_init(): Created Tap: rp2040.core1.cpu @ abs position 1, irlen 0, capture: 0x0 mask: 0x0
Debug: 81 19 command.c:146 script_debug(): command - dap create rp2040.core0.dap -chain-position rp2040.core0.cpu
Debug: 82 19 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 83 19 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 84 19 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 85 19 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 86 19 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 87 22 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 88 22 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 89 22 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 90 22 command.c:352 register_command_handler(): registering 'rp2040.core0.dap'...
Debug: 91 22 command.c:146 script_debug(): command - target create rp2040.core0 cortex_m -endian little -coreid 0 -dap rp2040.core0.dap -rtos hwthread
Info : 92 22 hwthread.c:378 hwthread_create(): Hardware thread awareness created
Debug: 93 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 94 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 95 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 96 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 97 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 98 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 99 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 100 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 101 22 command.c:352 register_command_handler(): registering 'arm'...
Debug: 102 22 command.c:352 register_command_handler(): registering 'tpiu'...
Debug: 103 22 command.c:352 register_command_handler(): registering 'itm'...
Debug: 104 22 command.c:352 register_command_handler(): registering 'itm'...
Debug: 105 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 106 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 107 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 108 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 109 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 110 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 111 22 command.c:352 register_command_handler(): registering 'cortex_m'...
Debug: 112 22 command.c:374 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 113 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 114 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 115 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 116 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 117 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 118 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 119 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 120 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 121 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 122 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 123 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 124 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 125 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 126 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 127 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 128 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 129 22 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 130 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 131 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 132 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 133 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 134 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 135 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 136 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 137 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 138 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 139 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 140 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 141 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 142 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 143 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 144 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 145 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 146 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 147 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 148 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 149 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 150 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 151 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 152 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 153 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 154 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 155 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 156 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 157 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 158 23 command.c:352 register_command_handler(): registering 'rp2040.core0'...
Debug: 159 23 command.c:374 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 160 23 command.c:146 script_debug(): command - rp2040.core0 configure -work-area-phys 0x20010000 -work-area-size 0x10000 -work-area-backup 0
Debug: 161 23 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 162 23 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 163 23 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 164 23 command.c:146 script_debug(): command - cortex_m reset_config sysresetreq
Debug: 166 23 command.c:146 script_debug(): command - dap create rp2040.core1.dap -chain-position rp2040.core1.cpu
Debug: 167 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 168 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 169 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 170 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 171 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 172 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 173 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 174 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 175 23 command.c:352 register_command_handler(): registering 'rp2040.core1.dap'...
Debug: 176 23 command.c:146 script_debug(): command - target create rp2040.core1 cortex_m -endian little -coreid 1 -dap rp2040.core1.dap -rtos hwthread
Info : 177 23 hwthread.c:378 hwthread_create(): Hardware thread awareness created
Debug: 178 23 command.c:374 register_command(): command 'arm' is already registered in '<global>' context
Debug: 179 23 command.c:374 register_command(): command 'reg' is already registered in 'arm' context
Debug: 180 23 command.c:374 register_command(): command 'core_state' is already registered in 'arm' context
Debug: 181 23 command.c:374 register_command(): command 'disassemble' is already registered in 'arm' context
Debug: 182 23 command.c:374 register_command(): command 'mcr' is already registered in 'arm' context
Debug: 183 23 command.c:374 register_command(): command 'mrc' is already registered in 'arm' context
Debug: 184 23 command.c:374 register_command(): command 'semihosting' is already registered in 'arm' context
Debug: 185 23 command.c:374 register_command(): command 'semihosting_cmdline' is already registered in 'arm' context
Debug: 186 23 command.c:374 register_command(): command 'semihosting_fileio' is already registered in 'arm' context
Debug: 187 23 command.c:374 register_command(): command 'semihosting_resexit' is already registered in 'arm' context
Debug: 188 23 command.c:374 register_command(): command 'tpiu' is already registered in '<global>' context
Debug: 189 23 command.c:374 register_command(): command 'config' is already registered in 'tpiu' context
Debug: 190 23 command.c:374 register_command(): command 'itm' is already registered in '<global>' context
Debug: 191 23 command.c:374 register_command(): command 'port' is already registered in 'itm' context
Debug: 192 23 command.c:374 register_command(): command 'ports' is already registered in 'itm' context
Debug: 193 23 command.c:374 register_command(): command 'cortex_m' is already registered in '<global>' context
Debug: 194 23 command.c:374 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 195 23 command.c:374 register_command(): command 'maskisr' is already registered in 'cortex_m' context
Debug: 196 23 command.c:374 register_command(): command 'vector_catch' is already registered in 'cortex_m' context
Debug: 197 23 command.c:374 register_command(): command 'reset_config' is already registered in 'cortex_m' context
Debug: 198 23 command.c:374 register_command(): command 'smp' is already registered in 'cortex_m' context
Debug: 199 23 command.c:374 register_command(): command 'smp_on' is already registered in 'cortex_m' context
Debug: 200 23 command.c:374 register_command(): command 'smp_off' is already registered in 'cortex_m' context
Debug: 201 23 command.c:374 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 202 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 203 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 204 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 205 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 206 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 207 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 208 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 209 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 210 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 211 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 212 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 213 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 214 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 215 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 216 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 217 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 218 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 219 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 220 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 221 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 222 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 223 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 224 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 225 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 226 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 227 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 228 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 229 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 230 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 231 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 232 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 233 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 234 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 235 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 236 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 237 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 238 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 239 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 240 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 241 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 242 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 243 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 244 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 245 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 246 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 247 23 command.c:352 register_command_handler(): registering 'rp2040.core1'...
Debug: 248 23 command.c:374 register_command(): command 'smp_gdb' is already registered in 'cortex_m' context
Debug: 249 23 command.c:146 script_debug(): command - rp2040.core1 configure -work-area-phys 0x20010000 -work-area-size 0x10000 -work-area-backup 0
Debug: 250 23 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 251 23 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 252 23 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 253 23 command.c:146 script_debug(): command - cortex_m reset_config sysresetreq
Debug: 255 23 command.c:146 script_debug(): command - target smp rp2040.core0 rp2040.core1
Debug: 256 23 target.c:5727 jim_target_smp(): 3
Debug: 257 23 target.c:5737 jim_target_smp(): rp2040.core0
Debug: 258 23 target.c:5737 jim_target_smp(): rp2040.core1
Debug: 259 23 hwthread.c:200 hwthread_update_threads(): hwthread_update_threads current_thread=-1
Debug: 260 23 command.c:146 script_debug(): command - flash bank rp2040.flash rp2040_flash 0x10000000 0x200000 1 32 rp2040.core0
Info : 262 23 rp2040.c:385 rp2040_flash_bank_command(): RP2040 Flash Bank Command
Debug: 263 23 tcl.c:1258 handle_flash_bank_command(): 'rp2040_flash' driver usage field missing
Debug: 264 23 command.c:146 script_debug(): command - targets rp2040.core0
Debug: 266 23 command.c:146 script_debug(): command - reset_config srst_nogate
Debug: 268 23 command.c:146 script_debug(): command - gdb_flash_program enable
Debug: 270 23 command.c:146 script_debug(): command - gdb_memory_map enable
Debug: 272 23 command.c:146 script_debug(): command - tcl_port disabled
Debug: 274 23 command.c:146 script_debug(): command - gdb_port disabled
Debug: 276 23 command.c:146 script_debug(): command - tcl_port disabled
Debug: 278 23 command.c:146 script_debug(): command - init
Debug: 280 23 command.c:146 script_debug(): command - target init
Debug: 282 23 command.c:146 script_debug(): command - target names
Debug: 283 23 command.c:146 script_debug(): command - rp2040.core0 cget -event gdb-flash-erase-start
Debug: 284 23 command.c:146 script_debug(): command - rp2040.core0 configure -event gdb-flash-erase-start reset init
Debug: 285 23 command.c:146 script_debug(): command - rp2040.core0 cget -event gdb-flash-write-end
Debug: 286 23 command.c:146 script_debug(): command - rp2040.core0 configure -event gdb-flash-write-end reset halt
Debug: 287 23 command.c:146 script_debug(): command - rp2040.core0 cget -event gdb-attach
Debug: 288 23 command.c:146 script_debug(): command - rp2040.core0 configure -event gdb-attach halt 1000
Debug: 289 23 command.c:146 script_debug(): command - rp2040.core1 cget -event gdb-flash-erase-start
Debug: 290 23 command.c:146 script_debug(): command - rp2040.core1 configure -event gdb-flash-erase-start reset init
Debug: 291 23 command.c:146 script_debug(): command - rp2040.core1 cget -event gdb-flash-write-end
Debug: 292 23 command.c:146 script_debug(): command - rp2040.core1 configure -event gdb-flash-write-end reset halt
Debug: 293 23 command.c:146 script_debug(): command - rp2040.core1 cget -event gdb-attach
Debug: 294 24 command.c:146 script_debug(): command - rp2040.core1 configure -event gdb-attach halt 1000
Debug: 295 24 target.c:1458 handle_target_init_command(): Initializing targets...
Debug: 296 24 semihosting_common.c:97 semihosting_common_init():
Debug: 297 24 semihosting_common.c:97 semihosting_common_init():
Debug: 298 24 command.c:352 register_command_handler(): registering 'target_request'...
Debug: 299 24 command.c:352 register_command_handler(): registering 'trace'...
Debug: 300 24 command.c:352 register_command_handler(): registering 'trace'...
Debug: 301 24 command.c:352 register_command_handler(): registering 'fast_load_image'...
Debug: 302 24 command.c:352 register_command_handler(): registering 'fast_load'...
Debug: 303 24 command.c:352 register_command_handler(): registering 'profile'...
Debug: 304 24 command.c:352 register_command_handler(): registering 'virt2phys'...
Debug: 305 24 command.c:352 register_command_handler(): registering 'reg'...
Debug: 306 24 command.c:352 register_command_handler(): registering 'poll'...
Debug: 307 24 command.c:352 register_command_handler(): registering 'wait_halt'...
Debug: 308 24 command.c:352 register_command_handler(): registering 'halt'...
Debug: 309 24 command.c:352 register_command_handler(): registering 'resume'...
Debug: 310 24 command.c:352 register_command_handler(): registering 'reset'...
Debug: 311 24 command.c:352 register_command_handler(): registering 'soft_reset_halt'...
Debug: 312 24 command.c:352 register_command_handler(): registering 'step'...
Debug: 313 24 command.c:352 register_command_handler(): registering 'mdd'...
Debug: 314 24 command.c:352 register_command_handler(): registering 'mdw'...
Debug: 315 24 command.c:352 register_command_handler(): registering 'mdh'...
Debug: 316 24 command.c:352 register_command_handler(): registering 'mdb'...
Debug: 317 24 command.c:352 register_command_handler(): registering 'mwd'...
Debug: 318 24 command.c:352 register_command_handler(): registering 'mww'...
Debug: 319 24 command.c:352 register_command_handler(): registering 'mwh'...
Debug: 320 24 command.c:352 register_command_handler(): registering 'mwb'...
Debug: 321 24 command.c:352 register_command_handler(): registering 'bp'...
Debug: 322 24 command.c:352 register_command_handler(): registering 'rbp'...
Debug: 323 24 command.c:352 register_command_handler(): registering 'wp'...
Debug: 324 24 command.c:352 register_command_handler(): registering 'rwp'...
Debug: 325 24 command.c:352 register_command_handler(): registering 'load_image'...
Debug: 326 24 command.c:352 register_command_handler(): registering 'dump_image'...
Debug: 327 24 command.c:352 register_command_handler(): registering 'verify_image_checksum'...
Debug: 328 24 command.c:352 register_command_handler(): registering 'verify_image'...
Debug: 329 24 command.c:352 register_command_handler(): registering 'test_image'...
Debug: 330 24 command.c:352 register_command_handler(): registering 'reset_nag'...
Debug: 331 24 command.c:352 register_command_handler(): registering 'ps'...
Debug: 332 24 command.c:352 register_command_handler(): registering 'test_mem_access'...
Info : 333 33 cmsis_dap_usb.c:919 cmsis_dap_get_caps_info(): CMSIS-DAP: SWD  Supported
Info : 334 33 cmsis_dap_usb.c:921 cmsis_dap_get_caps_info(): CMSIS-DAP: JTAG Supported
Info : 335 35 cmsis_dap_usb.c:899 cmsis_dap_get_version_info(): CMSIS-DAP: FW Version = v0.1
Info : 336 37 cmsis_dap_usb.c:884 cmsis_dap_get_serial_info(): CMSIS-DAP: Serial# = 123456
Info : 337 39 cmsis_dap_usb.c:1022 cmsis_dap_swd_open(): CMSIS-DAP: Interface Initialised (SWD)
Debug: 338 41 cmsis_dap_usb.c:1094 cmsis_dap_init(): CMSIS-DAP: Packet Size = 64
Debug: 339 43 cmsis_dap_usb.c:1107 cmsis_dap_init(): CMSIS-DAP: Packet Count = 1
Debug: 340 43 cmsis_dap_usb.c:1110 cmsis_dap_init(): Allocating FIFO for 1 pending HID requests
Info : 341 45 cmsis_dap_usb.c:940 cmsis_dap_get_status(): SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : 342 55 cmsis_dap_usb.c:1164 cmsis_dap_init(): CMSIS-DAP: Interface ready
Debug: 343 55 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 344 55 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 345 57 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 346 57 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 347 57 core.c:1565 adapter_init(): clock speed 4000 kHz
Debug: 348 57 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 349 57 command.c:146 script_debug(): command - transport init
Debug: 351 57 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 352 57 command.c:146 script_debug(): command - dap init
Debug: 354 57 arm_dap.c:116 dap_init_all(): Initializing all DAPs ...
Debug: 355 61 cmsis_dap_usb.c:984 cmsis_dap_swd_switch_seq(): DORMANT-to-SWD
Debug: 356 69 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Info : 357 77 adi_v5_swd.c:226 swd_multidrop_connect(): SWD DPIDR 0x0bc12477
Info : 358 77 adi_v5_swd.c:227 swd_multidrop_connect(): SWD DLPIDR 0x00000001
Debug: 359 77 arm_adi_v5.c:653 dap_dp_init(): rp2040.core0.dap
Debug: 360 79 arm_adi_v5.c:698 dap_dp_init(): DAP: wait CDBGPWRUPACK
Debug: 361 79 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000
Debug: 362 81 arm_adi_v5.c:706 dap_dp_init(): DAP: wait CSYSPWRUPACK
Debug: 363 81 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x80000000, value 0x80000000
Debug: 364 83 cmsis_dap_usb.c:716 cmsis_dap_swd_write_from_queue(): refusing to enable sticky overrun detection
Debug: 365 89 cmsis_dap_usb.c:984 cmsis_dap_swd_switch_seq(): DORMANT-to-SWD
Debug: 366 97 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Info : 367 105 adi_v5_swd.c:226 swd_multidrop_connect(): SWD DPIDR 0x0bc12477
Info : 368 105 adi_v5_swd.c:227 swd_multidrop_connect(): SWD DLPIDR 0x10000001
Debug: 369 105 arm_adi_v5.c:653 dap_dp_init(): rp2040.core1.dap
Debug: 370 107 arm_adi_v5.c:698 dap_dp_init(): DAP: wait CDBGPWRUPACK
Debug: 371 107 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000
Debug: 372 109 arm_adi_v5.c:706 dap_dp_init(): DAP: wait CSYSPWRUPACK
Debug: 373 109 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x80000000, value 0x80000000
Debug: 374 111 cmsis_dap_usb.c:716 cmsis_dap_swd_write_from_queue(): refusing to enable sticky overrun detection
Debug: 375 113 openocd.c:158 handle_init_command(): Examining targets...
Debug: 376 113 target.c:1646 target_call_event_callbacks(): target event 19 (examine-start) for core rp2040.core0
Debug: 377 117 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 378 127 arm_adi_v5.c:888 dap_find_ap(): Found AHB3-AP at AP index: 0 (IDR=0x04770031)
Debug: 379 129 arm_adi_v5.c:777 mem_ap_init(): MEM_AP Packed Transfers: disabled
Debug: 380 129 arm_adi_v5.c:788 mem_ap_init(): MEM_AP CFG: large data 0, long address 0, big-endian 0
Debug: 381 131 target.c:2408 target_read_u32(): address: 0xe000ed00, value: 0x410cc601
Debug: 382 131 cortex_m.c:2349 cortex_m_examine(): Cortex-M0 r0p1 processor detected
Debug: 383 131 cortex_m.c:2360 cortex_m_examine(): cpuid: 0x410cc601
Debug: 384 133 target.c:2408 target_read_u32(): address: 0xe000edf0, value: 0x01040001
Debug: 385 133 target.c:2496 target_write_u32(): address: 0xe000edfc, value: 0x01000000
Debug: 386 137 target.c:2408 target_read_u32(): address: 0xe0002000, value: 0x00000041
Debug: 387 137 target.c:2496 target_write_u32(): address: 0xe0002008, value: 0x00000000
Debug: 388 139 target.c:2496 target_write_u32(): address: 0xe000200c, value: 0x00000000
Debug: 389 141 target.c:2496 target_write_u32(): address: 0xe0002010, value: 0x00000000
Debug: 390 143 target.c:2496 target_write_u32(): address: 0xe0002014, value: 0x00000000
Debug: 391 145 cortex_m.c:2465 cortex_m_examine(): FPB fpcr 0x41, numcode 4, numlit 0
Debug: 392 147 target.c:2408 target_read_u32(): address: 0xe0001000, value: 0x20000000
Debug: 393 147 cortex_m.c:2176 cortex_m_dwt_setup(): DWT_CTRL: 0x20000000
Debug: 394 149 target.c:2408 target_read_u32(): address: 0xe0001fbc, value: 0x00000000
Debug: 395 149 cortex_m.c:2183 cortex_m_dwt_setup(): DWT_DEVARCH: 0x0
Debug: 396 149 target.c:2496 target_write_u32(): address: 0xe0001028, value: 0x00000000
Debug: 397 151 target.c:2496 target_write_u32(): address: 0xe0001038, value: 0x00000000
Debug: 398 153 cortex_m.c:2232 cortex_m_dwt_setup(): DWT dwtcr 0x20000000, comp 2, watch/trigger
Info : 399 153 cortex_m.c:2475 cortex_m_examine(): rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Debug: 400 153 target.c:1646 target_call_event_callbacks(): target event 21 (examine-end) for core rp2040.core0
Debug: 401 153 target.c:1646 target_call_event_callbacks(): target event 19 (examine-start) for core rp2040.core1
Debug: 402 157 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 403 167 arm_adi_v5.c:888 dap_find_ap(): Found AHB3-AP at AP index: 0 (IDR=0x04770031)
Debug: 404 169 arm_adi_v5.c:777 mem_ap_init(): MEM_AP Packed Transfers: disabled
Debug: 405 169 arm_adi_v5.c:788 mem_ap_init(): MEM_AP CFG: large data 0, long address 0, big-endian 0
Debug: 406 171 target.c:2408 target_read_u32(): address: 0xe000ed00, value: 0x410cc601
Debug: 407 171 cortex_m.c:2349 cortex_m_examine(): Cortex-M0 r0p1 processor detected
Debug: 408 171 cortex_m.c:2360 cortex_m_examine(): cpuid: 0x410cc601
Debug: 409 173 target.c:2408 target_read_u32(): address: 0xe000edf0, value: 0x01040001
Debug: 410 173 target.c:2496 target_write_u32(): address: 0xe000edfc, value: 0x01000000
Debug: 411 177 target.c:2408 target_read_u32(): address: 0xe0002000, value: 0x00000041
Debug: 412 177 target.c:2496 target_write_u32(): address: 0xe0002008, value: 0x00000000
Debug: 413 179 target.c:2496 target_write_u32(): address: 0xe000200c, value: 0x00000000
Debug: 414 181 target.c:2496 target_write_u32(): address: 0xe0002010, value: 0x00000000
Debug: 415 183 target.c:2496 target_write_u32(): address: 0xe0002014, value: 0x00000000
Debug: 416 185 cortex_m.c:2465 cortex_m_examine(): FPB fpcr 0x41, numcode 4, numlit 0
Debug: 417 187 target.c:2408 target_read_u32(): address: 0xe0001000, value: 0x20000000
Debug: 418 187 cortex_m.c:2176 cortex_m_dwt_setup(): DWT_CTRL: 0x20000000
Debug: 419 189 target.c:2408 target_read_u32(): address: 0xe0001fbc, value: 0x00000000
Debug: 420 189 cortex_m.c:2183 cortex_m_dwt_setup(): DWT_DEVARCH: 0x0
Debug: 421 189 target.c:2496 target_write_u32(): address: 0xe0001028, value: 0x00000000
Debug: 422 191 target.c:2496 target_write_u32(): address: 0xe0001038, value: 0x00000000
Debug: 423 193 cortex_m.c:2232 cortex_m_dwt_setup(): DWT dwtcr 0x20000000, comp 2, watch/trigger
Info : 424 193 cortex_m.c:2475 cortex_m_examine(): rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Debug: 425 193 target.c:1646 target_call_event_callbacks(): target event 21 (examine-end) for core rp2040.core1
Debug: 426 193 command.c:146 script_debug(): command - flash init
Debug: 427 197 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 428 211 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 430 221 tcl.c:1324 handle_flash_init_command(): Initializing flash devices...
Debug: 431 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 432 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 433 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 434 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 435 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 436 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 437 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 438 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 439 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 440 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 441 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 442 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 443 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 444 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 445 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 446 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 447 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 448 221 command.c:352 register_command_handler(): registering 'flash'...
Debug: 449 221 command.c:146 script_debug(): command - nand init
Debug: 450 225 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 451 239 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 453 249 tcl.c:498 handle_nand_init_command(): Initializing NAND devices...
Debug: 454 249 command.c:146 script_debug(): command - pld init
Debug: 455 253 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 456 267 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 458 277 pld.c:206 handle_pld_init_command(): Initializing PLDs...
Info : 459 277 gdb_server.c:3549 gdb_target_add_one(): gdb port disabled
Info : 460 277 gdb_server.c:3549 gdb_target_add_one(): gdb port disabled
Debug: 461 277 command.c:146 script_debug(): command - reset init
Debug: 462 282 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 463 296 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 465 306 target.c:1664 target_call_reset_callbacks(): target reset 3 (init)
Debug: 466 306 target.c:1664 target_call_reset_callbacks(): target reset 3 (init)
Debug: 467 306 command.c:146 script_debug(): command - target names
Debug: 468 306 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-start
Debug: 469 306 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-start
Debug: 470 306 command.c:146 script_debug(): command - transport select
Debug: 471 306 command.c:146 script_debug(): command - transport select
Debug: 472 306 command.c:146 script_debug(): command - rp2040.core0 invoke-event examine-start
Debug: 473 306 command.c:146 script_debug(): command - rp2040.core0 arp_examine allow-defer
Debug: 474 310 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 475 320 arm_adi_v5.c:888 dap_find_ap(): Found AHB3-AP at AP index: 0 (IDR=0x04770031)
Debug: 476 322 arm_adi_v5.c:777 mem_ap_init(): MEM_AP Packed Transfers: disabled
Debug: 477 322 arm_adi_v5.c:788 mem_ap_init(): MEM_AP CFG: large data 0, long address 0, big-endian 0
Debug: 478 322 command.c:146 script_debug(): command - rp2040.core0 invoke-event examine-end
Debug: 479 322 command.c:146 script_debug(): command - transport select
Debug: 480 322 command.c:146 script_debug(): command - rp2040.core1 invoke-event examine-start
Debug: 481 322 command.c:146 script_debug(): command - rp2040.core1 arp_examine allow-defer
Debug: 482 326 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 483 336 arm_adi_v5.c:888 dap_find_ap(): Found AHB3-AP at AP index: 0 (IDR=0x04770031)
Debug: 484 338 arm_adi_v5.c:777 mem_ap_init(): MEM_AP Packed Transfers: disabled
Debug: 485 338 arm_adi_v5.c:788 mem_ap_init(): MEM_AP CFG: large data 0, long address 0, big-endian 0
Debug: 486 338 command.c:146 script_debug(): command - rp2040.core1 invoke-event examine-end
Debug: 487 338 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-assert-pre
Debug: 488 338 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-assert-pre
Debug: 489 338 command.c:146 script_debug(): command - transport select
Debug: 490 338 command.c:146 script_debug(): command - rp2040.core0 arp_reset assert 1
Debug: 491 338 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 492 338 cortex_m.c:1251 cortex_m_assert_reset(): target->state: running
Debug: 493 342 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 494 356 cortex_m.c:1349 cortex_m_assert_reset(): Using Cortex-M SYSRESETREQ
Debug: 495 358 arm_adi_v5.c:653 dap_dp_init(): rp2040.core0.dap
Debug: 496 360 arm_adi_v5.c:698 dap_dp_init(): DAP: wait CDBGPWRUPACK
Debug: 497 360 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000
Debug: 498 362 arm_adi_v5.c:706 dap_dp_init(): DAP: wait CSYSPWRUPACK
Debug: 499 362 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x80000000, value 0x80000000
Debug: 500 364 cmsis_dap_usb.c:716 cmsis_dap_swd_write_from_queue(): refusing to enable sticky overrun detection
Debug: 501 425 cortex_m.c:789 cortex_m_halt(): target->state: reset
Debug: 502 425 command.c:146 script_debug(): command - transport select
Debug: 503 425 command.c:146 script_debug(): command - rp2040.core1 arp_reset assert 1
Debug: 504 425 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 505 425 cortex_m.c:1251 cortex_m_assert_reset(): target->state: running
Debug: 506 429 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 507 443 cortex_m.c:1349 cortex_m_assert_reset(): Using Cortex-M SYSRESETREQ
Debug: 508 445 arm_adi_v5.c:653 dap_dp_init(): rp2040.core1.dap
Debug: 509 447 arm_adi_v5.c:698 dap_dp_init(): DAP: wait CDBGPWRUPACK
Debug: 510 447 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000
Debug: 511 449 arm_adi_v5.c:706 dap_dp_init(): DAP: wait CSYSPWRUPACK
Debug: 512 449 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x80000000, value 0x80000000
Debug: 513 451 cmsis_dap_usb.c:716 cmsis_dap_swd_write_from_queue(): refusing to enable sticky overrun detection
Debug: 515 512 cortex_m.c:789 cortex_m_halt(): target->state: reset
Debug: 516 512 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-assert-post
Debug: 517 512 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-assert-post
Debug: 518 512 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-deassert-pre
Debug: 519 512 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-deassert-pre
Debug: 520 512 command.c:146 script_debug(): command - transport select
Debug: 521 512 command.c:146 script_debug(): command - rp2040.core0 arp_reset deassert 1
Debug: 522 512 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 523 512 cortex_m.c:1400 cortex_m_deassert_reset(): target->state: reset
Debug: 524 514 core.c:640 adapter_system_reset(): SRST line released
Debug: 525 514 command.c:146 script_debug(): command - transport select
Debug: 526 514 command.c:146 script_debug(): command - rp2040.core1 arp_reset deassert 1
Debug: 527 514 target.c:1991 target_free_all_working_areas_restore(): freeing all working areas
Debug: 528 514 cortex_m.c:1400 cortex_m_deassert_reset(): target->state: reset
Debug: 529 514 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-deassert-post
Debug: 530 514 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-deassert-post
Debug: 531 514 command.c:146 script_debug(): command - transport select
Debug: 532 514 command.c:146 script_debug(): command - rp2040.core0 was_examined
Debug: 533 514 command.c:146 script_debug(): command - rp2040.core0 arp_waitstate halted 1000
Debug: 534 518 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 535 528 target.c:3069 target_wait_state(): waiting for target halted...
Debug: 536 530 cortex_m.c:712 cortex_m_poll(): Exit from reset with dcb_dhcsr 0x30003
Debug: 537 532 cortex_m.c:301 cortex_m_endreset_event(): DCB_DEMCR = 0x01000401
Debug: 538 534 target.c:2496 target_write_u32(): address: 0xe0002000, value: 0x00000003
Debug: 539 538 target.c:2408 target_read_u32(): address: 0xe0002000, value: 0x00000041
Debug: 540 538 target.c:2496 target_write_u32(): address: 0xe0002008, value: 0x00000000
Debug: 541 540 target.c:2496 target_write_u32(): address: 0xe000200c, value: 0x00000000
Debug: 542 542 target.c:2496 target_write_u32(): address: 0xe0002010, value: 0x00000000
Debug: 543 544 target.c:2496 target_write_u32(): address: 0xe0002014, value: 0x00000000
Debug: 544 546 target.c:2496 target_write_u32(): address: 0xe0001020, value: 0x00000000
Debug: 545 548 target.c:2496 target_write_u32(): address: 0xe0001024, value: 0x00000000
Debug: 546 550 target.c:2496 target_write_u32(): address: 0xe0001028, value: 0x00000000
Debug: 547 552 target.c:2496 target_write_u32(): address: 0xe0001030, value: 0x00000000
Debug: 548 554 target.c:2496 target_write_u32(): address: 0xe0001034, value: 0x00000000
Debug: 549 556 target.c:2496 target_write_u32(): address: 0xe0001038, value: 0x00000000
Debug: 550 560 cortex_m.c:491 cortex_m_debug_entry():
Debug: 551 566 cortex_m.c:235 cortex_m_clear_halt():  NVIC_DFSR 0xb
Debug: 552 570 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 0  value 0xffffffff
Debug: 553 572 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 1  value 0xffffffff
Debug: 554 574 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 2  value 0xffffffff
Debug: 555 576 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 3  value 0xffffffff
Debug: 556 578 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 4  value 0xffffffff
Debug: 557 580 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 5  value 0xffffffff
Debug: 558 582 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 6  value 0xffffffff
Debug: 559 584 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 7  value 0xffffffff
Debug: 560 586 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 8  value 0xffffffff
Debug: 561 588 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 9  value 0xffffffff
Debug: 562 590 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 10  value 0xffffffff
Debug: 563 592 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 11  value 0xffffffff
Debug: 564 594 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 12  value 0xffffffff
Debug: 565 596 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 13  value 0x20041f00
Debug: 566 598 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 14  value 0xffffffff
Debug: 567 600 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 15  value 0xee
Debug: 568 602 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 16  value 0xf1000000
Debug: 569 604 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 17  value 0x20041f00
Debug: 570 606 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 18  value 0xfffffffc
Debug: 571 608 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 19 value 0x0
Debug: 572 610 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 20 value 0x0
Debug: 573 612 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 21 value 0x0
Debug: 574 614 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 22 value 0x0
Debug: 575 614 cortex_m.c:568 cortex_m_debug_entry(): entered debug state in core mode: Thread at PC 0xee, cpu in Non-Secure state, target->state: halted
Debug: 576 618 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 577 628 target.c:1646 target_call_event_callbacks(): target event 0 (gdb-halt) for core rp2040.core0
Debug: 578 628 target.c:1646 target_call_event_callbacks(): target event 1 (halted) for core rp2040.core0
User : 579 628 armv7m.c:584 armv7m_arch_state(): target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
Debug: 580 628 command.c:146 script_debug(): command - rp2040.core0 curstate
Debug: 581 628 command.c:146 script_debug(): command - transport select
Debug: 582 628 command.c:146 script_debug(): command - rp2040.core1 was_examined
Debug: 583 628 command.c:146 script_debug(): command - rp2040.core1 arp_waitstate halted 1000
Debug: 584 630 cortex_m.c:712 cortex_m_poll(): Exit from reset with dcb_dhcsr 0x30003
Debug: 585 632 cortex_m.c:301 cortex_m_endreset_event(): DCB_DEMCR = 0x01000401
Debug: 586 634 target.c:2496 target_write_u32(): address: 0xe0002000, value: 0x00000003
Debug: 587 638 target.c:2408 target_read_u32(): address: 0xe0002000, value: 0x00000041
Debug: 588 638 target.c:2496 target_write_u32(): address: 0xe0002008, value: 0x00000000
Debug: 589 640 target.c:2496 target_write_u32(): address: 0xe000200c, value: 0x00000000
Debug: 590 642 target.c:2496 target_write_u32(): address: 0xe0002010, value: 0x00000000
Debug: 591 644 target.c:2496 target_write_u32(): address: 0xe0002014, value: 0x00000000
Debug: 592 646 target.c:2496 target_write_u32(): address: 0xe0001020, value: 0x00000000
Debug: 593 648 target.c:2496 target_write_u32(): address: 0xe0001024, value: 0x00000000
Debug: 594 650 target.c:2496 target_write_u32(): address: 0xe0001028, value: 0x00000000
Debug: 595 652 target.c:2496 target_write_u32(): address: 0xe0001030, value: 0x00000000
Debug: 596 654 target.c:2496 target_write_u32(): address: 0xe0001034, value: 0x00000000
Debug: 597 656 target.c:2496 target_write_u32(): address: 0xe0001038, value: 0x00000000
Debug: 598 660 cortex_m.c:491 cortex_m_debug_entry():
Debug: 599 666 cortex_m.c:235 cortex_m_clear_halt():  NVIC_DFSR 0x9
Debug: 600 670 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 0  value 0xffffffff
Debug: 601 672 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 1  value 0xffffffff
Debug: 602 674 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 2  value 0xffffffff
Debug: 603 676 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 3  value 0xffffffff
Debug: 604 678 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 4  value 0xffffffff
Debug: 605 680 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 5  value 0xffffffff
Debug: 606 682 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 6  value 0xffffffff
Debug: 607 684 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 7  value 0xffffffff
Debug: 608 686 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 8  value 0xffffffff
Debug: 609 688 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 9  value 0xffffffff
Debug: 610 690 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 10  value 0xffffffff
Debug: 611 692 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 11  value 0xffffffff
Debug: 612 694 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 12  value 0xffffffff
Debug: 613 696 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 13  value 0x20041f00
Debug: 614 698 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 14  value 0xffffffff
Debug: 615 700 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 15  value 0xee
Debug: 616 702 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 16  value 0xf1000000
Debug: 617 704 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 17  value 0x20041f00
Debug: 618 706 cortex_m.c:1783 cortex_m_load_core_reg_u32(): load from core reg 18  value 0xfffffffc
Debug: 619 708 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 19 value 0x0
Debug: 620 710 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 20 value 0x0
Debug: 621 712 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 21 value 0x0
Debug: 622 714 cortex_m.c:1837 cortex_m_load_core_reg_u32(): load from special reg 22 value 0x0
Debug: 623 714 cortex_m.c:568 cortex_m_debug_entry(): entered debug state in core mode: Thread at PC 0xee, cpu in Non-Secure state, target->state: halted
Debug: 624 714 target.c:1646 target_call_event_callbacks(): target event 0 (gdb-halt) for core rp2040.core1
Debug: 625 714 target.c:1646 target_call_event_callbacks(): target event 1 (halted) for core rp2040.core1
User : 626 714 armv7m.c:584 armv7m_arch_state(): target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
Debug: 627 714 command.c:146 script_debug(): command - rp2040.core1 curstate
Debug: 628 714 command.c:146 script_debug(): command - transport select
Debug: 629 714 command.c:146 script_debug(): command - rp2040.core0 was_examined
Debug: 630 714 command.c:146 script_debug(): command - rp2040.core0 arp_waitstate halted 5000
Debug: 631 718 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 632 747 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-init
Debug: 633 747 command.c:146 script_debug(): command - transport select
Debug: 634 747 command.c:146 script_debug(): command - rp2040.core1 was_examined
Debug: 635 747 command.c:146 script_debug(): command - rp2040.core1 arp_waitstate halted 5000
Debug: 636 751 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 637 761 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-init
Debug: 638 761 command.c:146 script_debug(): command - rp2040.core0 invoke-event reset-end
Debug: 639 761 command.c:146 script_debug(): command - rp2040.core1 invoke-event reset-end
Debug: 640 765 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 641 779 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 642 789 command.c:146 script_debug(): command - echo ** Programming Started **
Debug: 643 793 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 644 807 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
User : 646 817 command.c:767 jim_echo(): ** Programming Started **
Debug: 647 817 command.c:146 script_debug(): command - flash write_image erase /Volumes/Storage/Projects/RP2040/rp2040-project-template/cmake-build-debug/rp2040_project.elf
Debug: 648 821 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 649 835 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 651 845 configuration.c:97 find_file(): found /Volumes/Storage/Projects/RP2040/rp2040-project-template/cmake-build-debug/rp2040_project.elf
Debug: 652 845 image.c:69 autodetect_image_type(): ELF image detected.
Debug: 653 845 configuration.c:97 find_file(): found /Volumes/Storage/Projects/RP2040/rp2040-project-template/cmake-build-debug/rp2040_project.elf
Info : 654 845 rp2040.c:338 rp2040_flash_probe(): RP2040 B0 Flash Probe: 2097152 bytes @10000000, in 512 sectors

Debug: 655 845 target.c:1840 target_alloc_working_area_try(): MMU disabled, using physical address for working memory 0x20010000
Debug: 656 845 target.c:1894 target_alloc_working_area_try(): allocated new working area of 256 bytes at address 0x20010000
Debug: 657 845 target.c:1761 print_wa_layout():  * 0x20010000-0x200100ff (256 bytes)
Debug: 658 845 target.c:1761 print_wa_layout():    0x20010100-0x2001ffff (65280 bytes)
Debug: 659 845 rp2040.c:357 rp2040_flash_probe(): Allocated flash algorithm stack @20010000 size 256 bytes
Debug: 660 845 core.c:899 flash_write_unlock(): image_read_section: section = 0, t_section_num = 0, section_offset = 0, buffer_idx = 0, size_read = 20108
Debug: 661 845 image.c:494 image_elf_read_section(): load segment 0 at 0x0 (sz = 0x4e8c)
Debug: 662 845 image.c:501 image_elf_read_section(): read elf: size = 0x4e8c at 0x10000
Debug: 663 845 core.c:899 flash_write_unlock(): image_read_section: section = 1, t_section_num = 1, section_offset = 0, buffer_idx = 20108, size_read = 588
Debug: 664 845 image.c:494 image_elf_read_section(): load segment 1 at 0x0 (sz = 0x24c)
Debug: 665 845 image.c:501 image_elf_read_section(): read elf: size = 0x24c at 0x200c0
Debug: 666 845 rp2040.c:277 rp2040_flash_erase(): RP2040 erase 24576 bytes starting at 0x00000000
Debug: 667 845 rp2040.c:164 rp2040_flash_exit_xip(): Connecting internal flash
Debug: 668 849 cmsis_dap_usb.c:969 cmsis_dap_swd_switch_seq(): SWD line reset
Debug: 669 859 target.c:2408 target_read_u32(): address: 0x00000010, value: 0x0201754d
Debug: 670 861 target.c:2432 target_read_u16(): address: 0x00000014, value: 0x007a
Debug: 671 863 target.c:2432 target_read_u16(): address: 0x0000007a, value: 0x3350
Debug: 672 865 target.c:2432 target_read_u16(): address: 0x0000007e, value: 0x3352
Debug: 673 867 target.c:2432 target_read_u16(): address: 0x00000082, value: 0x334c
Debug: 674 869 target.c:2432 target_read_u16(): address: 0x00000086, value: 0x3354
Debug: 675 871 target.c:2432 target_read_u16(): address: 0x0000008a, value: 0x534d
Debug: 676 873 target.c:2432 target_read_u16(): address: 0x0000008e, value: 0x3453
Debug: 677 875 target.c:2432 target_read_u16(): address: 0x00000092, value: 0x434d
Debug: 678 877 target.c:2432 target_read_u16(): address: 0x00000096, value: 0x3443
Debug: 679 879 target.c:2432 target_read_u16(): address: 0x0000009a, value: 0x4255
Debug: 680 881 target.c:2432 target_read_u16(): address: 0x0000009e, value: 0x5444
Debug: 681 883 target.c:2432 target_read_u16(): address: 0x000000a0, value: 0x0185
Debug: 682 885 target.c:2408 target_read_u32(): address: 0x00000010, value: 0x0201754d
Debug: 683 887 target.c:2432 target_read_u16(): address: 0x00000014, value: 0x007a
Debug: 684 889 target.c:2432 target_read_u16(): address: 0x0000007a, value: 0x3350
Debug: 685 891 target.c:2432 target_read_u16(): address: 0x0000007e, value: 0x3352
Debug: 686 893 target.c:2432 target_read_u16(): address: 0x00000082, value: 0x334c
Debug: 687 895 target.c:2432 target_read_u16(): address: 0x00000086, value: 0x3354
Debug: 688 897 target.c:2432 target_read_u16(): address: 0x0000008a, value: 0x534d
Debug: 689 899 target.c:2432 target_read_u16(): address: 0x0000008e, value: 0x3453
Debug: 690 901 target.c:2432 target_read_u16(): address: 0x00000092, value: 0x434d
Debug: 691 903 target.c:2432 target_read_u16(): address: 0x00000096, value: 0x3443
Debug: 692 905 target.c:2432 target_read_u16(): address: 0x0000009a, value: 0x4255
Debug: 693 907 target.c:2432 target_read_u16(): address: 0x0000009e, value: 0x5444
Debug: 694 909 target.c:2432 target_read_u16(): address: 0x000000a2, value: 0x4544
Debug: 695 911 target.c:2432 target_read_u16(): address: 0x000000a4, value: 0x018b
Debug: 696 911 rp2040.c:95 rp2040_call_rom_func(): Calling ROM func IF with 0 arguments
Debug: 697 911 rp2040.c:96 rp2040_call_rom_func(): Calling on core "rp2040.core0"
Debug: 698 913 target.c:2408 target_read_u32(): address: 0x00000010, value: 0x0201754d
Debug: 699 915 target.c:2432 target_read_u16(): address: 0x00000014, value: 0x007a
Debug: 700 917 target.c:2432 target_read_u16(): address: 0x0000007a, value: 0x3350
Debug: 701 919 target.c:2432 target_read_u16(): address: 0x0000007e, value: 0x3352
Debug: 702 921 target.c:2432 target_read_u16(): address: 0x00000082, value: 0x334c
Debug: 703 923 target.c:2432 target_read_u16(): address: 0x00000086, value: 0x3354
Debug: 704 925 target.c:2432 target_read_u16(): address: 0x0000008a, value: 0x534d
Debug: 705 927 target.c:2432 target_read_u16(): address: 0x0000008e, value: 0x3453
Debug: 706 929 target.c:2432 target_read_u16(): address: 0x00000092, value: 0x434d
Debug: 707 931 target.c:2432 target_read_u16(): address: 0x00000096, value: 0x3443
Debug: 708 933 target.c:2432 target_read_u16(): address: 0x0000009a, value: 0x4255
Debug: 709 935 target.c:2432 target_read_u16(): address: 0x0000009e, value: 0x5444
Debug: 710 937 target.c:2432 target_read_u16(): address: 0x000000a2, value: 0x4544
Debug: 711 939 target.c:2432 target_read_u16(): address: 0x000000a6, value: 0x5657
Debug: 712 941 target.c:2432 target_read_u16(): address: 0x000000aa, value: 0x4649
Debug: 713 943 target.c:2432 target_read_u16(): address: 0x000000ac, value: 0x24a1
Debug: 714 943 rp2040.c:121 rp2040_call_rom_func(): Set r7 = 000024a1
Debug: 715 943 rp2040.c:121 rp2040_call_rom_func(): Set sp = 20010100
Debug: 716 943 target.c:1646 target_call_event_callbacks(): target event 3 (resume-start) for core rp2040.core0
[1]    56836 segmentation fault  /usr/local/bin/openocd -s /usr/local/share/openocd/scripts -f  -c  -c  -c  -c

Removing the gdb_port disabled solves the issue, but I can't really remove it as IDE adds it on the Run scheme.

Linux compile error

After following page 19 of the "getting started..." guide, I'm trying to use openocd on my installation for the pico and get the following error:

pen On-Chip Debugger 0.10.0+dev-gf8e14ec-dirty (2021-03-17-19:30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (bcm2835gpio)
The following debug adapters are available:
1: ftdi
2: usb_blaster
3: ft232r
4: presto
5: usbprog
6: openjtag
7: jlink
8: vsllink
9: rlink
10: ulink
11: arm-jtag-ew
12: hla
13: osbdm
14: opendous
15: sysfsgpio
16: aice
17: xds110
18: st-link

Any ideas?

Here's the openocd configuration summary:

OpenOCD configuration summary

MPSSE mode of FTDI based devices yes
ST-Link Programmer yes (auto)
TI ICDI JTAG Programmer yes (auto)
Keil ULINK JTAG Programmer yes (auto)
Altera USB-Blaster II Compatible yes (auto)
Bitbang mode of FT232R based devices yes (auto)
Versaloon-Link JTAG Programmer yes (auto)
TI XDS110 Debug Probe yes (auto)
OSBDM (JTAG only) Programmer yes (auto)
eStick/opendous JTAG Programmer yes (auto)
Andes JTAG Programmer yes (auto)
USBProg JTAG Programmer yes (auto)
Raisonance RLink JTAG Programmer yes (auto)
Olimex ARM-JTAG-EW Programmer yes (auto)
CMSIS-DAP Compliant Debugger no
Nu-Link Programmer no
Cypress KitProg Programmer no
Altera USB-Blaster Compatible yes (auto)
ASIX Presto Adapter yes (auto)
OpenJTAG Adapter yes (auto)
Linux GPIO bitbang through libgpiod no
SEGGER J-Link Programmer yes (auto)

Unable to upload elf file - picoprobe - rp2040

Hello,

I'm following the guides here and here (second one has more wires ๐Ÿ™‚ ). This wasn't working via vscode however so I'm using the following from the cli:

openocd -f interface/picoprobe.cfg -f target/rp2040.cfg

I then connect via gdb and try to load an elf file:

arm-none-eabi-gdb sleep.elf
Type "apropos word" to search for commands related to "word"...
Reading symbols from sleep.elf...
(No debugging symbols found in sleep.elf)
(gdb) target extended-remote localhost:3333
Remote debugging using localhost:3333
0x000000ee in ?? ()
(gdb) load
Error erasing flash with vFlashErase packet

From the openocd side I see:

Open On-Chip Debugger 0.11.0-g4f2ae6197 (2021-11-06-08:17)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : RP2040 B0 Flash Probe: 2097152 bytes @10000000, in 512 sectors

Info : New GDB Connection: 1, Target rp2040.core0, state: halted
undefined debug reason 8 - target needs reset
Warn : Prefer GDB command "target extended-remote 3333" instead of "target remote 3333"
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
Error: SWD Read data parity mismatch
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Error: Failed to read memory at 0x0000007c
Error: Debug trampoline not found in RP2040 ROM.
Error: RP2040 exit xip: failed to connect internal flash
Error: failed erasing sectors 0 to 2
Error: flash_erase returned -4
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : dropped 'gdb' connection
Info : accepting 'gdb' connection on tcp/3333
Info : New GDB Connection: 1, Target rp2040.core0, state: halted
Error: SWD Read data parity mismatch
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
target halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Error: Failed to read memory at 0x0000007c
Error: Debug trampoline not found in RP2040 ROM.
Error: RP2040 exit xip: failed to connect internal flash
Error: failed erasing sectors 0 to 2
Error: flash_erase returned -4
Info : SWD DPIDR 0x0bc12477

This does seem to have actually worked at some point however as I can see the target pico device is running my simple program to switch on the led (after having the flash wiped).

Any idea what I'm doing wrong?

This is how it looks when running with debugging:

Debug: 1270 7114 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles
Debug: 1271 7114 target.c:2613 target_read_u16(): address: 0x0000007a, value: 0xd9b0
Debug: 1272 7114 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles
Debug: 1273 7114 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles
Debug: 1274 7114 picoprobe.c:453 picoprobe_swd_switch_seq(): DORMANT-to-SWD
Info : 1275 7115 adi_v5_swd.c:269 swd_multidrop_connect(): SWD DPIDR 0x0bc12477
Info : 1276 7115 adi_v5_swd.c:270 swd_multidrop_connect(): SWD DLPIDR 0x00000001
Debug: 1277 7115 arm_adi_v5.c:653 dap_dp_init(): rp2040.core0.dap
Debug: 1278 7115 arm_adi_v5.c:685 dap_dp_init(): DAP: wait CDBGPWRUPACK
Debug: 1279 7115 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000
Debug: 1280 7115 arm_adi_v5.c:693 dap_dp_init(): DAP: wait CSYSPWRUPACK
Debug: 1281 7115 arm_adi_v5.h:512 dap_dp_poll_register(): DAP: poll 4, mask 0x80000000, value 0x80000000
Debug: 1282 7116 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles
Error: 1283 7116 arm_adi_v5.c:544 mem_ap_read(): Failed to read memory at 0x0000007c
Debug: 1284 7116 target.c:2617 target_read_u16(): address: 0x0000007e failed
Error: 1285 7116 rp2040.c:90 rp2040_call_rom_func(): Debug trampoline end not found in RP2040 ROM.
Error: 1286 7116 rp2040.c:176 rp2040_flash_exit_xip(): RP2040 exit xip: failed to exit flash XIP mode
Error: 1287 7116 core.c:47 flash_driver_erase(): failed erasing sectors 0 to 5
Debug: 1288 7116 target.c:1827 target_call_event_callbacks(): target event 25 (gdb-flash-erase-end) for core rp2040.core0
Error: 1289 7116 gdb_server.c:3075 gdb_v_packet(): flash_erase returned -4
Debug: 1290 7216 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles
Debug: 1291 7216 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles
Debug: 1292 7216 picoprobe.c:364 picoprobe_swd_queue_cmd(): Add 8 idle cycles

Support for SEGGER RTT

Everything works fine, except for RTT (openocd manual; section 15.7) commands issued via telnet. Issuing any of these commands gives "invalid command name: rtt". I also noticed that the folder rtt is not present in the src folder, and it is present in the openocd master on sourceforge.

So, was RTT removed (assuming that it was) for a reason, or was lack of support for RTT unintentional.

Thanks and Thanks for all of your efforts making the rp2040 and RPi Pico easy to work with at the SDK level.

--lance

bcm2835gpio not available after install

Following the steps from getting-started-with-pico.pdf:

$ git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
$ cd openocd
$ ./bootstrap
$ ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio
$ make -j4
$ sudo make install

I get the following output after configuring:

OpenOCD configuration summary
--------------------------------------------------
MPSSE mode of FTDI based devices        yes
Raspberry Pi Pico Probe                 yes (auto)
ST-Link Programmer                      yes (auto)
TI ICDI JTAG Programmer                 yes (auto)
Keil ULINK JTAG Programmer              yes (auto)
Altera USB-Blaster II Compatible        yes (auto)
Bitbang mode of FT232R based devices    yes (auto)
Versaloon-Link JTAG Programmer          yes (auto)
TI XDS110 Debug Probe                   yes (auto)
CMSIS-DAP v2 Compliant Debugger         yes (auto)
OSBDM (JTAG only) Programmer            yes (auto)
eStick/opendous JTAG Programmer         yes (auto)
Andes JTAG Programmer                   yes (auto)
USBProg JTAG Programmer                 yes (auto)
Raisonance RLink JTAG Programmer        yes (auto)
Olimex ARM-JTAG-EW Programmer           yes (auto)
CMSIS-DAP Compliant Debugger            no
Nu-Link Programmer                      no
Cypress KitProg Programmer              no
Altera USB-Blaster Compatible           yes (auto)
ASIX Presto Adapter                     yes (auto)
OpenJTAG Adapter                        yes (auto)
Linux GPIO bitbang through libgpiod     no
SEGGER J-Link Programmer                yes (auto)
Use Capstone disassembly framework      no

Then after trying to run openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg -c "program blink/blink.elf verify reset exit" I get:

Open On-Chip Debugger 0.11.0-g228ede4 (2022-06-19-03:39)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (bcm2835gpio)
The following debug adapters are available:
1: ftdi
2: usb_blaster
3: ft232r
4: presto
5: usbprog
6: openjtag
7: jlink
8: vsllink
9: rlink
10: ulink
11: arm-jtag-ew
12: hla
13: osbdm
14: opendous
15: sysfsgpio
16: aice
17: picoprobe
18: cmsis-dap
19: xds110
20: st-link

Running on Ubuntu 22.04 if that makes a difference.

MacOS build on Catalina 10.15 fails at libusb

On building the openocd, my build is failing at the following step. I've downloaded the source for libusb and repaced all non x86_64 versions. Still, I get this error. Is there a copy of the library in a pre-aggregated one somewhere? Not sure what to do.

gcc -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Wpointer-arith -Werror -g -O2 -o src/openocd src/main.o  src/.libs/libopenocd.a -L/usr/local/lib /usr/local/lib/libusb.dylib -L/usr/local/Cellar/libftdi/1.5_2/lib -lftdi1 -L/usr/local/Cellar/hidapi/0.11.2/lib -lhidapi /usr/local/lib/libusb-1.0.dylib -lobjc -lm -L/usr/local/Cellar/capstone/4.0.2/lib -lcapstone ./jimtcl/libjim.a -pthread -v
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 10.15.0 10.15.6 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -o src/openocd -L/usr/local/lib -L/usr/local/Cellar/libftdi/1.5_2/lib -L/usr/local/Cellar/hidapi/0.11.2/lib -L/usr/local/Cellar/capstone/4.0.2/lib -L/usr/local/lib src/main.o src/.libs/libopenocd.a /usr/local/lib/libusb.dylib -lftdi1 -lhidapi /usr/local/lib/libusb-1.0.dylib -lobjc -lm -lcapstone ./jimtcl/libjim.a -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
  "_usb_bulk_read", referenced from:
      _armjtagew_usb_message in libopenocd.a(libocdjtagdrivers_la-arm-jtag-ew.o)
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _rlink_speed in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _rlink_reset in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _dtc_queue_run in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
      _usbprog_reset in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
      ...
  "_usb_bulk_write", referenced from:
      _armjtagew_usb_message in libopenocd.a(libocdjtagdrivers_la-arm-jtag-ew.o)
      _armjtagew_reset in libopenocd.a(libocdjtagdrivers_la-arm-jtag-ew.o)
      _rlink_speed in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _ep1_generic_commandl in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _dtc_queue_run in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
      _usbprog_reset in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
      ...
  "_usb_claim_interface", referenced from:
      _armjtagew_init in libopenocd.a(libocdjtagdrivers_la-arm-jtag-ew.o)
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
  "_usb_close", referenced from:
      _armjtagew_quit in libopenocd.a(libocdjtagdrivers_la-arm-jtag-ew.o)
      _rlink_quit in libopenocd.a(libocdjtagdrivers_la-rlink.o)
     (maybe you meant: _transport_usb_close)
  "_usb_device", referenced from:
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
     (maybe you meant: _versaloon_usb_device_handle)
  "_usb_find_busses", referenced from:
      _jtag_usb_open in libopenocd.a(libocdjtagdrivers_la-usb_common.o)
  "_usb_find_devices", referenced from:
      _jtag_usb_open in libopenocd.a(libocdjtagdrivers_la-usb_common.o)
  "_usb_get_busses", referenced from:
      _jtag_usb_open in libopenocd.a(libocdjtagdrivers_la-usb_common.o)
  "_usb_init", referenced from:
      _armjtagew_init in libopenocd.a(libocdjtagdrivers_la-arm-jtag-ew.o)
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
  "_usb_open", referenced from:
      _jtag_usb_open in libopenocd.a(libocdjtagdrivers_la-usb_common.o)
     (maybe you meant: _jtag_usb_open, _transport_usb_open )
  "_usb_release_interface", referenced from:
      _rlink_quit in libopenocd.a(libocdjtagdrivers_la-rlink.o)
  "_usb_set_altinterface", referenced from:
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
  "_usb_set_configuration", referenced from:
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
  "_usb_set_debug", referenced from:
      _usbprog_init in libopenocd.a(libocdjtagdrivers_la-usbprog.o)
  "_usb_strerror", referenced from:
      _rlink_init in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _rlink_speed in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _rlink_reset in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _dtc_queue_run in libopenocd.a(libocdjtagdrivers_la-rlink.o)
      _jtag_usb_open in libopenocd.a(libocdjtagdrivers_la-usb_common.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

mu-bitbang.cfg -> tcl/interface

I believe the mu-bitbang.cfg file should be relocated to tcl/interface, whereupon it will install into /usr/local/share/openocd/scripts/interface/ when make install is run.

The path to the config file can then be: interface/mu-bitbang.cfg:

openocd -f interface/mu-bitbang.cfg

Excuse me for blundering into issues. Saw the "TO DO: Hopefully the mu-bitbang config will be locatable somehow" in the docs.

openocd fails to start when using VSCode

There is no udev rule for the board so this fails due to permissions.

My workaround was to add this to contrib/60-openocd.rules and copy it to /etc/udev/rules.d

#Raspberry Pi Pico
ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0004", MODE="660", GROUP="plugdev", TAG+="uaccess"

It might be a good idea to also do this during install or document how to do it manually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.