Skip to content

minkang3/Embedded-Debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A bare metal debugger built for the Raspberry Pi Pico.

Install for Windows

You will need cmake installed.

First, we will install the Pico SDK and necessary tools all in one step.

Go to this link: https://www.raspberrypi.com/news/raspberry-pi-pico-windows-installer/

Scroll down and find and click "Download Windows Pico Installer" image

Run the setup which will install the necessary pico sdk, compilers, and even its own version of VS Code.

After it finished installing, look for "Pico - Visual Studio Code" in your start menu and open it. image

On the left bar, click on extensions and search for "Raspberry Pi Pico" and install it. image

Clone this repo if you haven't already and place it in a convinient location.

Go back to VS Code, and press on the pico icon on the left bar, and press "Import Project". image

For location, select the location of the repo, for the Pico SDK version, select the latest, and then press Import.

Once it opens, select the Pico icon once more and press "Compile Project". image

Now, plug in the Pico while holding down the white button labled "BOOTSEL". (BOOTSEL location showed below) image

Then press "Run Project".

The debugger should be running on your board.

Setup

image The two pins that are needed are pins 19 and 20. However, you can change this to your liking by changing the macro definitions in inc/macros.h. Pin 19 is SWDIO and pin 20 is SWCLK.

To debug a target board, connect pin 19 to the target's SWDIO and pin 20 to the target's SWCLK. If necessary, connect the power from pin 36 and ground from pin 38 as well.

How to use

We can take advantage of VS Code's serial monitor. Open up the terminal bar by pressing Ctrl-` (backtick next to 1) and press "Serial Monitor".

Press "Start Monitoring" and press the terminal icon to toggle terminal mode.

Now you can start typing to the debug interface.

First initialize core debug for the board:

> init

Now, you can do anything you want. Enter > help to get an idea of what you can do.

About

Simple debugger using the SWD protocl

Resources

Stars

Watchers

Forks