Wednesday, June 28th 2017, 5:38am UTC+2

You are not logged in.

  • Login
  • Register

joedev

Beginner

Date of registration: Mar 30th 2015

Posts: 5

1

Tuesday, April 21st 2015, 6:51am

[SOLVED] Keil uVision will not connect but J-Link Flash can connect

Dear forum


Sometime in the last month or so, uVision has stopped connecting to debug my device.

Before my problems started, my process start debugging in uVision was:

  • edit my code
  • compile my code
  • Start debugging (Ctrl-F5) which would flash my new binary and stop at main().



Now I have to run J-Link Flash to manually establish a connection (via J-Link Plus) to my device.

My process to start debugging in uVision is:

  • edit my code
  • compile my code
  • start J-Flash; open a flash project; and connect (Target->Connect) to the device
  • Start debugging (Ctrl-F5) which would flash my new binary and stop at main().


It seems that uVision has "forgotten" how to connect to my device, but it can use a connection established by J-Flash.

During my investigations, I have found that the JTAG device chain (see attached screenshots) is populated when when J-Flash has connected, but is empty when J-Flash has not connected.

It is not the adapter*. I tried tried two adapters (J_Link Pro and Flasher) and both adapters exhibit the same problem.

It is not my software project*. I have reverted to my known working code from several months ago(prior to any problems) and problem persists.

It is not my end device*. I have tested against both a CC2538 and a LPC1768 chips. Both devices were known to be working.

I am using the latest hardware, software, and firmware as of yesterday for both uVision and J-Flash. When prompted I updated the firmware for the J-Link Pro and Flasher adapters. My adapter is protected with a J-Link SWD isolator. I am developing on a freshly created windows installation.

My experience with Segger and uVision is limited and I am stuck. I have a workaround but I am crossing my fingers that the J-Flash workaround doesn't stop working.

I contacted Keil s(vision support) who said that the problem was with the Segger supplied debug dlls.


Does anyone have a suggestion of how I proceed?


thanks

Joe

Edit:
* I am 90% sure of these conclusions.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
IDE-Version: ┬ÁVision V5.14.0.0
Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved.

License Information:
<snip>
Tool Version Numbers:
Toolchain:        MDK-ARM Professional  Version: 5.14.0.0
Toolchain Path:    C:\Keil_v5\ARM\ARMCC\Bin
C Compiler:         Armcc.exe        V5.05 update 1 (build 106)
Assembler:          Armasm.exe        V5.05 update 1 (build 106)
Linker/Locator:     ArmLink.exe        V5.05 update 1 (build 106)
Library Manager:    ArmAr.exe        V5.05 update 1 (build 106)
Hex Converter:      FromElf.exe        V5.05 update 1 (build 106)
CPU DLL:               SARMCM3.DLL          V5.14.0.0
Dialog DLL:         DCM.DLL              V1.13.1.0
Target DLL:             Segger\JL2CM3.dll      V2.99.13.0
Dialog DLL:         TCM.DLL              V1.14.4.0


Source code

1
2
3
4
5
6
7
8
9
10
J-Link Commander information
SEGGER J-Link Commander V4.98b ('?' for help)
Compiled Apr 10 2015 20:16:11
DLL version V4.98b, compiled Apr 10 2015 20:15:52
Firmware: J-Link V9 compiled Apr 10 2015 10:51:08
Hardware: V9.30
S/N: 609301634
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTarget = 0.000V
J-Link>


Source code

1
2
3
4
5
6
7
8
9
10
SEGGER J-Link Commander V4.98b ('?' for help)
Compiled Apr 10 2015 20:16:11
DLL version V4.98b, compiled Apr 10 2015 20:15:52
Firmware: J-Link ARM / Flasher ARM V4 compiled Mar 31 2015 22:22:18
Hardware: V4.00
S/N: 164101831
Feature(s): JFlash, GDB
IP-Addr.: 255.255.255.255 (DHCP)
VTarget = 0.000V
J-Link>
joedev has attached the following images:
  • BeforeJLinkConnecting.png
  • AfterJLinkConnecting.png

This post has been edited 1 times, last edit by "joedev" (Apr 21st 2015, 6:57am)


SEGGER - Erik

Super Moderator

Date of registration: Dec 20th 2011

Posts: 383

2

Tuesday, April 21st 2015, 1:30pm

Hi,

The J-Link Commander outputs show a target reference voltage of 0 V. Was the target connected to the J-Link when this output has been created? If yes, is it possible that you supply the target via pin 19 of debug probe? This would explain the behavior as I assume that you J-Flash project is configured to supply power to the target on connect (default) behavior.

You can enable the target power supply permanently via the J-Link by entering the "power on perm" command in J-Link Commander.


- Erik

joedev

Beginner

Date of registration: Mar 30th 2015

Posts: 5

3

Wednesday, April 22nd 2015, 2:19am

You can enable the target power supply permanently via the J-Link by entering the "power on perm" command in J-Link Commander.


Hi Erik

I am using an isolator which specifically tells me to turn off power. My device has its own power supply so it doesn't need its own power. I will try removing the isolator and retrying.

joe

SEGGER - Erik

Super Moderator

Date of registration: Dec 20th 2011

Posts: 383

4

Wednesday, April 22nd 2015, 8:59am

Hi Joe,

Quoted

I am using an isolator which specifically tells me to turn off power
It is quite the opposite. J-Link needs to supply 5V power to the emulator side of the adapter on pin 19 (see "Preparing J-Link to supply power" https://www.segger.com/jtag-isolator.html

- Erik

SEGGER - Erik

Super Moderator

Date of registration: Dec 20th 2011

Posts: 383

5

Monday, April 27th 2015, 11:14am

Any news?

joedev

Beginner

Date of registration: Mar 30th 2015

Posts: 5

6

Friday, June 16th 2017, 4:06am

Conclusion:

I put the project away for 12 months and recently returned.

On a new machine with a fresh installation, uVision is behaving and I can load and debug my programs.

I suspect that something broke deep inside some registry, which caused my original problems. Reinstalling on a fresh windows build cleared my issues.

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,422

7

Friday, June 16th 2017, 9:08am

Hi Joe,


could the hear that you are up and running!


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