How to Use NX15 with PlatformIO
Use the PlatformIO IDE extension for Visual Studio Code to build an Arduino application for the KORLINX NX15 Dev Kit and upload it through a SEGGER J-Link probe.
This guide uses KORLINX-PlatformIO 1.1.0, board ID nx15, and KORLINX ArduinoCore-zephyr 0.2.3.
The repository provides an NX15 Blink environment and supports J-Link upload. PlatformIO debugging with pio debug is not supported for NX15 in this release.
What you will build
Create a PlatformIO project that switches the NX15 user LED on and off every 500 ms. PlatformIO compiles the sketch with the KORLINX Zephyr-based Arduino core and programs the board through J-Link over SWD.
The development setup uses two host connections:
- J-Link over SWD for firmware upload.
- USB Type-C through the onboard USB-to-UART bridge for board power and
Serialcommunication.
Before you begin
Required hardware
| Item | Requirement |
|---|---|
| Development board | KORLINX NX15 Dev Kit |
| Debug probe | SEGGER J-Link compatible with the nRF54L15 |
| Debug wiring | SWD cable or adapter for NRESET, SWDCLK, GND, SWDIO, and VTref |
| USB cables | Data-capable cables for the NX15 Dev Kit and J-Link |
| Host computer | A system supported by Visual Studio Code, PlatformIO Core 6, and J-Link |
Required software
- Visual Studio Code.
- PlatformIO IDE.
- Git for installing the KORLINX platform from GitHub.
- SEGGER J-Link software if required by the host setup.
- USB-to-UART drivers or serial-port permissions where required.
Step 1: Install PlatformIO IDE
- Install Visual Studio Code.
- Open Extensions in the Activity Bar.
- Search for PlatformIO IDE and install the extension published by PlatformIO.
- Wait for PlatformIO Core to initialize, then reload Visual Studio Code if requested.
- Open a PlatformIO terminal and verify the included PlatformIO Core version:
pio --version
KORLINX-PlatformIO 1.1.0 declares PlatformIO Core 6 or later.
Install the official PlatformIO IDE extension in Visual Studio Code.
Step 2: Install KORLINX-PlatformIO
Open a PlatformIO terminal and install the tagged platform globally:
pio pkg install -g -p https://github.com/KORLINX/KORLINX-PlatformIO.git#1.1.0
Pinning #1.1.0 keeps the platform, framework, and tools consistent with this guide. When the URL has no tag, PlatformIO uses its cached repository revision until the package is updated.
The NX15 configuration supplied by this release is:
| Setting | NX15 value |
|---|---|
| Platform package | korlinx 1.1.0 |
| Board ID | nx15 |
| Display name | KORLINX NX15 nRF54L15 |
| MCU | nRF54L15, 128 MHz Cortex-M33 |
| Framework | Arduino |
| Arduino core | KORLINX ArduinoCore-zephyr 0.2.3 |
| Variant | nx15_nrf54l15_cpuapp |
| Upload protocol | J-Link |
| Sketch offset | 0x60000 |
Step 3: Create an NX15 project
- Open PlatformIO Home > New Project.
- Name the project
nx15_blink. - Select KORLINX NX15 nRF54L15.
- Select the Arduino framework.
- Choose a project location and finish project creation.
Open PlatformIO Home and select New Project.
Name the project, then select KORLINX NX15 nRF54L15 and the Arduino framework.
If NX15 does not appear after package installation, reload Visual Studio Code. You can also create a project folder manually with platformio.ini and src/main.cpp.
| Project item | Purpose |
|---|---|
platformio.ini | Selects the platform release, NX15 board, framework, and serial settings |
src/main.cpp | Contains the application source |
include/ | Stores project headers |
lib/ | Stores project-local libraries |
.pio/ | Contains generated build files and downloaded packages |
Step 4: Configure platformio.ini
Replace the generated configuration with:
[platformio]
default_envs = nx15
[env:nx15]
platform = https://github.com/KORLINX/KORLINX-PlatformIO.git#1.1.0
board = nx15
framework = arduino
monitor_speed = 115200
Configure the NX15 environment and set the Serial Monitor speed to 115200 baud.
The full repository URL lets the project resolve the pinned release directly. If the platform was installed globally in Step 2, the repository examples use the shorter platform = korlinx.
When several J-Link probes are connected, specify the selected probe serial number:
upload_port = 12345678
Replace 12345678 with the serial number printed on or reported by the selected J-Link probe.
Step 5: Create the Blink application
Replace src/main.cpp with the NX15-compatible Blink example:
#include <Arduino.h>
bool on;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
on = !on;
digitalWrite(LED_BUILTIN, on);
delay(500);
}
This follows the Blink example supplied by KORLINX-PlatformIO 1.1.0. PlatformIO compiles main.cpp as C++, so include Arduino.h explicitly.
Step 6: Connect NX15 to J-Link
J-Link programs the NX15 through the board's SWD interface.
| J-Link signal | NX15 pad | Function |
|---|---|---|
nRESET | NRESET | Target reset |
SWCLK | SWDCLK | SWD clock |
GND | GND | Common ground |
SWDIO | SWDIO | Bidirectional SWD data |
VTref | 3V3 | Target-voltage reference |
- Disconnect the NX15 Dev Kit and J-Link from USB before wiring the SWD signals.
- Connect the probe signals to the corresponding NX15 pads.
- Connect the NX15 Dev Kit to the host through USB Type-C for power and USB serial communication.
- Connect the J-Link probe to the host through USB.
VTref senses the board's 3.3 V I/O level. Power the board through its intended input unless the documentation for the exact probe and board setup explicitly permits probe-supplied target power.
Step 7: Build and upload
Run PlatformIO: Build, or use:
pio run -e nx15
The Build task compiles the NX15 application and reports memory usage and SUCCESS.
After the build succeeds, select Project Tasks > nx15 > General > Upload, or run:
pio run -e nx15 -t upload
The Upload task programs NX15 through J-Link and reports SUCCESS.
The NX15 sketch runs inside the loader firmware supplied by ArduinoCore-zephyr. During the first upload, the J-Link workflow writes both the loader and the sketch. During later uploads, J-Link skips matching flash regions, so it writes only the changed content.
The board manifest places the sketch at 0x60000. Use the packaged uploader instead of manually programming an arbitrary binary at a guessed address.
KORLINX-PlatformIO 1.1.0 supports NX15 upload through J-Link. Interactive debugging with pio debug is not supported yet.
Step 8: Confirm the result
After uploading and resetting the board, the user LED should change state every 500 ms. If the LED does not blink:
- Confirm that the selected environment and board are both
nx15. - Check that J-Link detected
nRF54L15_M33. - Confirm that the upload completed without an error.
- Check the NX15 variant and LED mapping supplied by core 0.2.3.
- Reset or power-cycle the board, then test again.
Optional: Verify Serial output
For NX15, Serial uses the board's USB-to-UART interface at 115200 baud. Replace src/main.cpp with:
#include <Arduino.h>
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("KORLINX NX15 PlatformIO is running");
delay(1000);
}
Build and upload the sketch again, then list the available ports:
pio device list
Open PlatformIO: Serial Monitor, or run:
pio device monitor --port YOUR_SERIAL_PORT --baud 115200
Upload and Monitor programs NX15 through J-Link and displays the USB serial output.
Replace YOUR_SERIAL_PORT with the USB serial port reported by the operating system. This connection carries serial data; firmware upload continues to use J-Link over SWD.
NX15 code examples
The examples directory on the repository's main branch provides the following NX15 projects. These examples use platform = korlinx, board = nx15, and framework = arduino.
The examples below reflect the repository's main branch. The installation and upload procedure earlier in this guide remains pinned to release 1.1.0. Content on main may change before the next tagged release.
| Example | What it demonstrates |
|---|---|
arduino-blink | Blinks LED_BUILTIN every 500 ms |
arduino-leds | Cycles through the four Dev Kit LEDs |
arduino-fade | Fades the red LED with PWM |
arduino-button | Counts button presses and controls the blue LED |
arduino-analog | Reads NX15 analog aliases A0–A4; J3 exposes A0 and A1 |
arduino-serial-echo | Echoes complete lines received through the USB-to-UART interface |
arduino-imu | Reads acceleration and angular rate from the onboard LSM6DSL |
arduino-shtc3 | Reads temperature and relative humidity from the onboard SHTC3 |
The repository also contains arduino-ble-uart and arduino-usb-serial. Their current platformio.ini files do not define an NX15 environment, so they are not included as NX15 examples.
Download and run an example
Clone the repository, then build the required project with its nx15 environment:
git clone https://github.com/KORLINX/KORLINX-PlatformIO.git
cd KORLINX-PlatformIO
pio run -d examples/arduino-blink -e nx15
pio run -d examples/arduino-blink -e nx15 -t upload
Replace arduino-blink with another project name from the table. For an example that prints output, open the NX15 USB serial port at 115200 baud:
pio device monitor --port YOUR_SERIAL_PORT --baud 115200
Troubleshooting
| Symptom | What to check |
|---|---|
| NX15 is absent from the project wizard | Install KORLINX-PlatformIO 1.1.0 globally and reload Visual Studio Code |
| Unknown board or package error | Use board = nx15 and the tagged platform URL |
UnknownBoard: Unknown board ID 'nx15' with platform = korlinx | The globally installed KORLINX platform may predate 1.1.0; update it or use the pinned repository URL in platformio.ini |
| Build uses nRF52840 | Check that the environment did not select nx40; NX15 must report nRF54L15 |
| J-Link cannot detect NX15 | Check power, VTref, GND, SWDIO, SWDCLK, NRESET, cable orientation, and probe support |
| The wrong probe is selected | Add the required J-Link serial number as upload_port |
| First upload takes longer | The first upload writes the loader and sketch; later uploads can skip matching flash |
pio debug fails | Interactive PlatformIO debugging is not supported for NX15 in release 1.1.0 |
| Serial Monitor is blank | Select the USB serial port, use 115200 baud, and confirm host serial permissions |