[SOLVED] [NXP LPC54S018] Sometimes gdbserver cannot startup due to cannot halt CPU

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

  • [SOLVED] [NXP LPC54S018] Sometimes gdbserver cannot startup due to cannot halt CPU

    jlink-firmware on board version: J-Link LPCXpresso V2.
    J-Link version: V6.44d
    arm-none-eabi-gdb.exe version: 7-2018-q2
    host os: windows 7

    We useJ-Link GDB server and GDB to load applications to LPC54S018, sometimes gdbserver cannot startup due to cannot halt CPU.
    In this situation, open jlink commander, and it could connect to board successful, but run command "halt" it also failed to halt CPU.
    We have to replugin usb to fix this problem.

    Need to note, if we use IAR + J-Link, it works very stable. However use J-Link in standalone will occure issue and it is very often.

    Attachments is an image is built by IAR-8.32, when load twice jlink will report halt cpu failed.

    Source Code

    1. SEGGER J-Link GDB Server V6.44d Command Line Version
    2. JLinkARM.dll V6.44d (DLL compiled Mar 27 2019 17:08:23)
    3. Command line: -select usb=729342514 -if SWD -singlerun -strict -device LPC54S018 -port 4000 -speed auto
    4. -----GDB Server start settings-----
    5. GDBInit file: none
    6. GDB Server Listening port: 4000
    7. SWO raw output listening port: 2332
    8. Terminal I/O port: 2333
    9. Accept remote connection: localhost only
    10. Generate logfile: off
    11. Verify download: off
    12. Init regs on start: off
    13. Silent mode: off
    14. Single run mode: on
    15. Target connection timeout: 0 ms
    16. ------J-Link related settings------
    17. J-Link Host interface: USB
    18. J-Link script: none
    19. J-Link settings file: none
    20. ------Target related settings------
    21. Target device: LPC54S018
    22. Target interface: SWD
    23. Target interface speed: auto
    24. Target endian: little
    25. Connecting to J-Link...
    26. J-Link is connected.
    27. Firmware: J-Link LPCXpresso V2 compiled Sep 23 2016 12:14:15
    28. Hardware: V1.00
    29. S/N: 729342514
    30. Checking target voltage...
    31. Target voltage: 3.30 V
    32. Listening on TCP/IP port 4000
    33. Connecting to target...WARNING: CPU could not be halted
    34. Halting target device failed. Trying again with reset
    35. WARNING: CPU could not be halted
    36. Failed to halt target device on connect
    37. ERROR: Could not connect to target.
    38. Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
    39. Shutting down...
    40. Could not connect to target.
    Display All
    Files
    • fatfs_sdcard.zip

      (34.96 kB, downloaded 176 times, last: )
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Please be aware that this forum is not our official support channel.
    As you seem to be working for a silicon vendor we suggest using our official support channel. For more information see my signature.
    To avoid losing information over multiple communication channels this thread will be closed now.

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