Error: No J-Link device found.

已回答

I am trying to setup an STM32 project and followed the instructions here https://www.jetbrains.com/help/clion/openocd-support.html 

  • GNU Tools Arm Embedded/9 2019-q4-major
  • OpenOCD-20200503-0.10.0
  • ST-Link/V2 driver (i am using Windows)

however compilation was successful, when i run OCD, i got

Error: No J-Link device found.

what did I miss?

0

Hello!

It seems in your OpenOCD Download & Run configuration you selected the J-Link board config file while you have the ST-Link board. Please select the appropriate board config file.

0
Avatar
Permanently deleted user

Hi Anna

Thank for replying, I installed ST-Link just because the web instructions said it is necessary. I am, in fact, using a USB type SWD debug adapter to connect to my target, called CMSIS-DAP. this one worked perfectly in Keil environment.

It's appreciated if you can give me any suggestion on what board config should i use? there are tens of board types, i have no idea what to use. Maybe i shouldn't use openOCD?

 

0

What target do you use?

0
Avatar
Permanently deleted user

I use STM32F103ZET6

0

In case of cmsis-dap and stm32 you need to write the config file on your own (you can use configs for some Atmel Xplained board and the ST chip as a basis).

Note that when setting up the board config file, you can click Assist and then click "Copy to Project & Use" in order to adjust the board config file to your needs: the selected file will be copied into your project tree, and you'll be able to open it in the editor and modify as required.

0
Avatar
Permanently deleted user

OK, it is good to know CLion can handle this setup :)

I will try your advice and learn about the way how to write openOCD.

thank you again Anna.

 

0

To be honest, we haven't tested this setup, but it might work.

0
Avatar
Permanently deleted user
I tried following config file:
source [find interface/cmsis-dap.cfg]
transport select swd
set CHIPNAME stm32f103zet6
source [find target/stm32f1x.cfg]

get the result as follows:
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: FW Version = 1.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x1ba01477
Info : stm32f103zet6.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f103zet6.cpu: external reset detected
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000e30 msp: 0x20010000
** Programming Started **
Info : device id = 0x10036414
Info : flash size = 512kbytes
** Programming Finished **
Error: DP initialisation failed
Polling target stm32f103zet6.cpu failed, trying to reexamine
Error: Could not find MEM-AP to control the core
Examination failed, GDB will be halted. Polling again in 100ms
shutdown command invoked

do you have any idea about this DP initialization failure?
0

It looks like your flasher is able to connect to the chip successfully, and fails when actual flashing is done.
You may try to play with reset settings.
Here is the documentation
http://openocd.org/doc/html/Reset-Configuration.html

0

请先登录再写评论。