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


    thanks

    Joe

    Edit:
    * 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: 5.14.0.0
    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.: 255.255.255.255 (DHCP)
    9. VTarget = 0.000V
    10. J-Link>
    Images
    • BeforeJLinkConnecting.png

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

      200.27 kB, 1,838×1,432, viewed 2,252 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • SEGGER - Erik wrote:

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

    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" segger.com/jtag-isolator.html

    - Erik
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.