This firmware uses nomagic probe. It provides a gdb server interface to be used with RP2040 (The chip on the RaspberryPi pico board) over a SWD connection.
please refer to the nomagic probe project for most of the documentation.
Additional documentation can be created by doing
make doc
the created documentation is then located in the build/doxygen/ folder.
to clone the repository do
git clone --recurse-submodules https://codeberg.org/JustAnother1/rp2040_nomagic_probe
The "--recurse-submodules" is necessary to get the nomagic_probe submodule that contains the device independednt part of the source code.
The firmware can be build using make. The generated Files will be placed in the bin folder. For details try
make help
for this to work you (obviously) need to have make installed. You will need to have additional tools installed:
-
To build for ARM Cortex-M Targets you need GCC ARM Embedded
-
to flash and program you need OpenOCD
-
to create an *.uf2 file you need elf2uf2
-
for automatic generated documentation you need Doxygen
The pico has 40 pins (1..40) Numbered counter clock wise starting at the USB connector.
+-----+
+-------+ USB +---------+
GPIO 0 -+- 1 +-----+ 40 -+- Vbus
GPIO 1 -+- 2 39 -+- Vsys
Gnd -+- 3 38 -+- Gnd
GPIO 2 -+- 4 37 -+- 3V3_EN
GPIO 3 -+- 5 36 -+- 3V3(Out)
GPIO 4 -+- 6 35 -+- ADC-Vref
GPIO 5 -+- 7 34 -+- GPIO 28
Gnd -+- 8 33 -+- Gnd
GPIO 6 -+- 9 32 -+- GPIO 27
GPIO 7 -+- 10 31 -+- GPIO 26
GPIO 8 -+- 11 30 -+- Run = /Reset
GPIO 9 -+- 12 29 -+- GPIO 22
Gnd -+- 13 28 -+- Gnd
GPIO 10 -+- 14 27 -+- GPIO 21
GPIO 11 -+- 15 26 -+- GPIO 20
GPIO 12 -+- 16 25 -+- GPIO 19
GPIO 13 -+- 17 24 -+- GPIO 18
Gnd -+- 18 23 -+- Gnd
GPIO 14 -+- 19 22 -+- GPIO 17
GPIO 15 -+- 20 Debug 21 -+- GPIO 16
+-----------------------+
S G S
W n W
C d D
L I
K O
| Pin | GPIO | Signal | description |
|---|---|---|---|
2 |
1 |
SWDIR |
High = from Probe to target; Low = from Target to probe |
4 |
2 |
SWCLK |
SWD interface to target |
5 |
3 |
SWDIO |
SWD interface to target |
6 |
4 |
Target Uart TX (UART1) |
output from PC - connect to target RX |
7 |
5 |
Target Uart RX (UART1) |
input to PC - connect to target TX |
9 |
6 |
Run |
/Reset |
21 |
16 |
Debug Uart TX (UART0) |
output |
22 |
17 |
Debug Uart RX (UART0) |
input |
Additionally to the Acknowledgments of the nomagic probe firmware we must also thank Raspberry Pi for providing the RP2040 chip and the detailed documentation.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>