Wednesday, January 24th 2018, 4:53am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

terjef

Beginner

Date of registration: Oct 8th 2015

Posts: 4

Location: Trondheim, Norway

Occupation: Research Scientist

1

Tuesday, December 8th 2015, 11:34am

[SOLVED] J-Link GDB Server connect-to-target problem

Hello Forum,

I wonder if I have some timing problem when invoking the J-Link GDB Server?
(I'm running GDB version 5.02f, J-Link version 0.4 and emIDE version 2.20)

Observations:
1. When starting debug within emIDE it fails with the message:
"tcp:localhost:2331: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".

2. When starting the GDB server manually it fails to connect to target and exits.

3. If first starting the J-Link Commander and then the GDB server, the GDB server connects to the target and stays up, waiting for connection.

4. Then the emIDE debug session can start.

I have checked all emIDE settings and Segger J-Link registry settings and can't find any wrong.

Please advice.
Best regards
Terje Froysa

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

2

Tuesday, December 8th 2015, 6:05pm

Hi Terje,


Which target device are you using?
What do you mean with "J-Link version 0.4"?
Could you start J-Link Commander (jlink.exe) and provide us the output?

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

terjef

Beginner

Date of registration: Oct 8th 2015

Posts: 4

Location: Trondheim, Norway

Occupation: Research Scientist

3

Thursday, December 10th 2015, 9:01am

Hello Niklas

I am running a Nordic nRF52 evaluation board with a Cortex M4.
Sorry for the 0.4 which refers to the J-link plug-in dll version of the emIDE.

In the attachment you will find the screen-shots related to my problem.
It seems to me that the GDB Server is started when I start the emIDE, but I think it fails and exits.
Because, if I try to start the GDB Server manually, it fails to connect to target and exits after 2-3 seconds.
Only if I start jlink.exe first, the GDB Server comes up and stays.

Best regards
Terje
terjef has attached the following file:
  • Debug.pdf (647.89 kB - 741 times downloaded - Last download: Yesterday, 4:15am)

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

4

Thursday, December 10th 2015, 9:43am

Hi Terje,

Quoted

Sorry for the 0.4 which refers to the J-link plug-in dll version of the emIDE.

Thanks for the clarification.
If you can provide us with the emIDE Project settings (or even better, the project itself), I will try to reproduce this problem on our side.


Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

terjef

Beginner

Date of registration: Oct 8th 2015

Posts: 4

Location: Trondheim, Norway

Occupation: Research Scientist

5

Thursday, December 10th 2015, 12:20pm

Hello Niklas,

You are welcome to try.
When establishing this project, I made a directory "MyProjects" on the same level as the downloaded nRF52_SDK from Nordic.

I made my own HRS project (Hart Rate Simulator) by referring the SDK example files with relative paths.
By reading the corresponding gcc makefile, I established the same settings in the emIDE environment.
Hence, to compile this project you have to download the nRF52_SDK files (which are too big to attach here) side-by-side to the "MyProjects" directory.

Best regards
Terje
terjef has attached the following file:
  • MyProjects.zip (493.65 kB - 343 times downloaded - Last download: Jan 21st 2018, 5:31pm)

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

6

Friday, December 11th 2015, 3:24pm

Hi Terje,

sorry for the delay in response.

Two little thinks I noticed about your project file:
(In "Project options", tab "Debugger", for both release and debug configuration: )
  • In sub-tab "GDB" change the field "Remote Server" from other(external tool) to J-Link GDB Server
  • In sub tab "J-Link GDB Server" change "Target Interface" from JTAG to SWD
With this changes I was able to start a debugging session with a Nordic nRF52 evaluation board using your project.
All Nordic nRF52 evaluation boards I am aware of do not support JTAG but only SWD.

Best regards,
Niklas

Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

terjef

Beginner

Date of registration: Oct 8th 2015

Posts: 4

Location: Trondheim, Norway

Occupation: Research Scientist

7

Tuesday, December 15th 2015, 8:54pm

Thanks a lot Niklas!

That worked.
I should have found this myself, but the focus have been far off.

Best regards
Terje