Skip to main content
Visitor II
July 26, 2020
Question

Use ST/LINK as standard SWD/JTAG Programmer

  • July 26, 2020
  • 4 replies
  • 5642 views

Hi :)

I have a few boards - for example a Nucleo - that all come with a ST-LINK attached. They work great to program any STM32 MCU, but I was wondering if it could be possible to use the ST-LINK as standard SWD/JTAG programmer for other ARM Cortex MCU's?

My particular case is a bluetooth chip from Dialog Semiconductor (DA14531) which should work with any standard JTAG Programmer. It has SWCLK and SWDIO pins.

But the ST-Link do not seem to be recognized by the software provided by Dialog Semi.

Thank you

Simon

    This topic has been closed for replies.

    4 replies

    Visitor II
    July 26, 2020

    considering troubleshooting and support...

    SLasn.1Author
    Visitor II
    July 26, 2020

    I am not sure I understand... ?

    Visitor II
    July 27, 2020

    If the product malfunction, who will support?

    Graduate II
    July 26, 2020

    "standard JTAG Programmer"

    Whatever that means. Not really a generic class.

    The CMSIS-DAP would be relatively broad/generic, you could get access to the core, but you'd need scripts or software to manage peripherals mapped into the address space of the core.

    "But the ST-Link do not seem to be recognized by the software provided by Dialog Semi."

    Yes, well they probably don't provide the right driver/dll support to make that happen. The Internal Flash memories tend to be vendor unique.

    ST's utilities checks for ST product ID's

    Have your Dialog Semi generate BIN or HEX files, use a Segger J-Link that has support for the parts you want to use.

    SLasn.1Author
    Visitor II
    July 26, 2020

    Thanks for the reply clive,my knowledge about JTAG/SWD is quite limited. The support from Dialog Semi told me that "any external JTAG interface" (their words) would work with it. So I expect it to be a standard?

    I already have BIN/HEX files and a development environment to compile code, so that is not a problem. The issue is to upload to the board.

    But then if you say a "Segger J-Link" would work, is there not a way to reprogram an STM32 or an ST-Link to "be" a Segger J-Link?

    SLasn.1Author
    Visitor II
    July 26, 2020

    For example using this and compiling it for an STM32?

    https://github.com/ataradov/free-dap

    Graduate II
    July 27, 2020

    Stlinkv3 explicit rejects non-ST MCUs. To talk via SWD and and STlinkV2 to a non-ST MCU, use e.g. pyOcd, OpenOcd or Bl*ckm*g*c PC-hosted.Broadest MCU support is prpbably with OpenOCD, at the expense for the need for the usage of several configuration files.

    SLasn.1Author
    Visitor II
    July 27, 2020

    Thank you for the reply. I do not know OpenOCD, but I have a feeling this is just a debugger tool and will not replace the hardware, correct? At least the info I found of people using it with STM32 still use the ST-Link.

    SLasn.1Author
    Visitor II
    July 27, 2020

    Oh my bad I just understand you said using SWD and STLinkV2 - I'll give it a go then!

    SLasn.1Author
    Visitor II
    July 27, 2020

    Ok there is progress! Using Keil uVision I can set up a session with some code made for the Dialog chip, and then in "Options for Target", in the "Debug" tab, I can choose my ST-Link, and this seems to work! I had to use the "Connect: under Reset" option in the ST-Link Setup window, and leave the Reset pin of the Dialog chip floating.

    With that setup I can execute some code on the ARM Cortex MCU in the chip in debug mode :)