Debugging OpenMV with st-link

Hello,

I plan to do some firmware development on the OpenMV platform and I’d like to know if it’s possible to use an st-link debugger.
I can see that SWCLK, SWDIO adn nRST are available on the headers, but not SWO (PB3).

Do you know if st-link works?

Regards,

Yes, Ibrahim used it previously to find the source of a serious bug on the platform. That said, I have no idea how he did this. He can respond with details.

Yes it’s possible to debug the cam with stlink on Linux (GitHub - stlink-org/stlink: Open source STM32 MCU programming toolset). The Serial Wire Debug (SWD) uses just two lines SWCLK and SWDIO (clock/data).

Great! Do you have a wiring diagram?
Did you use the st-link embedded in one of the discovery boards?

I think you can just use the jumpers on the discovery boards to get access to the two wires. Then you just connect them to the OpenMV Cam.

I’ve used both the embedded debugger and “official” st-link (and a debugger found on ebay). You’ll need to connect the two wires data/clock, GND (don’t forget it!) and target VDD (that’s 3.3vout from the cam to the board) see the discovery pinout.

Hi,
Can you please help me to connect (ST-link v2) debugger https://www.st.com/en/development-tools/st-link-v2.html to the OpenMV M7 board please? Is there any image/video/document to explain this? Thanks in advance.

Hi,
Can you please help me to connect (ST-link v2) debugger > https://www.st.com/en/development-tools/st-link-v2.html > to the OpenMV M7 board please? Is there any image/video/document to explain this? Thanks in advance.

It’s very straightforward, you just need to connect SWC->SWC, SWD->SWD, TRST->RST, Target VCC->3.3v and GND->GND to the debugging header on the OpenMV camera. See the stlink datasheet for the pinout.

Thank you.

I have connected the stlink to my openmv camera but when I type st-info --probe continuously, the memory keeps on changing. Is this correct? I am using the latest version stlink from texane, and have updated the st-link firmware using st utility tool. I have also tried the stm32 utility in Windows to connect to the device but failed.

~ $ st-info --probe --connect-under-reset
Found 1 stlink programmers
 serial:     
 hla-serial: ""
 flash:      14152 (pagesize: 1249)
 sram:       3319595200
 chipid:     0xffffffff
 ~ $ st-info --probe --connect-under-reset
Found 1 stlink programmers
 serial:     
 hla-serial: ""
 flash:      14152 (pagesize: 65)
 sram:       778330128
 chipid:     0xffffffff
 ~ $ st-info --probe --connect-under-reset
Found 1 stlink programmers
 serial:     
 hla-serial: ""
 flash:      14152 (pagesize: 1041)
 sram:       1402283974
 chipid:     0xffffffff

This isn’t something we really provide help support for. You should know what you are doing.

I’m not sure, but I don’t think the st-util stlink sw supports the H7, at least last time I checked it didn’t, note this post is really old probably was targeted at the F7 cams…FWIW I moved on to JLinks they work great.