@@ -117,10 +117,10 @@ This example is valid for the case that the user joins to `plugdev` groups.
117
117
118
118
The Raspberry Pi Pico has an SWD interface that can be used to program
119
119
and debug the on board RP2040. This interface can be utilized by OpenOCD.
120
- However, to use it with the RP2040, `fork of OpenOCD supporting RP2040 `_ is needed.
120
+ However, to use it with the RP2040, a `fork of OpenOCD supporting RP2040 `_ is needed.
121
121
122
- If you are using Debian based system (including RaspberryPi OS, Ubuntu. and more),
123
- using `pico_setup.sh `_ script is convenient to set up forked version of OpenOCD.
122
+ If you are using a Debian based system (including RaspberryPi OS, Ubuntu. and more),
123
+ using the `pico_setup.sh `_ script is a convenient way to set up the forked version of OpenOCD.
124
124
125
125
Depending on the interface used (such as JLink), you might need to
126
126
checkout to a branch that supports this interface, before proceeding.
@@ -134,25 +134,26 @@ Here is an example of building and flashing the :ref:`blinky-sample` application
134
134
:goals: build flash
135
135
:gen-args: -DOPENOCD=/usr/local/bin/openocd -DOPENOCD_DEFAULT_PATH=/usr/local/share/openocd/scripts -DRPI_PICO_DEBUG_ADAPTER=picoprobe
136
136
137
- Set `/usr/local/bin/openocd ` to **OPENOCD ** and `/usr/local/share/openocd/scripts ` to **OPENOCD_DEFAULT_PATH ** will works
138
- with OpenOCD that install with default configuration.
139
- This configuration also works with an environment that is set up by `pico_setup.sh `_ script.
137
+ Set the environment variables **OPENOCD ** to `/usr/local/bin/openocd `
138
+ and **OPENOCD_DEFAULT_PATH ** to `/usr/local/share/openocd/scripts `. This should work
139
+ with the OpenOCD that was installed with the default configuration.
140
+ This configuration also works with an environment that is set up by the `pico_setup.sh `_ script.
140
141
141
142
**RPI_PICO_DEBUG_ADAPTER ** specifies what debug adapter is used for debugging.
142
143
143
- If **RPI_PICO_DEBUG_ADAPTER ** was not assigned, use `picoprobe ` as default. And also able to use `raspberrypi-swd `.
144
+ If **RPI_PICO_DEBUG_ADAPTER ** was not assigned, `picoprobe ` is used by default.
145
+ The other supported adapters are `raspberrypi-swd `, `jlink ` and `blackmagicprobe `.
144
146
How to connect `picoprobe ` and `raspberrypi-swd ` is described in `Getting Started with Raspberry Pi Pico `_.
145
147
Any other SWD debug adapter maybe also work with this configuration.
146
148
147
- **RPI_PICO_DEBUG_ADAPTER ** value remember into CMakeCache.txt.
148
- So you can omit the option in `west flash ` and `west debug ` execution,
149
- you need only the `west build ` case.
149
+ The value of **RPI_PICO_DEBUG_ADAPTER ** is cached, so it can be omitted from
150
+ `west flash ` and `west debug ` if it was previously set while running `west build `.
150
151
151
152
**RPI_PICO_DEBUG_ADAPTER ** is used in an argument to OpenOCD as `"source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]" `.
152
- Thus, **RPI_PICO_DEBUG_ADAPTER ** needs to assign from the definition file name of debugging adapter.
153
+ Thus, **RPI_PICO_DEBUG_ADAPTER ** needs to be assigned the file name of the debug adapter.
153
154
154
155
You can also flash the board with the following
155
- command that directly call OpenOCD (assuming a SEGGER JLink adapter is used):
156
+ command that directly calls OpenOCD (assuming a SEGGER JLink adapter is used):
156
157
157
158
.. code-block :: console
158
159
@@ -171,7 +172,7 @@ Debugging
171
172
=========
172
173
173
174
The SWD interface can also be used to debug the board. To achieve this, you can
174
- either user SEGGER JLink or OpenOCD.
175
+ either use SEGGER JLink or OpenOCD.
175
176
176
177
Using SEGGER JLink
177
178
------------------
@@ -201,7 +202,7 @@ Here is an example for debugging the :ref:`blinky-sample` application.
201
202
As with flashing, you can specify the debug adapter by specifying **RPI_PICO_DEBUG_ADAPTER **
202
203
at `west build ` time. No needs to specify it at `west debug ` time.
203
204
204
- You can also debugging with OpenOCD and gdb launching from command-line.
205
+ You can also debug with OpenOCD and gdb launching from command-line.
205
206
Run the following command:
206
207
207
208
.. code-block :: console
0 commit comments