Skip to content

JustAnother1/nomagic_probe

Repository files navigation

nomagic probe

The nomagic probe is a firmware for the RaspberryPi Pico board that provides a gdbserver interface for debugging other boards. That is the functionality of the picoprobe and OpenOCD combined. It is also similar to the Black Magic Firmware.

It does not use external libraries. Therefore all code is in this library, no dependencies!

No dynamic memory allocation, no malloc!

features

  • USB CDCD(serial port) gdb server

  • USB MSCD(thumb drive) for configuration files.

  • support for SWD according to ARM ADIv5.0, ARM ADIv5.1, ARM ADIv5.2, ARM ADIv6.0.

targets

this is only the parent repository. The seperate use cases / target have their own repositories:

  • DETECT command line interface on USB serial port. This allows analysis of unsupported chips.

  • RP2040 SWD connection to a RaspberryPi RP2040

documentation

Additional documentation can be created

make doc

the created documentation is then located in the bin/doxygen/ folder.

building and starting

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. Depending on the target you are building for you might need to have additionaltools 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

pinout

pico

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 2: (GPIO 1) SWDIR (High = from Probe to target; Low= from Target to probe)

Pin 4: (GPIO 2) SWCLK

Pin 5: (GPIO 3) SWDIO

Pin 6: (GPIO 4) Target Uart TX (UART1) - output from PC - connect to target RX

Pin 7: (GPIO 5) Target Uart RX (UART1) - input to PC - connect to target TX

Pin 9: (GPIO 6) Run = /Reset

Pin 21: (GPIO 16) Debug Uart TX (UART0)

Pin 22: (GPIO 17) Debug Uart RX (UART0)

license

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/