cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link and J-Link not work well with STM32F745VEH6

Kenji1
Senior

Hi team I have a problem on debugging STM32F745VEH6 with SEGGER J-link and ST-Link V3. And phenomenon is different on both debugger.

My enviroment:

STMCubeIDE Ver.1.8.0

Debbuger: ST-Link V3/V2 and SEGGER J-Link Ultra +

MCU: STM32F745VEH6

With ST-Link V2:

Works fine.​

With ST-Link V3:

After download program, go to HardFaul_Handler function and crash.

There is a data mismatch address error when download the code.

0693W00000JQ1KUQA1.pngWith J-Link:

Program can download. But live expression and expression not work.

Variable does not update when write it.

When the debugger is detached, the value is updated.

0693W00000JQ1NsQAL.png With ST-Link and STM32CubrProgrammer:

Both version of ST-Link outputs DEV_TARGET_RESET_ERR error.

0693W00000JQ8OJQA1.png With J-Link and J-Flash app:

Connection is fine.

0693W00000JQ8QPQA1.pngWhat could be the cause? And how can I solve it?

1 REPLY 1
Ryan Coleman
Associate II

Hello, I'm having a very similar problem with STM32G070 and CubeIDE V1.8.0.

Using ST Link V2 I can download the program and it shows as verified correctly, however, I cannot use Live Expressions. All of the values show up as 0.

This is somewhat intermittent. I can debug on a board that had a crucial circuit (unrelated to the MCU) ruined during hardware debugging. I've now tried it on two new and identical boards and they will not cooperate with Live Expressions.

STMicroelectronics ST-LINK GDB server. Version 6.0.0
Copyright (c) 2021, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.9.0-RC01                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 2B3A080011144D43574D4E00
ST-LINK FW  : V2J37S7
Board       : --
Voltage     : 3.21V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x460
Revision ID : Rev B
Device name : STM32G07x/STM32G08x
Flash size  : 128 KBytes
Device type : MCU
Device CPU  : Cortex-M0+
BL Version  : --
Debug in Low Power mode enabled
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a27852.srec
  File          : ST-LINK_GDB_server_a27852.srec
  Size          : 27352 Bytes
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 13]
Download in Progress:
 
 
File download complete
Time elapsed during download operation: 00:00:00.810
 
 
 
Verifying ...
 
 
 
 
Download verified successfully 
 
 
C:\ST\STM32CubeIDE_1.6.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_2.0.0.202105311346	oolsinrm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
GNU gdb (GNU Tools for STM32 9-2020-q2-update.20201001-1621) 8.3.1.20191211-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
 
For help, type "help".
Type "apropos word" to search for commands related to "word".
 
 
 
Warning: the current language does not match this frame.
 
set *(unsigned int *)0x40015804|=0x6
Note: automatically using hardware breakpoints for read-only addresses.
 
 
Temporary breakpoint 1, main () at ../Core/Src/main.c:442
442	  HAL_Init();