[ABANDONED] JLink gdbserver Linux with STM32F072r8

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

  • [ABANDONED] JLink gdbserver Linux with STM32F072r8

    Hello.
    I've run into an issue when using the JLinkDGDB server with the STM32F072R8. Have previously used the same setup with the STM32F103R8 and the STM32F407VGT.
    Got it to start properly exactly once but then reflashing the device caused it to crash again.


    /JLinkGDBServerCLExe -device stm32f072r8 -if swd -speed 1000 -rtos GDBServer/RTOSPlugin_FreeRTOS
    SEGGER J-Link GDB Server V6.30f Command Line Version

    JLinkARM.dll V6.30f (DLL compiled Mar 2 2018 17:30:48)

    Command line: -device stm32f072r8 -if swd -speed 1000 -rtos GDBServer/RTOSPlugin_FreeRTOS
    -----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: stm32f072r8
    Target interface: SWD
    Target interface speed: 1000kHz
    Target endian: little

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link V10 compiled Mar 2 2018 17:07:17
    Hardware: V10.10
    S/N: 50111322
    Feature(s): GDB
    Checking target voltage...
    Target voltage: 2.99 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 2 bytes @ address 0x080085B8 (Data = 0x4B02)
    Read 2 bytes @ address 0x08002298 (Data = 0x4770)
    Read 4 bytes @ address 0x080032FC (Data = 0xF003B510)
    Loading RTOS plugin: /opt/JLink_Linux_V630f_x86_64/GDBServer/RTOSPlugin_FreeRTOS...
    Loading RTOS plugin: /opt/JLink_Linux_V630f_x86_64/GDBServer/RTOSPlugin_FreeRTOS.so...
    RTOS plugin (v1.0) loaded successfully
    RTOS plugin initialized successfully.
    Received symbol: pxCurrentTCB (0x20001290)
    Received symbol: pxReadyTasksLists (0x2000129C)
    Received symbol: xDelayedTaskList1 (0x20001340)
    Received symbol: xDelayedTaskList2 (0x20001354)
    Received symbol: pxDelayedTaskList (0x20001294)
    Received symbol: pxOverflowDelayedTaskList (0x20001298)
    Received symbol: xPendingReadyList (0x20001374)
    Received symbol: xTasksWaitingTermination (0x200013A0)
    Received symbol: xSuspendedTaskList (0x2000138C)
    Received symbol: uxCurrentNumberOfTasks (0x20001328)
    Received symbol: uxTopUsedPriority (0x00000000)
    Received symbol: uxTopReadyPriority (0x2000133C)
    Received symbol: vPortEnableVFP (0x00000000)
    All mandatory symbols successfully loaded.
    Received monitor command: flash device = STM32f073R8
    Selecting device: STM32f073R8
    Received monitor command: flash download = 1
    Flash download enabled
    Downloading 192 bytes @ address 0x08000000
    Downloading 16048 bytes @ address 0x080000C0
    Downloading 15952 bytes @ address 0x08003F70
    Downloading 4268 bytes @ address 0x08007DC0
    Downloading 2708 bytes @ address 0x08008E6C
    Downloading 532 bytes @ address 0x08009900
    Downloading 720 bytes @ address 0x08009B14
    Downloading 20 bytes @ address 0x08009DE4
    Downloading 4 bytes @ address 0x08009DF8
    Downloading 120 bytes @ address 0x08009DFC
    Writing register (PC = 0x08007E34)
    Read 2 bytes @ address 0x080085B8 (Data = 0x4B02)
    Read 2 bytes @ address 0x08002298 (Data = 0x4770)
    Read 4 bytes @ address 0x08007E34 (Data = 0x4685480D)
    Read 2 bytes @ address 0x08007E34 (Data = 0x480D)
    Read 2 bytes @ address 0x080032FC (Data = 0xB510)
    Received monitor command: reset
    Resetting target
    Setting breakpoint @ address 0x080032FC, Size = 2, BPHandle = 0x0001
    Starting target CPU...
    ...Breakpoint reached @ address 0x080032FC
    Segmentation fault (core dumped)
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Are you using custom hardware or an eval board?
    Does the behaviour change when using the GUI version of GDBServer?
    What Linux OS are you using exactly?
    Which GDBClient were you using?
    Could you provide us with a reproduction scenario and example project for a STM32072 eval board?
    We have the following available:
    - STM32F072B-DISCO
    - NUCLEO-F072RB

    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.
  • Hello,
    I've tried version 6.22g and 6.30f and im using plain gdb that is part of the ARM toolchain gcc-arm-none-eabi-7-2017-q4-major.

    developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads


    So the target is in fact the STM32F072B Discovery board.

    The distro I'm using is not one of the officially supported ones, I'm on Arch Linux.

    So the scenario is that i have a program I've been developing and running on the Keil MCBSTM32 board which has a STM32F103 MCU and also gotten to run on the STM32F4 Discovery board. Both these boards work fine with any of the two versions of JLink but the STM32F072B-Disco board segfaults. But when running JLink GDB server under windows 10 and connecting to it remotely the STM32F072 also works fine. Under windows I use version 6.30g.

    With that said, the GUI version of JLinkGDBServer under Linux seems to work, I just tried it out. There seems to be some difference in how the CLI version handles something.


    //Henrik
  • Hello Henrik,


    The distro I'm using is not one of the officially supported ones, I'm on Arch Linux.

    Could you test if this issue also persists on Ubuntu?
    Please understand that we can only give full support to some handpicked Linux distributions. Supporting all of them is unfortunately next to impossible.

    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.