Getting Started with iMX8MN-EVK and MCU-LINK Pro for M Core Debugging

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting Started with iMX8MN-EVK and MCU-LINK Pro for M Core Debugging

Getting Started with iMX8MN-EVK and MCU-LINK Pro for M Core Debugging

This guide walks you through the required steps to prepare your development environment and hardware for debugging the M core on the IMX8MN-EVK board using the MCU-LINK Pro. You’ll install the necessary firmware, compile and flash a binary, and finally, initiate a debug session using MCUXpresso for VS Code.

Requirements:

  • IMX8MN-EVK Board

  • MCU-LINK Pro Debug Probe

  • PC Host with MCUXpresso for VS Code installed

Install Segger Firmware on MCU-LINK Pro

By default, the MCU-LINK Pro does not support i.MX processors. Installing the Segger firmware is essential for proper debugging.

Follow the firmware update guide to update your MCU-LINK Pro.

 

Compile the Binary for the M Core

Ensure MCUXpresso for VS Code is properly installed.

 

Import the iMX8MN-EVK SDK

Chavira_0-1755698330924.png

 

Import "hello world" example

Chavira_1-1755698515769.png

Ensure that we are compiling a debug binary

Chavira_0-1755709033328.png

Build Project

Chavira_0-1755708251783.png

 

Flash the Binary using UUU Tool

Connect the IMX8MN-EVK Board to your Host PC via USB


 

Enter Fastboot Mode in U-Boot Terminal

=> fastboot 0

 

On your Host PC, navigate to the binary location and flash it using the next commands:

$ cd <project_location>/armgcc/debug/

$ uuu -b fat_write hello_world.bin mmc X:1 hello_world_debug.bin

Note: replace the X with 2 if you are booting from eMMC or 1 if you are booting from SD Card

Chavira_5-1755701729711.png

 

Connect MCU-LINK Pro to the Target

Chavira_0-1755708638687.jpeg

 

IMX8MN-EVK Debug connection:

Chavira_1-1755708652859.jpeg

 

Launch the M Core from U-Boot Terminal

Use the following commands in the U-Boot terminal:

=> fatload mmc X:1 0x48000000 hello_world_debug.bin; cp.b 0x48000000 0x7e0000 0x20000;
=> bootaux 0x7e0000

Note: replace the X with 2 if you are booting from eMMC or 1 if you are booting from SD Card

Chavira_3-1755701674202.png

 

Start the Debug Session

Once the M core is launched, you can start your debug session in VS Code using MCUXpresso:

Chavira_0-1755708802524.png

 

Chavira_1-1755702026549.png

 

 With the MCU-LINK Pro configured, the IMX8MN-EVK, and the binary successfully flashed and executed, you are now ready to debug applications on the M core using MCUXpresso and VS Code. This setup enables a reliable development workflow for i.MX8MN based projects.

 

References:

AN14120.pdf 

