element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog EZ-MCXN: debug NXP MCXN326 controller with VS Code
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 12 Nov 2026 2:21 PM Date Created
  • Views 31 views
  • Likes 5 likes
  • Comments 1 comment
  • EZ-MCXN
  • LinkServer
  • MCXN
  • VS Code
  • nxp
  • vscode
  • MCXN236
Related
Recommended

EZ-MCXN: debug NXP MCXN326 controller with VS Code

Jan Cumps
Jan Cumps
12 Nov 2026

This post explains the steps to debug shabaz' EZ-MCXN dev board in VS Code.
I propose a launch script for the NXP MCXN326 controller. Not dependent on MCUXpresso's IDE or VS Code extension. Also independent of dev board definitions and SDK example code files.

image

use of AI:
I used Google AI to learn what VS Code config needed to be created, to help create the scripts, resolve errors on the way, and to find the ARM 10-pin debug connector documentation.
It's not used to write this blog's content.

Prerequisites: What do you need:

  • complete everything from previous post  EZ-MCXN: CMake script for NXP MCXN326 controller.
  • LinkServer installed
  • a LinkServer debugger (I use the one on an NXP development board), and
  • a cable to connect it to the EZ-MCXN SWD port

Scripts

Debug configuration is defined in .vscode/launch.json.  I started from existing LinkServer examples.

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "LinkServer: Debug MCXN236",
            "type": "cortex-debug",
            "request": "launch",
            "servertype": "external",
            "gdbTarget": "localhost:3333",
            "cwd": "${workspaceFolder}",
            "executable": "${command:cmake.launchTargetPath}",
            "device": "MCXN236",
            "interface": "swd",
            "runToEntryPoint": "main",            
            "gdbpath": "arm-none-eabi-gdb", 
            "svdFile": "${command:cmake.buildDirectory}/MCXN236.xml",
            "preLaunchTask": "Start LinkServer", 
            "showDevDebugOutput": "none"
        }
    ]
}

It's similar to many debug configurations. It's able to flash the firmware, connect to the MCXN236 ARM core, and stop at the first line of code.

What's specific to NXP, is that the LinkServer service needs to be started before the debugger can be launched. That's done with a task. Tasks are defined in .vscode/tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Start LinkServer",
            "type": "shell",
            "command": "C:\\NXP\\LinkServer_26.9.130\\LinkServer.exe",
            "args": [
                "gdbserver",
                "--gdb-port", "3333",
                "--probe", "FSAVAQEQ",
                "--no-boot",
                "--core", "cm33",
                "MCXN236:FRDM-MCXN236"
            ],
            "isBackground": true,
            "dependsOn": [
                "CMake: build"
            ],
            "problemMatcher": {
                "pattern": {
                    "regexp": "^$"
                },
                "background": {
                    "activeOnStart": true,
                    "beginsPattern": ".*",
                    "endsPattern": ".*GDB server listening on port *"
                }
            }
        }
    ]
}

In the launch config, this task is listed as a precondition:

"preLaunchTask": "Start LinkServer",

The task is will kick of LinkServer in the background, and yield back to the debug launcher, when it detects that the service is live:

"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": ".*GDB server listening on port *"
}

LinkServer knows that it can stop running after the debug session is finished, when the underlying gdbserver is stopped.

It may sound a bit involved. But for the developer, the only thing to do is push the debug button.

image

Firmware is built if needed. The device is flashed. The LinkServer starts, and the debug session is initiated. 
You can now step through code, watch variables, check registers.

Debugger and connection

image

Debugger

I'm using an NXP LinkServer debugger with an ARM-CORTEX 10pin SWD connector.
The one I use is on board of NXP's lpcxpresso55s69 development kit from RoadTest AVNET Monarch LTE-M Development Kit -- EU (debugger breakout instructions).
e14 sells several debugger, e.g.: this affordable one: MCU-LINK Debugger Probe .

Connections

The EZ-MCXN board has a SWD connector with all necessary pins. The layout isn't standard ARM-CORTEX, so I use a conversion cable (example: Black Magic 0.1" Pin Header JTAG Cable).
image
image source: product page I linked to above the image 

ARM-CORTEX 10 pin SWD

image

image source:NXP community

EZ-MCXN 6 pin SWD:

image

image souce: Shabaz' github

The wiring is easy: link these pins:

function debugger EZ-MCXN  comments
VREF 1 6 this is voltage sense. You have to provide power to the EZ-MCXN, via its USB or J14
SWDIO 2 3
GND 3 1
SWDCLK 4 5
SWO 6 4
nReset 10 2

Debugger UART port

If you use a standalone debugger, it will have dedicated UART TX / RX pins. Use those. No other actions needed.

To use the LPCXpresso55S69 LinkServer UART backport:

These lines are PCB-wired to the LPCX microcontroller's UART pins. You 'll need to hold that microcontroller in reset.
Then you can connect EZ-MCXN UART pins.

P16: nRST to GND (keep dev board microcontroller asleep. It will not read nor drive the 2 UART pins.
P8 Pin 2: External TX
P8 Pin 3: External RX

P1 should not have a jumper, because that disables the LinkServer UART.

Thank you for reading

Project attached: ez_mcxn_minimal_20261112.zip

Related posts.

  • Sign in to reply
Parents
  • shabaz
    shabaz 3 hours ago

    e14 sells several debugger, e.g.: this affordable one: MCU-LINK Debugger Probe .

    That's the one I use too (I believe the one on your dev-board may be functionally identical). It needs a fine-pitched cable, I think it did come with that (can't recall for sure) but I ended up soldering wires to pin headers. The yellow/orange wires in the photo are for the USB-UART, that comes in handy.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • shabaz
    shabaz 3 hours ago

    e14 sells several debugger, e.g.: this affordable one: MCU-LINK Debugger Probe .

    That's the one I use too (I believe the one on your dev-board may be functionally identical). It needs a fine-pitched cable, I think it did come with that (can't recall for sure) but I ended up soldering wires to pin headers. The yellow/orange wires in the photo are for the USB-UART, that comes in handy.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube