1888731_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

1888731_en-US

1888731_en-US

S32K1 attach gdbserver without reset

Hi,

I am trying to attach my debugger (SEGGER J-Link) to a running target to debug it. However, when starting the gdb server, the target seems to reset.

Steps to reproduce this issue:

1. Start SEGGER J-Link Remote Server

2. Start gdb server (in WSL2) using the following command: `JLinkGDBServerCLExe -device S32K144W -endian little -if SWD -speed auto -noir -noLocalhostOnly -nologtofile -TelnetPort 19020 -select IP=192.168.x.y -noreset -nohalt`

Observer behaviour:

When the command is run, the RESET pin is pulled down for 160ms. The running program is stopped (observed by the blinking led that stops). After ~4 seconds, the gdbserver is attached (> `Connected to target`) and the application starts again (led blinking). However, the application was reset, which is not as desired.

Any idea to why this would be or what I could do to find the cause? The reset reason seems to be SW reset.

The used MCU is a S32K144W on a custom board. Debugging etc works without a problem, the issue I am having is just that I cannot attach to a running target.

Re: S32K1 attach gdbserver without reset

Hi @danielmartynek ,

Using the script when starting the gdb server solved the problem.

`JLinkGDBServerCLExe -device S32K144W -endian little -if SWD -speed auto -noir -noLocalhostOnly -nologtofile -TelnetPort 19020 -select IP=192.168.x.y -JLinkScriptFile NXP_Kinetis_S32_Attach.JLinkScript -nohalt`

Thank you very much and have a nice day!

Re: S32K1 attach gdbserver without reset

HI @peacefulcarrot,

It is necessary that the MCU is in the unlocked state.


A special JLink script is needed, which can be found here:

https://wiki.segger.com/S32Kxxx#Attach_to_debug_session

JLink commander has to be called in following way:

C:\Programme\SEGGER\JLink\JLink.exe -JLinkScriptFile NXP_Kinetis_S32_Attach.JLinkScript

Then, the MCU is not reset, and access to all memory and registers is possible.


Please contact SEGGER support if you have any questions,


Regards,

Daniel

标记 (1)
无评分
版本历史
最后更新:
‎11-21-2025 09:46 PM
更新人: