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

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [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?



    * I am 90% sure of these conclusions.

    Source Code

    1. IDE-Version: µVision V5.14.0.0
    2. Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved.
    3. License Information:
    4. <snip>
    5. Tool Version Numbers:
    6. Toolchain: MDK-ARM Professional Version:
    7. Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
    8. C Compiler: Armcc.exe V5.05 update 1 (build 106)
    9. Assembler: Armasm.exe V5.05 update 1 (build 106)
    10. Linker/Locator: ArmLink.exe V5.05 update 1 (build 106)
    11. Library Manager: ArmAr.exe V5.05 update 1 (build 106)
    12. Hex Converter: FromElf.exe V5.05 update 1 (build 106)
    13. CPU DLL: SARMCM3.DLL V5.14.0.0
    14. Dialog DLL: DCM.DLL V1.13.1.0
    15. Target DLL: Segger\JL2CM3.dll V2.99.13.0
    16. Dialog DLL: TCM.DLL V1.14.4.0
    Display All

    Source Code

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

    Source Code

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

      174.56 kB, 1,830×1,426, viewed 800 times
    • AfterJLinkConnecting.png

      200.27 kB, 1,838×1,432, viewed 840 times

    The post was edited 1 time, last by joedev ().

  • 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
  • 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.
  • Hi Joe,

    could the hear that you are up and running!

    Best regards,
    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