[Solved] Problems with J-Link Commander V4.80 on Linux with J-Link Lite-XMC4000 Rev.1

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

  • [Solved] Problems with J-Link Commander V4.80 on Linux with J-Link Lite-XMC4000 Rev.1

    Dear Segger team,

    I'm currently trying to use J-Link lite which came on an Infineon XMC4500 Relax development board.
    I run a Linux only development envoronment, so I can not use Windows tools (except those runnning with wine).

    I installed jlink_4.80_x86_64.deb and started to get in touch with it.

    1. But I've run into some problems: I'm not able to go cleanly through halt/go/reset cycles.
      Reset modes 0,1, and 3,... fail to bring the development board back to live. Reset mode 2 seems to reset the board in a state, where the flashed example code is running, but halting, single stepping, etc. is not possible.

      The beaviour is the same on different types of XMC4500 Relax/Relax lite kits.

      Below is an example session:
      $ JLinkExe
      SEGGER J-Link Commander V4.80 ('?' for help)
      Compiled Dec 20 2013 19:40:54
      DLL version V4.80, compiled Dec 20 2013 19:40:51
      Firmware: J-Link Lite-XMC4000 Rev.1 compiled Dec 7 2012 19:23:07
      Hardware: V1.00
      S/N: 551xxxxxx
      VTarget = 3.300V
      Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
      Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
      No devices found on JTAG chain. Trying to find device on SWD.
      Info: Found SWD-DP with ID 0x2BA01477
      Info: Found Cortex-M4 r0p1, Little endian.
      Info: FPUnit: 6 code (BP) slots and 2 literal slots
      Info: TPIU fitted.
      Info: ETM fitted.
      Cortex-M4 identified.
      Target interface speed: 100 kHz
      J-Link>h
      R0 = 0000000D, R1 = 0C0006BC, R2 = 00000007, R3 = 0000000D
      R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 2000FFBC
      R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
      R12= 0000002B, R13= 2000FFBC, MSP= 2000FFBC, PSP= 00000000
      R14(LR) = 0C000C47, R15(PC) = 0C000BC0
      XPSR = 81000000, APSR = 80000000, EPSR = 01000000, IPSR = 00000000
      CFBP = 04000000, CONTROL = 04, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
      CycleCnt = 1E89AEFA

      FPS0 = 3F5FB258, FPS1 = 3E85B66A, FPS2 = 3F4377AB, FPS3 = BD3F6A06
      FPS4 = 3F5B941A, FPS5 = 3F64AA59, FPS6 = 3F5EBE05, FPS7 = 3F61C598
      FPS8 = BD76DA59, FPS9 = 3F584980, FPS10= 3D53CD56, FPS11= 3EAFD936
      FPS12= 3F1CD723, FPS13= 3BA31A7F, FPS14= BDA68EAB, FPS15= 0000000D
      FPS16= 41700000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
      FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
      FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
      FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
      FPSCR= 20000018
      J-Link>g
      J-Link>h

      R0 = 0000000A, R1 = 0C0007D0, R2 = 5904BE26, R3 = 20000004
      R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 2000FFBC
      R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
      R12= 00000070, R13= 2000FFBC, MSP= 2000FFBC, PSP= 00000000
      R14(LR) = 0C000C3B, R15(PC) = 0C000BC4
      XPSR = 81000000, APSR = 80000000, EPSR = 01000000, IPSR = 00000000
      CFBP = 04000000, CONTROL = 04, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
      CycleCnt = 412A022F

      FPS0 = 3EBBD292, FPS1 = 3E838BD0, FPS2 = 3EABF944, FPS3 = BD74E647
      FPS4 = 3ECF7BCA, FPS5 = 3EAC7CD4, FPS6 = 3EC3EF15, FPS7 = 3EB8442A
      FPS8 = BD3C3C35, FPS9 = 3F26E1C0, FPS10= 3DEDA600, FPS11= 3F451585
      FPS12= 3DE11B09, FPS13= 3D6665B9, FPS14= BEA1CA3C, FPS15= 00000005
      FPS16= 41700000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
      FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
      FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
      FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
      FPSCR= 20000018
      J-Link>s
      0C000BC4: FB 68 LDR R3, [R7, #+0x0C]
      J-Link>s
      0C000BC6: D2 1A SUB R2, R2, R3
      J-Link>s
      0C000BC8: 7B 68 LDR R3, [R7, #+0x04]
      J-Link>g
      J-Link>r

      Reset delay: 0 ms
      Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

      WARNING: Could not set S_RESET_ST

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted
      Info: Core did not halt after reset, trying to disable WDT.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted

      WARNING: Could not set S_RESET_ST
      Info: SYSRESETREQ has confused core. Trying to reconnect and use VECTRESET.
      Info: Found SWD-DP with ID 0x2BA01477
      Info: Found Cortex-M4 r0p1, Little endian.
      J-Link>h
      R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
      R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
      R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
      R12= 00000000, R13= 2000FF3C, MSP= 2000FF3C, PSP= 00000000
      R14(LR) = FFFFFFFF, R15(PC) = 00000B14
      XPSR = 01000000, APSR = 00000000, EPSR = 01000000, IPSR = 00000000
      CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
      CycleCnt = 00000000

      FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
      FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
      FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
      FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= 00000000
      FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
      FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
      FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
      FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
      FPSCR= 00000000
      J-Link>#code execution on devboard stopped (no blinking LED)
      Unknown command. '?' for help.
      J-Link>g

      ****** Error: Could not start CPU core. (ErrorCode: -2)
      J-Link>RSetType 2
      Reset type RESETPIN: Resets core & peripherals using RESET pin.
      J-Link>r
      Reset delay: 0 ms
      Reset type RESETPIN: Resets core & peripherals using RESET pin.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted
      Info: Core did not halt after reset, trying to disable WDT.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted

      WARNING: Could not set S_RESET_ST

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted
      Info: Core did not halt after reset, trying to disable WDT.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted

      WARNING: Could not set S_RESET_ST
      J-Link># code on devboard running again (blinking LED)
      Unknown command. '?' for help.
      J-Link>h

      WARNING: CPU could not be halted
      J-Link>r
      Reset delay: 0 ms
      Reset type RESETPIN: Resets core & peripherals using RESET pin.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted
      Info: Core did not halt after reset, trying to disable WDT.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted

      WARNING: Could not set S_RESET_ST

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted
      Info: Core did not halt after reset, trying to disable WDT.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted

      WARNING: Could not set S_RESET_ST
      J-Link>h

      WARNING: CPU could not be halted


    2. Additionally, I experienced JTAG problems. Sometimes JTAG seems to work (see below), sometimes not (see above). The behaviour described above stays the same.
      SEGGER J-Link Commander V4.80 ('?' for help)
      Compiled Dec 20 2013 19:40:54
      DLL version V4.80, compiled Dec 20 2013 19:40:51
      Firmware: J-Link Lite-XMC4000 Rev.1 compiled Dec 7 2012 19:23:07
      Hardware: V1.00
      S/N: 551xxxxxx
      VTarget = 3.300V
      Info: Found SWD-DP with ID 0x2BA01477
      Info: Found Cortex-M4 r0p1, Little endian.
      Info: FPUnit: 6 code (BP) slots and 2 literal slots
      Info: TPIU fitted.
      Info: ETM fitted.
      Found 1 JTAG device, Total IRLen = 4:
      Cortex-M4 identified.
      Target interface speed: 100 kHz
      J-Link>r
      Reset delay: 0 ms
      Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

      WARNING: Could not set S_RESET_ST

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted
      Info: Core did not halt after reset, trying to disable WDT.

      WARNING: CPU did not halt after reset.

      WARNING: CPU could not be halted

      WARNING: Could not set S_RESET_ST
      Info: SYSRESETREQ has confused core. Trying to reconnect and use VECTRESET.
      Info: Found SWD-DP with ID 0x2BA01477
      Info: Found Cortex-M4 r0p1, Little endian.
      J-Link>i
      JTAG Id: 0x2BA01477 Version: 0x2 Part no: 0xba01 Man. Id: 023B


    Is it a restriction of the "Lite" version?

    Thank you very much in advance for your reply.

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

  • Hi,

    It has nothing to do with Lite / non-Lite version of J-Link.
    The problem is, that you did not specify the device, J-Link is connected to.
    For the XMC series, special handling is required (e.g. on reset), so the DLL needs to know what device J-Link is connected to / shall connect to.

    Try to start J-Link Commander like this:
    ./JLinkExe -device XMC4500-1024 -if SWD -speed 4000

    This way, the "r" command should also work correctly.

    Additionally, I experienced JTAG problems. Sometimes JTAG seems to work (see below), sometimes not (see above). The behaviour described above stays the same.

    Does not really make sense.
    In both cases ("below" and "above") you were using SWD as debug interface, so JTAG is not used...


    Best regards
    Alex
    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.
  • Hi,

    According to the change of the topic, it seems this solves the problem.
    Can you please confirm?


    Best regards
    Alex
    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.