VSCode J-link settings file and startup command

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

VSCode J-link settings file and startup command

512 Views
Greenhal
Contributor II

Hi,

I am facing problems with debugging code using J-link and VSCode extension with iMXRT117x. I am using a custom board without flash - only external RAM is available. With MCUXpresso I was able to establish proper debugging session but with VSCode I have troubles. 

First thing that is not working fully correct for me is that J-link settings file is loaded from default location which is in the "build" directory. I can change the settings in the file but my environment work in the way that when I clean project the build directory is deleted so I need to change settings file every time I clean the build. Is it possible to set custom path to the settings J-link file?

Second thing is that to be able properly debug the code I need to add the memory settings. In the MCUXpresso it is done in the way presented below

Greenhal_0-1754988324796.png

How can I add this settings to the VSCode debugger?

Best regards

Labels (2)
0 Kudos
Reply
2 Replies

479 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Greenhal,

Unfortunately, the two features that you are looking for are not available on the current version of VS Code. Please continue using standalone MCUXpresso IDE instead.

BR,
Edwin.

0 Kudos
Reply

383 Views
Jamie309Perez
Contributor I

Hello!

You're facing two key issues with J-Link and VSCode on your iMXRT117x custom board. First, to avoid losing your J-Link settings file when cleaning the build directory, you can set a custom path in launch.json using the -settingsfile argument, pointing to a stable location like ${workspaceFolder}/jlink_settings.ini. Second, to enable proper debugging with external RAM, replicate MCUXpresso’s memory settings by adding a memoryMap entry in launch.json, specifying the RAM’s start address, size, and access type. This ensures the debugger knows where valid memory is for breakpoints and variable inspection. 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2150762%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EVSCode%20J-link%20settings%20file%20and%20startup%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2150762%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20facing%20problems%20with%20debugging%20code%20using%20J-link%20and%20VSCode%20extension%20with%20iMXRT117x.%20I%20am%20using%20a%20custom%20board%20without%20flash%20-%20only%20external%20RAM%20is%20available.%20With%20MCUXpresso%20I%20was%20able%20to%20establish%20proper%20debugging%20session%20but%20with%20VSCode%20I%20have%20troubles.%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20thing%20that%20is%20not%20working%20fully%20correct%20for%20me%20is%20that%20J-link%20settings%20file%20is%20loaded%20from%20default%20location%20which%20is%20in%20the%20%22build%22%20directory.%20I%20can%20change%20the%20settings%20in%20the%20file%20but%20my%20environment%20work%20in%20the%20way%20that%20when%20I%20clean%20project%20the%20build%20directory%20is%20deleted%20so%20I%20need%20to%20change%20settings%20file%20every%20time%20I%20clean%20the%20build.%20Is%20it%20possible%20to%20set%20custom%20path%20to%20the%20settings%20J-link%20file%3F%3C%2FP%3E%3CP%3ESecond%20thing%20is%20that%20to%20be%20able%20properly%20debug%20the%20code%20I%20need%20to%20add%20the%20memory%20settings.%20In%20the%20MCUXpresso%20it%20is%20done%20in%20the%20way%20presented%20below%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Greenhal_0-1754988324796.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Greenhal_0-1754988324796.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F351965iC1DA9A389F0B1A4F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Greenhal_0-1754988324796.png%22%20alt%3D%22Greenhal_0-1754988324796.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHow%20can%20I%20add%20this%20settings%20to%20the%20VSCode%20debugger%3F%3C%2FP%3E%3CP%3EBest%20regards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2150762%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2152530%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20VSCode%20J-link%20settings%20file%20and%20startup%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2152530%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F210543%22%20target%3D%22_blank%22%3E%40Greenhal%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EUnfortunately%2C%20the%20two%20features%20that%20you%20are%20looking%20for%20are%20not%20available%20on%20the%20current%20version%20of%20VS%20Code.%20Please%20continue%20using%20standalone%20MCUXpresso%20IDE%20instead.%3C%2FP%3E%0A%3CP%3EBR%2C%3CBR%20%2F%3EEdwin.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2150820%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20VSCode%20J-link%20settings%20file%20and%20startup%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2150820%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello!%3C%2FP%3E%3CP%3EYou're%20facing%20two%20key%20issues%20with%20J-Link%20and%20VSCode%20on%20your%20iMXRT117x%20custom%20board.%20First%2C%20to%20avoid%20losing%20your%20J-Link%20settings%20file%20when%20cleaning%20the%20build%20directory%2C%20you%20can%20set%20a%20custom%20path%20in%20launch.json%20using%20the%20-settingsfile%20argument%2C%20pointing%20to%20a%20stable%20location%20like%20%24%7BworkspaceFolder%7D%2Fjlink_settings.ini.%20Second%2C%20to%20enable%20proper%20debugging%20with%20external%20RAM%2C%20replicate%20MCUXpresso%E2%80%99s%20memory%20settings%20by%20adding%20a%20memoryMap%20entry%20in%20launch.json%2C%20specifying%20the%20RAM%E2%80%99s%20start%20address%2C%20size%2C%20and%20access%20type.%20This%20ensures%20the%20debugger%20knows%20where%20valid%20memory%20is%20for%20breakpoints%20and%20variable%20inspection.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E