[SOLVED] Possible issue in J-Link Commander since 7.88l

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

  • [SOLVED] Possible issue in J-Link Commander since 7.88l

    Hi!

    Since v7.88l JLINK.EXE refuses to run my scripts properly (with jlink plus connected):
    Skript1 - last command "connect" not executed:

    device R7FA2E1A9
    si SWD
    speed 4000
    connect

    Source Code

    1. "C:\Program Files\SEGGER\JLink\jlink.exe" -device R7FA2E1A9 -CommanderScript RA2E1_connect_flash_test.jlink
    2. SEGGER J-Link Commander V7.92d (Compiled Sep 8 2023 09:56:39)
    3. DLL version V7.92d, compiled Sep 8 2023 09:55:04
    4. J-Link Command File read successfully.
    5. Processing script file...
    6. connect000ice R7FA2E1A9
    7. J-Link connection not established yet but required for command.
    8. Connecting to J-Link via USB...O.K.
    9. Firmware: J-Link V10 compiled Jan 30 2023 11:28:07
    10. Hardware version: V10.10
    11. J-Link uptime (since boot): N/A (Not supported by this model)
    12. S/N: 600111968
    13. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    14. VTref=3.248V
    15. Script processing completed.
    16. Type "connect" to establish a target connection, '?' for help
    Display All

    After further investigation I suppose that only the first line is executed properly, if device, speed and interface is given already as command line parameter before that.

    Skript2:

    erase 0x40100000, 0x40100FFF, reset
    erase 0x40100000, 0x401000FF, reset
    loadfile testfile.hex

    results in:

    Source Code

    1. "C:\Program Files\SEGGER\JLink\jlink.exe" -device R7FA2E1A9 -if SWD -speed auto -CommanderScript RA2E1_connect_flash_test.jlink
    2. SEGGER J-Link Commander V7.92d (Compiled Sep 8 2023 09:56:39)
    3. DLL version V7.92d, compiled Sep 8 2023 09:55:04
    4. J-Link Command File read successfully.
    5. Processing script file...
    6. loadfile testfile.hex01000FF, reset, reset
    7. J-Link connection not established yet but required for command.
    8. Connecting to J-Link via USB...O.K.
    9. Firmware: J-Link V10 compiled Jan 30 2023 11:28:07
    10. Hardware version: V10.10
    11. J-Link uptime (since boot): N/A (Not supported by this model)
    12. S/N: 600111969
    13. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    14. VTref=3.241V
    15. Target connection not established yet but required for command.
    16. Device "R7FA2E1A9" selected.
    17. Connecting to target via SWD
    18. InitTarget() start
    19. Identifying target device...
    20. SWD selected. Executing JTAG -> SWD switching sequence...
    21. Initializing DAP...
    22. DAP initialized successfully.
    23. InitTarget() end - Took 20.8ms
    24. Found SW-DP with ID 0x5BA02477
    25. DPIDR: 0x5BA02477
    26. CoreSight SoC-400 or earlier
    27. Scanning AP map to find all available APs
    28. AP[2]: Stopped AP scan as end of AP map has been reached
    29. AP[0]: AHB-AP (IDR: 0x74770001)
    30. AP[1]: APB-AP (IDR: 0x44770002)
    31. Iterating through AP map to find AHB-AP to use
    32. AP[0]: Core found
    33. AP[0]: AHB-AP ROM base: 0x4001A000
    34. CPUID register: 0x411CD200. Implementer code: 0x41 (ARM)
    35. Feature set: Baseline
    36. Cache: No cache
    37. Found Cortex-M23 r1p0, Little endian.
    38. Cortex-M (ARMv8-M and later): The connected J-Link (S/N 600111969) uses an old firmware module that does not handle I/D-cache corr
    39. ectly. Proper debugging functionality cannot be guaranteed if cache is enabled
    40. FPUnit: 4 code (BP) slots and 0 literal slots
    41. Security extension: not implemented
    42. CoreSight components:
    43. ROMTbl[0] @ 4001A000
    44. [0][0]: E000E000 CID B105900D PID 000BBD20 DEVARCH 47702A04 DEVTYPE 00 Cortex-M23
    45. [0][1]: E0001000 CID B105900D PID 000BBD20 DEVARCH 47701A02 DEVTYPE 00 DWT
    46. [0][2]: E0002000 CID B105900D PID 000BBD20 DEVARCH 47701A03 DEVTYPE 00 FPB
    47. [0][3]: 40019000 CID B105900D PID 000BBD20 DEVARCH 47710A31 DEVTYPE 31 MTB
    48. Memory zones:
    49. Zone: "Default" Description: Default access mode
    50. Cortex-M23 identified.
    51. 'erase': Performing implicit reset & halt of MCU.
    52. Reset: Halt core after reset via DEMCR.VC_CORERESET.
    53. Reset: Reset device via AIRCR.SYSRESETREQ.
    54. Erasing selected range...
    55. CPU is running at low speed (8000 kHz).
    56. J-Link: Flash download: Total time needed: 0.233s (Prepare: 0.151s, Compare: 0.000s, Erase: 0.052s, Program: 0.000s, Verify: 0.000
    57. s, Restore: 0.029s)
    58. J-Link: Flash download:
    59. Flash sectors within Range [0x40100000 - 0x40100FFF] deleted.
    60. Erasing done.
    61. Script processing completed.
    62. Type "connect" to establish a target connection, '?' for help
    Display All
    As you can see after "Processing script file...", there is something wrong.
    I tested all versions x86_x64 since v7.86f till v7.92d.

    Can anyone confirm that behaviour? Did I miss something in the release notes?

    Perhaps it has something to do with

    7.88l:
    Other changes:


    Commander
    If a C/C++ comment was used in a command that accepts parameters, the comment was accidentally interpreted as parameter. Fixed.




    Best regards,

    HaJo
  • Can you please attach your scripts as originals, so all line endings etc are preserved.
    Indeed the output does look strange here and there.
    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!

    Line ending here is just carriage return, no comments or anything else inside!
    With ..test2 and jlink.exe command line parameters only the first line will be executed properly.

    Since v7.88l JLINK requires CRLF in these files! So, that is the reason for this behaviour.
    I have to correct the line endings (which are generated by script).

    Best regards,

    HaJoCC
    Files
  • Thanks for providing the scripts.
    We have adapted J-Link Commander accordingly, even though having only carriage return (\r) as a newline / line ending is somewhat strange...
    However, this adaption will be part of a new version, planned for 20th September.
    Unfortunately, for today's version it is too late.
    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.