[SOLVED] Connecting to target...ERROR: Could not find core in Coresight setup

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

  • [SOLVED] Connecting to target...ERROR: Could not find core in Coresight setup

    Hello,

    I am having problems with connecting J-Link with NXP S32K146 under Linux. When I'm trying to connect JLinkGDBServer I get following message:


    /usr/local/JLink_Linux_V646g_x86_64/JLinkGDBServer -device s32k146 -if SWD
    SEGGER J-Link GDB Server V6.46g Command Line Version

    JLinkARM.dll V6.46g (DLL compiled Jun 14 2019 19:36:30)

    Command line: -device s32k146 -if SWD
    -----GDB Server start settings-----
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: yes
    Generate logfile: off
    Verify download: off
    Init regs on start: off
    Silent mode: off
    Single run mode: off
    Target connection timeout: 0 ms
    ------J-Link related settings------
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ------Target related settings------
    Target device: s32k146
    Target interface: SWD
    Target interface speed: 4000kHz
    Target endian: little

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link Ultra V4 compiled May 27 2019 15:49:24
    Hardware: V4.00
    S/N: 504501625
    Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    Checking target voltage...
    Target voltage: 3.30 V
    Listening on TCP/IP port 2331
    Connecting to target...ERROR: Could not find core in Coresight setup
    ERROR: Could not connect to target.
    Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
    Shutting down...
    Could not connect to target.
    Please check power, connection and settings.


    It worked some time ago (I could connect to target device) but recently when I tried to flash this MCU something wrong happened and I cannot flash this board from S32 Design Studio also.

    Any ideas what to do next to repair the system?
  • Some additional information from JLinkExe when I tried to connect to target system:


    Connecting to target via SWD
    InitTarget()
    Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash.
    Device will be unsecured now.
    Timeout while unsecuring device. Erase never stops.
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x001C0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
    AP[1]: Skipped. Not an AHB-AP
    InitTarget()
    Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash.
    Device will be unsecured now.
    Timeout while unsecuring device. Erase never stops.
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x001C0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
    AP[1]: Skipped. Not an AHB-AP

    ****** Error: Could not find core in Coresight setup
    InitTarget()
    Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash.
    Device will be unsecured now.
    Timeout while unsecuring device. Erase never stops.
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x001C0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
    AP[1]: Skipped. Not an AHB-AP
    InitTarget()
    Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash.
    Device will be unsecured now.
    Timeout while unsecuring device. Erase never stops.
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x001C0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
    AP[1]: Skipped. Not an AHB-AP
    Cannot connect to target.
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    From the J-Link Commander output it seems that your programmed image is securing the Flash. To be able to connect and debug the device J-link will try to erase the Flash content with a mass erase. This seems to fail.
    In our test setups the mass erase always worked so we have to assume that the programmed image has locked the Flash unrecoverable.
    Do you get the same behaviour with "virgin" devices that do not have your application programmed yet?

    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.