RT1160 with VSCode

Showing results for 
Search instead for 
Did you mean: 

RT1160 with VSCode

Contributor I


We have a MIMXRT1160-EVK board and want to test it with VSCode, gcc and gdb.

To give it a try we download the latest SDK with the GCC-version of the led_blinky project and the latest gcc tolchain. In VSCode we install plugins for Cmake/Ninja, C/C++ and Cortex-Debug(GDB). 

Compiling linking and downloading seems to work fine, but GDB will not run the program.

Here is what we did:
To make VSCode compile the project we add the following line into CmakeLists.txt:

Then we got:
[build] Memory region         Used Size  Region Size  %age Used
[build]     m_interrupts:          1 KB         1 KB    100.00%
[build]           m_text:       25036 B       255 KB      9.59%
[build]           m_data:        2280 B       256 KB      0.87%
[build]          m_data2:          0 GB        64 KB      0.00%
[build] Build finished with exit code 0

We use jlink and the jlink script file from the example code.
In VSCode launch.json we add the following section:
    "configurations": [
            "name": "NC4 Core",
            "type": "cortex-debug",
            "device": "MIMXRT1166XXX6_M7",          
            "request": "launch",
            "interface": "swd",
            "servertype": "jlink",
            "runToEntryPoint": "main",
            "cwd": "${workspaceRoot}/cm7/armgcc/Debug",
            "executable": "iled_blinky_cm7.elf",
But GDB fail to jump to main.
Hopefully anyone can help us with the trick to succeed with this setup:)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi @larsmagne ,

We haven't demos or experience on VScode. I also haven't RT1160 on hand. To fast repeat the phenomenon I import RT1064 demo project into MCUXpresso and compile it. Then I create VScode project in the direction. I try to use VScode to debug.

This is settings.json

    "python.pythonPath": "C:\\Users\\nxf32199\\AppData\\Local\\Continuum\\anaconda3\\pythonw.exe",
    "cmake.configureOnOpen": true,
    "cortex-debug.armToolchainPath": "C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\10 2021.07\\bin",
     "makefile.makefilePath": "C:\\Users\\nxf32199\\mcuxpresso\\02\\SDKPackages\\SDK_2_11_1_EVK-MIMXRT1064\\boards\\evkmimxrt1064\\demo_apps\\hello_world\\armgcc",
    "makefile.makePath": "cmake"
This is launch.json
   "version": "0.2.0",
    "configurations": [
            "cwd": "${workspaceRoot}/Debug",
            "executable": "./evkmimxrt1064_iled_blinky.axf",
            "name": "Debug with JLink",
            "request": "launch",
            "interface": "swd",
            "type": "cortex-debug",
            "device": "RT1064",
            "runToEntryPoint": "main",
            "showDevDebugOutput": "none",
            "servertype": "jlink"
To my surprise it can debug and stop at main().
I installed these extension




0 Kudos