VS json for RT685 w/o Xpresso

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

VS json for RT685 w/o Xpresso

1,690件の閲覧回数
Shlomot
Contributor I


Hi,

My project is based on RT685, utilizing RT685 without XPresso, but incorporating
complex makeup and external tools to build and program the Flash.
Upon powering on, the application is uploaded from the Flash to the RAM.

I would like to integrate the following options into VS Code:

Launch JLINK GDB server.
Attach to the current running firmware and initiate debugging.
Upload arm.elf to the RAM.
Could you please provide guidance on the best method to implement this?

I've discovered that cortex-debug can be utilized to launch the GDB server, as shown in the example below.
However, upon this launch, the "executable" is also uploaded.
How can I exclusively initiate the GDB server without uploading the "executable"?

Best Regarrds,

/H

 


{
    "version": "0.2.0",
    "configurations": [
      {
      "type": "cortex-debug",
      "request": "launch",
      "name": "RT685--Debug J-Link",
      "cwd": "${workspaceRoot}",
      "executable": "${workspaceRoot}/debug/dmc.elf",
      "serverpath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL.exe",
      "servertype": "jlink",
      "device": "MIMXRT685S_M33",
      "interface": "swd",
      "serialNumber": "", //If you have more than one J-Link probe, add the serial number here.
      "runToEntryPoint":"main",
      "showDevDebugOutput":"raw",
      }
      ]
    }
}

 

0 件の賞賛
返信
5 返答(返信)

1,592件の閲覧回数
cristiantepus
NXP Employee
NXP Employee

Hi,

If you want to benefit from our NXP project and debug support, first of all, please switch to NXP extension which relies on "cppdbg" support, not "cortex-debug". See our extension documentation here: https://github.com/nxp-mcuxpresso/vscode-for-mcux/wiki

Then, simply right click on a project (in NXP Projects view) and select "Attach".

Or, if you prefer to work directly with launch.json, please be sure you have 

