Wireless debug probe for ARM Cortex-M microprocessors

Oct 07, 2019

Wireless Debugging With Visual Studio Code

by Sid Price

First, thank you to the backers who have started the ball rolling for the ctxLink campaign. Your support for this project, and your confidence in it, are much appreciated.

I have spent the past few days working to get ctxLink running with the highly extensible Visual Studio Code (VSCode) development environment. VSCode makes it quite straightforward to use a typical "makefile" project for ARM development. Makefile projects run in a command window and require only that the compiler toolchain be available.

In addition to the GCC ARM toolchain, you will need to install the "Cortex Debug" VSCode extension. You can do so by selecting the extensions tab in VSCode and searching for "Cortex."

To test the setup, I used the ST Microelectronics CubeMX project generator to build a simple "blinky" project for a Nucleo-F411RE evaluation board. I used a small adapter board to interface between ctxLink to the Nucleo’s Modulo connectors. (The Nucleo’s integrated STLinkV2 was detached.)

To simplify the process of building this project, I created a task in VSCode’s tasks.json file that executes its "make" command:

Once the make task is defined, pressing CTRL-SHIFT-B will activate a dropdown menu, from VSCode’s command bar, that contains an entry called "Make Blinky." Clicking this menu item will build the project.

Next, the Cortex-Debug extension needs to be set up to connect with and configure ctxLink. This is done by creating a launch task in the launch.json file:

Note that you must specify the IP address of ctxLink in the "BMPGDBSerialPort" entry. If you are using ctxLink via USB, specify the comm port of ctxLink’s GDB server channel instead.

At this point it should be possible to run the project by using the "Debug/Start Debugging" menu item.

Again, thanks for your support.

Sign up to receive future updates for ctxLink.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects