Skip to main content
Visitor II
November 18, 2010
Question

Debugging STM32Discovery with OpenOCD

  • November 18, 2010
  • 7 replies
  • 2276 views
Posted on November 18, 2010 at 21:40

Hello

I've sadly got to know that native ST-Link built in my STM32Discovery won't work with OpenOCD. So my question is: what hardware would you suggest to connect Discovery with to use OpenOCD? Some Jtag? First question should be: is it possible to do so?

TIA

Best Regards

Maciej

#openocd-stlink #openocd #stlink #swd
    This topic has been closed for replies.

    7 replies

    Visitor II
    January 2, 2010
    Posted on January 02, 2011 at 22:03

    Yes it's possible

    See here

    [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/ST-Link Linux Driver&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000491D59B8574F8049B5DFA3E8B21CBA51]Flat.aspx

    And here

    http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17&start=0

    /Bingo

    Graduate II
    November 18, 2010
    Posted on November 18, 2010 at 22:50

    Seems to defeat the point of having the debug hardware on the board.

    You can always disconnect the SWD (CN3 jumpers, separate ST-LINK from STM32), and then wire up either your own SWD or JTAG connection to the STM32.

    The schematic is here

    http://www.st.com/stonline/products/literature/um/17217.pdf

    Documents the connectors, and solder bridges, etc.

    Visitor II
    January 19, 2011
    Posted on January 19, 2011 at 10:44

    search for versaloon and here is a nice tutorial to use it:

    https://sites.google.com/a/stf12.net/developer-sw-fw/eclipse-demo

    Visitor II
    April 23, 2011
    Posted on April 23, 2011 at 14:35

    OpenOCD not working with STM32Discovery, but exists stlink project, which fine working with STM32Discover.

    https://github.com/texane/stlink

    The newest version doesn't work for me though, try this one:

    https://github.com/whitequark/stlink/commit/d1c3176f3a7cdbd7a0c4df832c627bc508a75296

    It works:

    For compile cut -Werror in build/Makefile,

    add to gcc options

    -Wl,--section-start=.text=0x8000000 \ #for load to flash

    or

    -Wl,--section-start=.text=0x20000000 \ #for load to SRAM

    or change you ldscript

    and read README.

     

    Visitor II
    May 8, 2012
    Posted on May 08, 2012 at 21:05

    This an old thread but still quite relevant.

    OpenOCD does now support the stlink, both stlink/v1 and stlink/v2.

    Board config's exist for all current discovery boards and standalone dongles.:

    stm32f0discovery, stm32f4discovery, stm32ldiscovery, stm32vldiscovery.

    Cheers

    Spen

    Visitor II
    May 9, 2012
    Posted on May 09, 2012 at 10:53

    OpenOCD does not support SWD at all, at least up to now. So are at least my latest information.

    Or am I wrong here ?

    Visitor II
    July 4, 2012
    Posted on July 04, 2012 at 10:32

    SWD is only supported in OpenOCD when using the stlink adapter.

    Spen