[ABANDONED] STM32L4 JLink Debug Failed to read memory

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

  • [ABANDONED] STM32L4 JLink Debug Failed to read memory

    Recently, I try to build stm32l4 mac under the development environment with eclipse + gcc_arm+JLink (MacOS 10.12)

    I convert stlink to JLink wite the soft de SEGGER with my board STM32L476 Evaluation.

    I got the console message:

    SEGGER J-Link GDB Server V6.20h Command Line Version

    JLinkARM.dll V6.20h (DLL compiled Oct 27 2017 16:21:03)

    Command line: -if swd -device STM32L476ZG -endian little -speed auto -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
    -----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: localhost only
    Generate logfile: off
    Verify download: on
    Init regs on start: on
    Silent mode: off
    Single run mode: on
    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: STM32L476ZG
    Target interface: SWD
    Target interface speed: auto
    Target endian: little

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link STLink V21 compiled Jun 26 2017 10:35:16
    Hardware: V1.00
    S/N: 778115647
    Checking target voltage...
    Target voltage: 3.30 V
    Listening on TCP/IP port 2331
    Connecting to target...Connected to target
    Waiting for GDB connection...Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x00000000 (Data = 0x20020000)
    Read 2 bytes @ address 0x00000000 (Data = 0x0000)
    Received monitor command: speed 1000
    Target interface speed set to 1000 kHz
    Received monitor command: clrbp
    Received monitor command: reset
    Resetting target
    Received monitor command: halt
    Halting target CPU...
    ...Target halted (PC = 0x0800029C)
    Received monitor command: regs
    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= 20020000, MSP= 20020000, PSP= 00000000
    R14(LR) = FFFFFFFF, R15(PC) = 0800029C
    XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
    CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
    Reading all registers
    Read 4 bytes @ address 0x0800029C (Data = 0xF7FFB508)
    Read 2 bytes @ address 0x0800029C (Data = 0xB508)
    Received monitor command: speed auto
    Select auto target interface speed (2000 kHz)
    Received monitor command: flash breakpoints 1
    Flash breakpoints enabled
    Received monitor command: semihosting enable
    Semi-hosting enabled (Handle on BKPT)
    Received monitor command: semihosting IOClient 1
    Semihosting I/O set to TELNET Client
    Received monitor command: SWO DisableTarget 0xFFFFFFFF
    Failed to disable SWO.
    Received monitor command: SWO EnableTarget 0 0 0x1 0
    Failed to enable SWO. Could not determine a suitable SWO speed!
    Read 4 bytes @ address 0x0800029C (Data = 0xF7FFB508)
    Downloading 928 bytes @ address 0x08000000 - Verified OK
    Downloading 40 bytes @ address 0x080003A0 - Verified OK
    Downloading 8027 bytes @ address 0x080003D0 - Verified OK
    Downloading 120 bytes @ address 0x0800232C - Verified OK
    Comparing flash [....................] Done.
    Verifying flash [....................] Done.
    Writing register (PC = 0x08000188)
    Read 4 bytes @ address 0x08000188 (Data = 0xB083B500)
    Received monitor command: clrbp
    Received monitor command: reset
    Resetting target
    Received monitor command: halt
    Halting target CPU...
    ...Target halted (PC = 0x0800029C)
    Received monitor command: regs
    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= 20020000, MSP= 20020000, PSP= 00000000
    R14(LR) = FFFFFFFF, R15(PC) = 0800029C
    XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
    CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
    Reading all registers
    Read 4 bytes @ address 0x0800029C (Data = 0xF7FFB508)
    Starting target CPU...
    ...Target halted (DBGRQ, PC = 0x080010BC)
    Reading all registers
    Read 4 bytes @ address 0x080010BC (Data = 0x2B04F853)
    Reading 64 bytes @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FFA4
    Reading 64 bytes @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FFA4
    Reading 64 bytes @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FFA4
    Reading 64 bytes @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FFA4
    Reading 64 bytes @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FFA8
    Reading 64 bytes @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FF80
    WARNING: Failed to read memory @ address 0x2001FFA8
    Restoring target state and closing J-Link connection...


    I am not very experienced in this build environment. I'm not sure it's the problem of the configuration debug or linked file ?

    Any help would be appreciated. :rolleyes:
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    The application seems to load properly, but the target can't be read afterwards.
    Can you try to load your debug setup with Ozone?
    Does that work for you?

    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.