%3CLINGO-SUB%20id%3D%22lingo-sub-2155380%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EGetting%20Started%20with%20iMX8MN-EVK%20and%20MCU-LINK%20Pro%20for%20M%20Core%20Debugging%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2155380%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CP%3EThis%20guide%20walks%20you%20through%20the%20required%20steps%20to%20prepare%20your%20development%20environment%20and%20hardware%20for%20debugging%20the%20M%20core%20on%20the%20IMX8MN-EVK%20board%20using%20the%20MCU-LINK%20Pro.%20You%E2%80%99ll%20install%20the%20necessary%20firmware%2C%20compile%20and%20flash%20a%20binary%2C%20and%20finally%2C%20initiate%20a%20debug%20session%20using%20MCUXpresso%20for%20VS%20Code.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ERequirements%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20data-start%3D%22603%22%20data-end%3D%22627%22%3E%0A%3CP%20data-start%3D%22605%22%20data-end%3D%22627%22%3E%3CSTRONG%20data-start%3D%22605%22%20data-end%3D%22625%22%3EIMX8MN-EVK%20Board%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20data-start%3D%22628%22%20data-end%3D%22660%22%3E%0A%3CP%20data-start%3D%22630%22%20data-end%3D%22660%22%3E%3CSTRONG%20data-start%3D%22630%22%20data-end%3D%22658%22%3EMCU-LINK%20Pro%20Debug%20Probe%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20data-start%3D%22706%22%20data-end%3D%22763%22%3E%0A%3CP%20data-start%3D%22708%22%20data-end%3D%22763%22%3E%3CSTRONG%20data-start%3D%22708%22%20data-end%3D%22719%22%3EPC%20Host%3C%2FSTRONG%3E%20with%20%3CSTRONG%20data-start%3D%22725%22%20data-end%3D%22751%22%3EMCUXpresso%20for%20VS%20Code%3C%2FSTRONG%3E%20installed%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3EInstall%20Segger%20Firmware%20on%20MCU-LINK%20Pro%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20data-start%3D%22844%22%20data-end%3D%22972%22%3EBy%20default%2C%20the%20MCU-LINK%20Pro%20does%20not%20support%20i.MX%20processors.%20Installing%20the%20Segger%20firmware%20is%20essential%20for%20proper%20debugging.%3C%2FP%3E%0A%3CP%20data-start%3D%22974%22%20data-end%3D%221061%22%3EFollow%20the%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-install-Segger-Firmware-in-MCU-LINK-PRO%2Fta-p%2F2100846%22%20target%3D%22_self%22%3Efirmware%20update%20guide%3C%2FA%3E%20to%20update%20your%20MCU-LINK%20Pro.%3C%2FP%3E%0A%3CP%20data-start%3D%22974%22%20data-end%3D%221061%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CP%3E%3CSTRONG%3ECompile%20the%20Binary%20for%20the%20M%20Core%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EEnsure%20MCUXpresso%20for%20VS%20Code%20is%20properly%20installed.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EImport%20the%20iMX8MN-EVK%20SDK%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_0-1755698330924.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_0-1755698330924.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353309i7C2316BA2184F90B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_0-1755698330924.png%22%20alt%3D%22Chavira_0-1755698330924.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EImport%20%22hello%20world%22%20example%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_1-1755698515769.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_1-1755698515769.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353315i7E4019C940C54E02%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_1-1755698515769.png%22%20alt%3D%22Chavira_1-1755698515769.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EEnsure%20that%20we%20are%20compiling%20a%20debug%20binary%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_0-1755709033328.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_0-1755709033328.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353357iD746C20DF67EF0CD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_0-1755709033328.png%22%20alt%3D%22Chavira_0-1755709033328.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EBuild%20Project%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_0-1755708251783.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_0-1755708251783.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353351iEB6DAF0CEF6B4E2C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_0-1755708251783.png%22%20alt%3D%22Chavira_0-1755708251783.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EFlash%20the%20Binary%20using%20UUU%20Tool%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EConnect%20the%20IMX8MN-EVK%20Board%20to%20your%20Host%20PC%20via%20USB%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3EEnter%20Fastboot%20Mode%20in%20U-Boot%20Terminal%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3D%26gt%3B%20fastboot%200%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EOn%20your%20Host%20PC%2C%20navigate%20to%20the%20binary%20location%20and%20flash%20it%20using%20the%20next%20commands%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20cd%20%3CPROJECT_LOCATION%3E%2Farmgcc%2Fdebug%2F%0A%0A%24%20uuu%20-b%20fat_write%20hello_world.bin%20mmc%20X%3A1%20hello_world_debug.bin%3C%2FPROJECT_LOCATION%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20replace%20the%20%3CSTRONG%3EX%3C%2FSTRONG%3E%20with%3CSTRONG%3E%26nbsp%3B2%3C%2FSTRONG%3E%26nbsp%3Bif%20you%20are%20booting%20from%20%3CSTRONG%3EeMMC%3C%2FSTRONG%3E%20or%20%3CSTRONG%3E1%3C%2FSTRONG%3E%26nbsp%3Bif%20you%20are%20booting%20from%20%3CSTRONG%3ESD%20Card%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_5-1755701729711.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_5-1755701729711.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353333i1DBC78F973468133%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_5-1755701729711.png%22%20alt%3D%22Chavira_5-1755701729711.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EConnect%20MCU-LINK%20Pro%20to%20the%20Target%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_0-1755708638687.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_0-1755708638687.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353353i3408A8F4421021C7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_0-1755708638687.jpeg%22%20alt%3D%22Chavira_0-1755708638687.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EIMX8MN-EVK%20Debug%20connection%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_1-1755708652859.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_1-1755708652859.jpeg%22%20style%3D%22width%3A%20300px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353354iA319F054520E3296%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_1-1755708652859.jpeg%22%20alt%3D%22Chavira_1-1755708652859.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ELaunch%20the%20M%20Core%20from%20U-Boot%20Terminal%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EUse%20the%20following%20commands%20in%20the%20U-Boot%20terminal%3A%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3D%26gt%3B%20fatload%20mmc%20X%3A1%200x48000000%20hello_world_debug.bin%3B%20cp.b%200x48000000%200x7e0000%200x20000%3B%0A%3D%26gt%3B%20bootaux%200x7e0000%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20replace%20the%20%3CSTRONG%3EX%3C%2FSTRONG%3E%20with%3CSTRONG%3E%26nbsp%3B2%3C%2FSTRONG%3E%26nbsp%3Bif%20you%20are%20booting%20from%20%3CSTRONG%3EeMMC%3C%2FSTRONG%3E%20or%20%3CSTRONG%3E1%3C%2FSTRONG%3E%20if%20you%20are%20booting%20from%20%3CSTRONG%3ESD%20Card%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_3-1755701674202.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_3-1755701674202.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353331iBFD2B83FF24E2B4B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_3-1755701674202.png%22%20alt%3D%22Chavira_3-1755701674202.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3EStart%20the%20Debug%20Session%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EOnce%20the%20M%20core%20is%20launched%2C%20you%20can%20start%20your%20debug%20session%20in%20%3CSTRONG%20data-start%3D%223082%22%20data-end%3D%223093%22%3EVS%20Code%3C%2FSTRONG%3E%20using%20MCUXpresso%3A%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_0-1755708802524.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_0-1755708802524.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353356iF192B366C1A22F0E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_0-1755708802524.png%22%20alt%3D%22Chavira_0-1755708802524.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chavira_1-1755702026549.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chavira_1-1755702026549.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353342i8BFDA860E3EB1534%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chavira_1-1755702026549.png%22%20alt%3D%22Chavira_1-1755702026549.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%26nbsp%3BWith%20the%20MCU-LINK%20Pro%20configured%2C%20the%20IMX8MN-EVK%2C%20and%20the%20binary%20successfully%20flashed%20and%20executed%2C%20you%20are%20now%20ready%20to%20debug%20applications%20on%20the%20M%20core%20using%20MCUXpresso%20and%20VS%20Code.%20This%20setup%20enables%20a%20reliable%20development%20workflow%20for%20i.MX8MN%20based%20projects.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EReferences%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14120.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAN14120.pdf%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎08-20-2025 09:57 AM
Updated by: