Hi all!
I are developing software for an ST STM32H7* based MCU.
Unfortunately flashing the target using a J-Link Ultra+ debugger probe fails to flash the target.
I don't think it's relevant but I am using the CLion IDE and have added the GDB server from STM32CubeIDE:
GDB Server: C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.jlink.win32_2.1.0.202204211145\tools\bin\JLinkGDBServerCL.exe
GSB Server args: -device "STM32H7[...]" -if swd -speed 24000 -port 45102 -nogui -singlerun
Here's the command line output (marked as source code for bette readability):
Display All
(I've manually removed the specific STM32H7 model and my J-Link debugger probe's S/N.)
The relevant part:
I want to use the J-Link for both debug-stepping and tracing (using RTT and Percepio Tracealyzer).
My current workaround:
Unfortunately, I've no idea what could go wrong - I don't really think that the MCU's internal RAM is broken. I'd like to believe that flashing using the J-Link Ultra+ and the same GDB server has worked previously -- but I am not too sure at the moment.
Please let me know if I can/should provide any further details.
Cheers,
mwb
I are developing software for an ST STM32H7* based MCU.
Unfortunately flashing the target using a J-Link Ultra+ debugger probe fails to flash the target.
I don't think it's relevant but I am using the CLion IDE and have added the GDB server from STM32CubeIDE:
GDB Server: C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.jlink.win32_2.1.0.202204211145\tools\bin\JLinkGDBServerCL.exe
GSB Server args: -device "STM32H7[...]" -if swd -speed 24000 -port 45102 -nogui -singlerun
Here's the command line output (marked as source code for bette readability):
Source Code
- C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.jlink.win32_2.1.0.202204211145\tools\bin\JLinkGDBServerCL.exe -device STM32H7[...] -if swd -speed 24000 -port 45102 -nogui -singlerun
- SEGGER J-Link GDB Server V7.66 Command Line Version
- JLinkARM.dll V7.66 (DLL compiled May 18 2022 15:52:58)
- Command line: -device STM32H7[...] -if swd -speed 24000 -port 45102 -nogui -singl
- erun
- -----GDB Server start settings-----
- GDBInit file: none
- GDB Server Listening port: 45102
- 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: 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: STM32H7[...]
- Target interface: SWD
- Target interface speed: 24000kHz
- Target endian: little
- Connecting to J-Link...
- J-Link is connected.
- Firmware: J-Link Ultra V5-1 compiled May 2 2022 09:00:17
- Hardware: V5.10
- S/N: [...]
- Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
- Checking target voltage...
- Target voltage: 3.36 V
- Listening on TCP/IP port 45102
- Connecting to target...
- Connected to target
- Waiting for GDB connection...Connected to 127.0.0.1
- Reading all registers
- Reading 64 bytes @ address 0x080352C0
- Read 4 bytes @ address 0x08035574 (Data = 0xE000ED00)
- Read 2 bytes @ address 0x08035448 (Data = 0xF7DB)
- Read 2 bytes @ address 0x080362A4 (Data = 0xB508)
- Read 2 bytes @ address 0x08057DE4 (Data = 0x4770)
- Read 4 bytes @ address 0x0802B814 (Data = 0xD1E12B00)
- Downloading 664 bytes @ address 0x08000000
- Downloading 16000 bytes @ address 0x080002A0
- Downloading 16048 bytes @ address 0x08004120
- Downloading 16048 bytes @ address 0x08007FD0
- Downloading 15792 bytes @ address 0x0800BE80
- Downloading 16080 bytes @ address 0x0800FC30
- Downloading 16064 bytes @ address 0x08013B00
- Downloading 15920 bytes @ address 0x080179C0
- Downloading 16112 bytes @ address 0x0801B7F0
- Downloading 16032 bytes @ address 0x0801F6E0
- Downloading 15936 bytes @ address 0x08023580
- Downloading 15888 bytes @ address 0x080273C0
- Downloading 15856 bytes @ address 0x0802B1D0
- Downloading 15888 bytes @ address 0x0802EFC0
- Downloading 15952 bytes @ address 0x08032DD0
- Downloading 16000 bytes @ address 0x08036C20
- Downloading 16128 bytes @ address 0x0803AAA0
- Downloading 16160 bytes @ address 0x0803E9A0
- Downloading 16032 bytes @ address 0x080428C0
- Downloading 16096 bytes @ address 0x08046760
- Downloading 16112 bytes @ address 0x0804A640
- Downloading 16048 bytes @ address 0x0804E530
- Downloading 15920 bytes @ address 0x080523E0
- Downloading 10288 bytes @ address 0x08056210
- Downloading 16352 bytes @ address 0x08058A40
- Downloading 16272 bytes @ address 0x0805CA20
- Downloading 8196 bytes @ address 0x080609B0
- Downloading 3932 bytes @ address 0x080629B4
- Downloading 3344 bytes @ address 0x08063910
- Downloading 36 bytes @ address 0x08064620
- Downloading 4 bytes @ address 0x08064644
- Downloading 1296 bytes @ address 0x08064648
- ERROR: Failed to prepare for programming.
- RAM check failed @ addr 0x24000F78.
- RAM check failed while testing 0x1FF0 bytes @ addr 0x240007C4.
- Writing register (PC = 0x 8033da8)
- Reading 64 bytes @ address 0x080352C0
- Read 4 bytes @ address 0x08035574 (Data = 0xE000ED00)
- Read 2 bytes @ address 0x08035448 (Data = 0xF7DB)
- Read 2 bytes @ address 0x080362A4 (Data = 0xB508)
- Read 2 bytes @ address 0x08057DE4 (Data = 0x4770)
- Received monitor command: reset
- Resetting target
- Resetting target
- Debugger connected to tcp::45102
- Setting breakpoint @ address 0x08035448, Size = 2, BPHandle = 0x0001
- Starting target CPU...
- ...Breakpoint reached @ address 0x08035448
- Reading all registers
- Removing breakpoint @ address 0x08035448, Size = 2
- Read 4 bytes @ address 0x08035448 (Data = 0xFE08F7DB)
- Reading 64 bytes @ address 0x2405FBC0
- Read 4 bytes @ address 0x08033DDE (Data = 0xFC004770)
- Reading 64 bytes @ address 0x08033D80
- Read 4 bytes @ address 0x08033DE0 (Data = 0x2405FC00)
The relevant part:
GDB the continues to start the debug session. So it kind of fails silently without having flashed my new code.J-Link GDB wrote:
ERROR: Failed to prepare for programming.
RAM check failed @ addr 0x24000F78.
RAM check failed while testing 0x1FF0 bytes @ addr 0x240007C4.
I want to use the J-Link for both debug-stepping and tracing (using RTT and Percepio Tracealyzer).
My current workaround:
- flash using an ST-Link debugger probe
- debug & trace using the J-Link debugger probe.
Unfortunately, I've no idea what could go wrong - I don't really think that the MCU's internal RAM is broken. I'd like to believe that flashing using the J-Link Ultra+ and the same GDB server has worked previously -- but I am not too sure at the moment.
Please let me know if I can/should provide any further details.
Cheers,
mwb