Hello,
I am using STM32 Nucleo-F446RE board to program and debug a custom STM32F3 board through J-Link and it works fine. To be able to debug the communication between 2 of my custom boards I wanted to debug them both simultaneously, so I bought a second Nucleo board, this time STM32 Nucleo-F303RE. However I can't make the new Nucleo flash and debug my microcontroller.
I used the Reflash Utility to convert the ST-Link into J-link. I tested it and it didn't work, so I updated the firmware, but no result.
I use the exactly same setup with both Nucleos: same target board, same cables, same jumper configuration. I use Eclipse IDE as a programming environment. Here are both SEGGER logs (working and not working) that I get:
SEGGER Log for Nucleo-F446RE (working):
Display All
SEGGER Log for Nucleo-F303RE (not working):
Display All
When I use the J-Link Commander I get a similar message that the CPU could not be halted.
I tried to upload the Blinky example to the on-board STM32F303RE controller and it works fine.
What could be causing this behaviour? Any help would be appreciated.
I am using STM32 Nucleo-F446RE board to program and debug a custom STM32F3 board through J-Link and it works fine. To be able to debug the communication between 2 of my custom boards I wanted to debug them both simultaneously, so I bought a second Nucleo board, this time STM32 Nucleo-F303RE. However I can't make the new Nucleo flash and debug my microcontroller.
I used the Reflash Utility to convert the ST-Link into J-link. I tested it and it didn't work, so I updated the firmware, but no result.
I use the exactly same setup with both Nucleos: same target board, same cables, same jumper configuration. I use Eclipse IDE as a programming environment. Here are both SEGGER logs (working and not working) that I get:
SEGGER Log for Nucleo-F446RE (working):
Brainfuck Source Code
- SEGGER J-Link GDB Server V6.60f Command Line Version
- JLinkARM.dll V6.60f (DLL compiled Jan 20 2020 16:15:17)
- Command line: -if swd -device STM32F303CB -endian little -speed 1000 -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: STM32F303CB
- Target interface: SWD
- Target interface speed: 1000kHz
- 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: 774801057
- 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 = 0x2000A000)
- Read 2 bytes @ address 0x00000000 (Data = 0xA000)
- 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 = 0x0000029C)
- 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= 2000A000, MSP= 2000A000, PSP= 00000000
- R14(LR) = FFFFFFFF, R15(PC) = 0000029C
- 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 0x0000029C (Data = 0xF7FFB508)
- Read 2 bytes @ address 0x0000029C (Data = 0xB508)
- Received monitor command: speed auto
- Select auto target interface speed (2000 kHz)
- Received monitor command: flash breakpoints 0
- Flash breakpoints disabled
- Received monitor command: semihosting enable
- Semi-hosting enabled (Handle on BKPT)
- Received monitor command: semihosting IOClient 3
- Semihosting I/O set to TELNET and GDB Client
- Read 4 bytes @ address 0x0000029C (Data = 0xF7FFB508)
- Downloading 928 bytes @ address 0x00000000 - Verified OK
- Downloading 40 bytes @ address 0x000003A0 - Verified OK
- Downloading 4096 bytes @ address 0x000003D0 - Verified OK
- Downloading 4096 bytes @ address 0x000013D0 - Verified OK
- Downloading 4096 bytes @ address 0x000023D0 - Verified OK
- Downloading 4096 bytes @ address 0x000033D0 - Verified OK
- Downloading 4096 bytes @ address 0x000043D0 - Verified OK
- Downloading 4096 bytes @ address 0x000053D0 - Verified OK
- Downloading 4096 bytes @ address 0x000063D0 - Verified OK
- Downloading 4096 bytes @ address 0x000073D0 - Verified OK
- Downloading 2011 bytes @ address 0x000083D0 - Verified OK
- Downloading 8 bytes @ address 0x00008BAC - Verified OK
- Downloading 1548 bytes @ address 0x00008BB4 - Verified OK
- Comparing flash [....................] Done.
- Writing register (PC = 0x 188)
- Read 4 bytes @ address 0x00000188 (Data = 0xB083B500)
- Received monitor command: clrbp
- Received monitor command: reset
- Resetting target
- Received monitor command: halt
- Halting target CPU...
- ...Target halted (PC = 0x0000029C)
- 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= 2000A000, MSP= 2000A000, PSP= 00000000
- R14(LR) = FFFFFFFF, R15(PC) = 0000029C
- 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 0x0000029C (Data = 0xF7FFB508)
- Starting target CPU...
SEGGER Log for Nucleo-F303RE (not working):
Source Code
- Could not connect to target.
- Please check power, connection and settings.SEGGER J-Link GDB Server V6.60f Command Line Version
- JLinkARM.dll V6.60f (DLL compiled Jan 20 2020 16:15:17)
- Command line: -if swd -device STM32F303CB -endian little -speed 1000 -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: STM32F303CB
- Target interface: SWD
- Target interface speed: 1000kHz
- Target endian: little
- Connecting to J-Link...
- J-Link is connected.
- Firmware: J-Link STLink V21 compiled Aug 12 2019 10:29:20
- Hardware: V1.00
- S/N: 775245505
- Checking target voltage...
- Target voltage: 3.30 V
- Listening on TCP/IP port 2331
- Connecting to target...
- WARNING: CPU could not be halted
- Halting target device failed. Trying again with reset
- WARNING: CPU could not be halted
- WARNING: CPU could not be halted
- WARNING: CPU could not be halted
- WARNING: CPU could not be halted
- WARNING: CPU could not be halted
- ERROR: Failed to halt CPU.
- WARNING: CPU could not be halted
- Failed to halt target device on connect
- ERROR: Could not connect to target.
- Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
- Shutting down...
When I use the J-Link Commander I get a similar message that the CPU could not be halted.
I tried to upload the Blinky example to the on-board STM32F303RE controller and it works fine.
What could be causing this behaviour? Any help would be appreciated.
The post was edited 2 times, last by s7iVuR ().