"variables": {
        [...]
        "mcuxAttach": "true"
, before debugging.
 
 
Regards,
Cristian
0 件の賞賛
返信

1,587件の閲覧回数
Shlomot
Contributor I

Hi,

Is it correct that in order to use the NXP extension for VS Code
It's mandatory to port my project to NXP Xpresso,
or it can be used without any Xpresso project ?

Best Regards,

Shlomo

0 件の賞賛
返信

1,583件の閲覧回数
cristiantepus
NXP Employee
NXP Employee

Yes, it should be an MCUXpresso project type. But this should be achievable (if you have a pure cmake project) by importing it in our extension. Please check on: https://github.com/nxp-mcuxpresso/vscode-for-mcux/wiki/Working-with-Pure-CMake-Projects#importing-a-... 

Also note that even if in doc is specified a zip cmake project as example, it will also work for a project folder.

Regards,

Cristian

0 件の賞賛
返信

1,685件の閲覧回数
Kylenorton
Contributor I

Hii,

This will prevent the automatic upload of the executable upon GDB server launch. Make sure to keep the "serverpath," "servertype," and other relevant settings intact. This way, you can separately upload the "arm.elf" to RAM without it being uploaded automatically during GDB server launch.

Best regard,
YourTexasBenefits
0 件の賞賛
返信

1,675件の閲覧回数
Shlomot
Contributor I
Hi Kylenorton 
Thanks a lot for your prompt response.
I did not understand what you propose to change in my launch.json in order to avoid executable uploading.

Please see below the VS Code terminal log of the launch:

Thanks,
Shlomot




Waiting for gdb server to start...[2023-08-24T10:47:26.742Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:/Program Files/SEGGER/JLink/JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device MIMXRT685S_M33
SEGGER J-Link GDB Server V7.92a Command Line Version

JLinkARM.dll V7.92a (DLL compiled Aug 16 2023 15:34:08)

Command line: -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device MIMXRT685S_M33
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 50000
SWO raw output listening port: 50001
Terminal I/O port: 50002
Accept remote connection: localhost only
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: MIMXRT685S_M33
Target device parameters: none
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Ultra V5 compiled Jun 20 2023 18:00:16
Hardware: V5.00
S/N: 505002641
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 1.77 V
Listening on TCP/IP port 50000
Connecting to target...
Halting core...
Core security extensions: Implemented
Connected to target
Waiting for GDB connection...Connected to 0000:0000:0000:0000:0000:0000:0000:0001
GDB client (conn. 848) requested target.xml from GDB Server
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x00ED00E0
Read register 'r1' (4 bytes) from hardware: 0x13D20F41
Read register 'r2' (4 bytes) from hardware: 0x84230050
Read register 'r3' (4 bytes) from hardware: 0x00DCD302
Read register 'r4' (4 bytes) from hardware: 0x5AC35AC3
Read register 'r5' (4 bytes) from hardware: 0x70200110
Read register 'r6' (4 bytes) from hardware: 0x01F3000C
Read register 'r7' (4 bytes) from hardware: 0x5AC3C35A
Read register 'r8' (4 bytes) from hardware: 0x33CCAA55
Read register 'r9' (4 bytes) from hardware: 0x3CC33CC3
Read register 'r10' (4 bytes) from hardware: 0x5AC3C35A
Read register 'r11' (4 bytes) from hardware: 0x00C00100
Read register 'r12' (4 bytes) from hardware: 0xCEF20000
Read register 'sp' (4 bytes) from hardware: 0x00D00100
Read register 'lr' (4 bytes) from hardware: 0xA5CB0013
Read register 'pc' (4 bytes) from hardware: 0x4AC00100
Read register 'xpsr' (4 bytes) from hardware: 0x00000069
Read 4 bytes @ address 0x0001C04A (Data = 0xE00BE7FE)
Read 2 bytes @ address 0x0001C04A (Data = 0xE7FE)
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x0001C04A)
Received monitor command: reset
Resetting target
Downloading 304 bytes @ address 0x00080000
Downloading 16176 bytes @ address 0x00080130
Downloading 16112 bytes @ address 0x00084060
Downloading 16080 bytes @ address 0x00087F50
Downloading 16160 bytes @ address 0x0008BE20
Downloading 16000 bytes @ address 0x0008FD40
Downloading 16000 bytes @ address 0x00093BC0
Downloading 15000 bytes @ address 0x00097A40
Downloading 16216 bytes @ address 0x0009B4D8
Downloading 16240 bytes @ address 0x0009F430
Downloading 16240 bytes @ address 0x000A33A0
Downloading 16240 bytes @ address 0x000A7310
Downloading 16352 bytes @ address 0x000AB280
Downloading 16368 bytes @ address 0x000AF260
Downloading 16368 bytes @ address 0x000B3250
Downloading 16368 bytes @ address 0x000B7240
Downloading 16128 bytes @ address 0x000BB230
Downloading 3348 bytes @ address 0x000BF130
Downloading 16252 bytes @ address 0x000BFE44
Downloading 15952 bytes @ address 0x000C3DC0
Downloading 16128 bytes @ address 0x000C7C10
Downloading 16192 bytes @ address 0x000CBB10
Downloading 16128 bytes @ address 0x000CFA50
Downloading 16000 bytes @ address 0x000D3950
Downloading 16256 bytes @ address 0x000D77D0
Downloading 16176 bytes @ address 0x000DB750
Downloading 16144 bytes @ address 0x000DF680
Downloading 16096 bytes @ address 0x000E3590
Downloading 16176 bytes @ address 0x000E7470
Downloading 16144 bytes @ address 0x000EB3A0
Downloading 16080 bytes @ address 0x000EF2B0
Downloading 16160 bytes @ address 0x000F3180
Downloading 16160 bytes @ address 0x000F70A0
Downloading 16096 bytes @ address 0x000FAFC0
Downloading 16048 bytes @ address 0x000FEEA0
Downloading 16096 bytes @ address 0x00102D50
Downloading 16128 bytes @ address 0x00106C30
Downloading 16112 bytes @ address 0x0010AB30
Downloading 16128 bytes @ address 0x0010EA20
Downloading 16144 bytes @ address 0x00112920
Downloading 16080 bytes @ address 0x00116830
Downloading 16144 bytes @ address 0x0011A700
Downloading 16000 bytes @ address 0x0011E610
Downloading 16080 bytes @ address 0x00122490
Downloading 16064 bytes @ address 0x00126360
Downloading 16240 bytes @ address 0x0012A220
Downloading 16160 bytes @ address 0x0012E190
Downloading 16144 bytes @ address 0x001320B0
Downloading 16160 bytes @ address 0x00135FC0
Downloading 16112 bytes @ address 0x00139EE0
Downloading 16144 bytes @ address 0x0013DDD0
Downloading 16160 bytes @ address 0x00141CE0
Downloading 16160 bytes @ address 0x00145C00
Downloading 16176 bytes @ address 0x00149B20
Downloading 16160 bytes @ address 0x0014DA50
Downloading 16176 bytes @ address 0x00151970
Downloading 16176 bytes @ address 0x001558A0
Downloading 16144 bytes @ address 0x001597D0
Downloading 16176 bytes @ address 0x0015D6E0
Downloading 13944 bytes @ address 0x00161610
Downloading 8 bytes @ address 0x00164C88
Downloading 4 bytes @ address 0x00164C90
Downloading 4 bytes @ address 0x00164C94
Downloading 16264 bytes @ address 0x00164C98
Downloading 16240 bytes @ address 0x00168C20
Downloading 16224 bytes @ address 0x0016CB90
Downloading 16272 bytes @ address 0x00170AF0
Downloading 16256 bytes @ address 0x00174A80
Downloading 16240 bytes @ address 0x00178A00
Downloading 16192 bytes @ address 0x0017C970
Downloading 16272 bytes @ address 0x001808B0
Downloading 13960 bytes @ address 0x00184840
Downloading 16352 bytes @ address 0x00500000
Downloading 16352 bytes @ address 0x00503FE0
Downloading 6136 bytes @ address 0x00507FC0
Downloading 7240 bytes @ address 0x005097B8
Writing register 'pc' = 0x000801EC
Received monitor command: reset
Resetting target
Read 4 bytes @ address 0x000801EC (Data = 0xFFEDFEA3)
Read 2 bytes @ address 0x000801EC (Data = 0xFEA3)
Read 2 bytes @ address 0x000801EE (Data = 0xFFED)
Reading 64 bytes @ address 0x00081A80
Reading 64 bytes @ address 0x00081AC0
Read 2 bytes @ address 0x00081AC2 (Data = 0x0411)
Read 4 bytes @ address 0x000801EC (Data = 0xFFEDFEA3)
Read 2 bytes @ address 0x000801EC (Data = 0xFEA3)
Read 2 bytes @ address 0x000801EE (Data = 0xFFED)
Setting breakpoint @ address 0x00081AC2, Kind = 2, Type = THUMB, BPHandle = 0x0001
Starting target CPU...



0 件の賞賛
返信