STM32F0, ST-link v2, OpenOCD 0.9.0: open failed

后端 未结 5 1648
心在旅途
心在旅途 2021-02-19 08:16

I\'m using Launchpad\'s gcc-arm-none-eabi 4.9-2015q2 to compile for an STM32F0, and now I\'d like to debug using arm-none-eabi-gdb from that collection. My ST-Link v2 is part of

相关标签:
5条回答
  • 2021-02-19 08:41

    In my case I also got Error: open failed but all the configuration was OK. Then I did dmesg | grep usb to see why it cannot connect via USB (on Ubuntu). The dmesg told me that there are power issues and perhaps the cable is faulty. As I had used the same cable earlier the same day and some LEDs still flashed on the board, I first ignored the message. But then I finally decided to try, bought another cable and lo and behold! It was a faulty cable - with the new one everything works. So, not always a software problem after all.

    Though if you do lsusb (or use device manager in Windows) and the board is nicely listed, it will probably not be a cable issue. If it is missing, it might be.

    0 讨论(0)
  • 2021-02-19 08:42

    I found a fix. The VID/PID pair in stlink-v2.cfg was wrong. They had this:

    hla_vid_pid 0x0483 0x3748

    but it should be this:

    hla_vid_pid 0x0483 0x374B

    letter "B", not the digit "8".

    0 讨论(0)
  • 2021-02-19 08:50

    1.in eclipse ide-->project-->inc --> {project_name} debug.cfg ->source [find interface/stlink.cfg]

    check your interface debugger whether stlink.cfg or stlink-v2.cfg or stlink-v2-1.cfg and change [find interface/stlink.cfg]

    {or}TRY

    2.C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_2.5.0.201904120827\resources\openocd\st_scripts\interface\stlink.cfg(or stlink-v2.cfg or stlink-v2-1.cfg)

    add hla_vid_pid 0

    0 讨论(0)
  • 2021-02-19 09:01

    Nucleo F411RE embedded a stlink v2-1 not stlink v2

    so change the script file like this:

    source [find interface/stlink-v2-1.cfg]
    
    transport select hla_swd
    
    source [find target/stm32f4x.cfg]
    
    reset_config srst_only
    
    0 讨论(0)
  • 2021-02-19 09:04

    The file stlink-v2.cfg might be ok. You probably should use stlink-v2-1.cfg file (inside that file is hla_vid_pid 0x0483 0x3748).

    0 讨论(0)
提交回复
热议问题