Fast Semihosting Freezing on One Machine

Sysprogs forums Forums VisualGDB Fast Semihosting Freezing on One Machine

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22710
    Seidleroni
    Participant

    I have been working with VisualGDB without issue one my desktop, but when I run the same project with the same debugger (J-Trace) on my laptop, anytime I run a printf statement via Fast Semihosting, the micro freezes execution on the line below. I created a very basic project and the same thing occurs. Not sure what the issue could be, but I attached the project and below is the JLinkGDBServerCL output at the time of freezing. I have tried running multiple versions of the Fast Semihosting framework, including the latest (2.18) with the same result. I am running VisualGDB 5.4 Preview 9.

    Not sure why it runs without issue on my desktop but always hangs on my laptop.

     

    Freezes here:

    (asm volatile(“mov r0, %1; mov r1, %0; bkpt %a2″::”r” (&s_FastSemihostingState), “r” (reason), “i” (AngelSWI) : “r0”, “r1”, “r2”, “r3”, “ip”, “lr”, “memory”, “cc”);

    JLinkGDBServerCL Output (at time of freeze):

    C:\Program Files (x86)\SEGGER\JLink_V640\JLinkGDBServerCL.exe -select USB -device STM32F777II -speed auto -if SWD -port 65227
    SEGGER J-Link GDB Server V6.40 Command Line Version

    JLinkARM.dll V6.40 (DLL compiled Oct 26 2018 15:06:02)

    Command line: -select USB -device STM32F777II -speed auto -if SWD -port 65227
    —–GDB Server start settings—–
    GDBInit file: none
    GDB Server Listening port: 65227
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: localhost only
    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: STM32F777II
    Target interface: SWD
    Target interface speed: auto
    Target endian: little

    Connecting to J-Link…
    J-Link is connected.
    Firmware: J-Trace PRO V2 Cortex-M compiled Oct 25 2018 11:49:51
    Hardware: V2.00
    S/N: 752000616
    Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    Checking target voltage…
    Target voltage: 3.28 V
    Listening on TCP/IP port 65227
    Connecting to target…Connected to target
    Waiting for GDB connection…Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x08001C52 (Data = 0x4A034413)
    Reading 64 bytes @ address 0x2007FF00
    Read 4 bytes @ address 0x08001D4A (Data = 0x6ABB4602)
    Received monitor command: reset
    Resetting target
    Downloading 504 bytes @ address 0x08000000
    Downloading 11580 bytes @ address 0x080001F8
    Downloading 4 bytes @ address 0x08002F34
    Downloading 4 bytes @ address 0x08002F38
    Downloading 180 bytes @ address 0x08002F3C
    Writing register (PC = 0x 8001200)
    Read 4 bytes @ address 0x2007FFFC (Data = 0x08001231)
    Read 4 bytes @ address 0x08001200 (Data = 0x4C0D4D0C)
    Downloading 4 bytes @ address 0x2007FFFC
    Reading all registers
    Read 4 bytes @ address 0x08001200 (Data = 0x4C0D4D0C)
    Read 4 bytes @ address 0x2007FFFC (Data = 0x113B0052)
    Reading 64 bytes @ address 0x08001000
    Read 2 bytes @ address 0x08001032 (Data = 0xF000)
    Setting breakpoint @ address 0x08001032, Size = 2, BPHandle = 0x0001
    Starting target CPU…
    …Breakpoint reached @ address 0x08001032
    Reading all registers
    Removing breakpoint @ address 0x08001032, Size = 2
    Read 4 bytes @ address 0x08001032 (Data = 0xF90BF000)
    Starting target CPU…
    Reading all registers
    Read 4 bytes @ address 0x08001ACA (Data = 0x4B04BEAB)
    Read 4 bytes @ address 0x08001ACA (Data = 0x4B04BEAB)
    Reading register (MSP = 0x2007FEE8)
    Reading register (PSP = 0x 0)
    Reading register (PRIMASK = 0x 0)
    Reading register (BASEPRI = 0x 0)
    Reading register (FAULTMASK = 0x 0)
    Reading register (CONTROL = 0x 0)
    Reading register (FPSCR = 0x 0)
    Reading register (s0 = 0x 0)
    Reading register (s1 = 0x 0)
    Reading register (s2 = 0x 0)
    Reading register (s3 = 0x 0)
    Reading register (s4 = 0x 0)
    Reading register (s5 = 0x 0)
    Reading register (s6 = 0x 0)
    Reading register (s7 = 0x 0)
    Reading register (s8 = 0x 0)
    Reading register (s9 = 0x 0)
    Reading register (s10 = 0x 0)
    Reading register (s11 = 0x 0)
    Reading register (s12 = 0x 0)
    Reading register (s13 = 0x 0)
    Reading register (s14 = 0x 0)
    Reading register (s15 = 0xFFFFFFFF)
    Reading register (s16 = 0x 0)
    Reading register (s17 = 0x 0)
    Reading register (s18 = 0x 0)
    Reading register (s19 = 0x 0)
    Reading register (s20 = 0x 0)
    Reading register (s21 = 0x 0)
    Reading register (s22 = 0x 0)
    Reading register (s23 = 0x 0)
    Reading register (s24 = 0x 0)
    Reading register (s25 = 0x 0)
    Reading register (s26 = 0x 0)
    Reading register (s27 = 0x 0)
    Reading register (s28 = 0x 0)
    Reading register (s29 = 0x 0)
    Reading register (s30 = 0x 0)
    Reading register (s31 = 0xFFFFFFFF)

    Attachments:
    You must be logged in to view attached files.
    #22712
    Seidleroni
    Participant

    I tried using a Nucleo board with the onboard ST Link and I am having the same problem (working on desktop, not on laptop). Is there anything that is PC specific that could allow programming to work but not Fast Semihosting? I didn’t mention it before, but I am able to run the project without a problem if I comment out my printf statements.

    #22714
    support
    Keymaster

    Hi,

    No problem, we can help you resolve this, however it looks like your support period has expired. Please renew it first, or let us know the email address associated with your new license, if you have purchased one already.

    #22717
    Seidleroni
    Participant

    I just submitted the PO so it should be renewed today or tomorrow. I fixed the issue by uninstalling/reinstalling visual studio and then VisualGDB. Just reinstalling VS didn’t fix it for some reason. I also deleted and reinstalled all the VGDB packages as well. Now it is all set.

    #22718
    support
    Keymaster

    Thanks for renewing your license and good to know it works.

    The problem might have been caused by an incompatibility between the Segger software and J-Link firmware, and reinstalling the Segger debug package (or some other component it uses) have likely fixed it.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.