Having trouble getting JTAG HLA working

Sysprogs forums Forums VisualGDB Having trouble getting JTAG HLA working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26990
    jafeucht
    Participant

    Hello,

    I have a STM32F334C8 device which I am trying to get working with VisualGDB and a ST-Link v2 (I also tried Segger Flasher Pro, and I get the same exact problem).

    First off, I need to edit the stm32f3x.cfg file, because the following line doesn’t work:

    if {[using_jtag]} {
        jtag newtap $_CHIPNAME bs -irlen 5
    }

    I found online that this needs to be changed to:

    if {[using_jtag]} {
        if {[using_hla]} {
            hla newtap $_CHIPNAME bs -irlen 5
        } else {
            jtag newtap $_CHIPNAME bs -irlen 5
        }
    }

    This needs to be changed to the following to prevent the error at line 55:

    invalid subcommand “newtap stm32f3x bs -irlen 5”

    So this appears fixed for me now, so it’s not my main issue. I tried setting up the ST-Link v2 device with the settings showin in the attached image, I get the error message:

    Almost all reported device registers have a value of 0. This typically indicates JTAG/SWD wiring problems. Please double-checked your board layout and debug connection.

    I have attached the debug file for the output. If I use the STM32CubeProgrammer with the same exact setup (wiring / ST-Link v2), I am able to successfully connect to the device.

    I’m inclined to think the problem is probably with either my debug settings configuration, or with VisualGDB. The STM32CubeProg software communicates with the device just fine. Plus, even when I am trying to communicate to the device using VisualGDB, I see clear evidence that the device is responding using a Saleae logic analyzer.

    Please advise on how I can get JTAG high-level adapters working with my device.

    • This topic was modified 4 years, 10 months ago by jafeucht.
    • This topic was modified 4 years, 10 months ago by jafeucht.
    Attachments:
    You must be logged in to view attached files.
    #26995
    jafeucht
    Participant

    I just updated OpenOCD. That appears to have fixed the issue.

    #26996
    support
    Keymaster

    Hi,

    Good to know it works. The OpenOCD scripts for STM32 devices are normally maintained by ST, so they should just work out-of-the-box as long as you are using an OpenOCD version that matches them.

    In case of any further strange errors, please consider deleting the OpenOCD directory entirely and re-installing it via VisualGDB Package Manager.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.