OpenOCD Debugging Prerequisites (Bare Metal and MPLAB® Harmony)
Pre-Requisite Setup Instructions: Debugging With OpenOCD
Download the required OpenOCD tools. Unzip it and find the Tools folder.
Steps 2, 3, 4, and 5 install the required tools from this folder
.
Install Debugging Dependencies for VS Code®
Follow Steps 1–7 to install the required development tools for successfully debugging a bare-metal application using MPLAB® Extensions for VS Code®.
Download and Install VS Code
Download and install VS Code for your operating system (Windows®, Linux®, or macOS®).
Make sure VS Code launches successfully after installation.
Install the MPLAB Extension Pack from the VS Code Marketplace.
- Open VS Code.
- Go to Extensions.
- Search for "MPLAB Extension Pack".
- Click Install.

Install the Cortex-Debug extension.
- Open VS Code.
- Go to Extensions.
- Search for "Cortex-Debug".
- Click Install.

Install the Serial Monitor extension.
- Open VS Code.
- Go to Extensions.
- Search for "Serail Monitor".
- Click Install.

Install and Verify OpenOCD
Copy the OpenOCD folder from the extracted file downloaded from GitHub®. Copy the OpenOCD-20250710-0.12.0 folder to C:\.

Add OpenOCD to path environment variables.
Add the OpenOCD bin directory (C:\OpenOCD-20250710-0.12.0\bin) to your system Path environment variable.
Open environment variables:

Verify the installation.
Open Command Prompt and verify OpenOCD is installed correctly by running:
openocd –-version.

Arm® GNU Toolchain Installation
Install Arm GNU Toolchain.
Install arm-gnu-toolchain-14.3.rel1-mingw-w64-x86_64-arm-none-eabi.exe from the unzipped folder by double-clicking it. Once the installation is complete, the following window appears:

Verify the installation.
Open Command Prompt and verify the installation by running:
arm-none-eabi-gcc --version.
Install at91bootstrap Windows Build Dependencies
Add make and bc tools from the unzipped folder downloaded from GitHub to Path system environment variables:
Eg: C:\Users\xxxx\Downloads\open_ocd_tools\make

Verify make and bc from the Command Prompt:
- make --version
- bc --version

Install Python®
Install Python from the unzipped folder, OpenOCD_Tools\python, and add it to the system environment variable as shown in the accompanying image:

Verify python: python --version.

Verify UsbDriverTool Is Working
Execute UsbDriverTool.exe from the unzipped folder and ensure it opens successfully.
If prompted to update Windows driver software, complete the update and ensure the application launches correctly.
Install Git (optional)
