Skip to content

gera-k/VSC-Nordic-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

VSC-Nordic-example

This repo contains Visual Studio Code configuration for ble_app_blinky example from Nordic SDK 15. It supports:

  • IntelliSense
  • building the app (using gcc compiler)
  • flashing the app and the softdevice (using nrfjprog)
  • source-level debugging (using gdb/mi and JLink gdb server)
  • SDK configuraion (using CMSIS Configuration Wisard included with the Nordic SDK)

The repo contains configurations for PCA10056(nRF52840) and PCA10040(nRF52832) dev boards. Only Windows is currently supported.

Tools required:

Setup

  • Clone this repo
  • edit the ble_app_blinky\vscode.bat and adjust all paths to match your configuration
  • set PCAXXXXX_SN variable to serial numbers of your dev boards
  • edit gcc compiler settings in nRF5_SDK_15.0.0_a53641a\components\toolchain\gcc\Makefile.windows

Running the Visual Studio Code

Run the ble_app_blinky\vscode.bat. It opens VcCode workspace containing three folders - the root folder of the app (containing main.c) and two hw-specific folders PCA10040 and PCA10056.

Open the main.c and verify that IntelliSense has found all header files. Go though the file and verify that you can follow definitios etc. Note that there are two IntelliSense configurations, one per each hw variant.

There are five tasks configured in each hw-specific folder:

  • build
  • clean
  • flash
  • flash_softdevice
  • sdk-config

Connect your dev board, run tasks and monitor the console window to ensure they work.

There is a separate debugger configuration per each hw variant. To start the debugger, first ensure that your board flashed ok and the blinky app works. Switch to VcCode Debugger window, select correct configuration and start debugger. The debugger should connect to the board, reset it, and break at main(). Ensure that IntelliSense configuration matches the HW you debug.

About

Visual Studio Code configuration for ble_app_blinky example from Nordic SDK 15.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published