Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


No longer able to program my NUCLEO-H743ZI

For months, I’ve been using SW4STM32 on my Macbook Pro to program and to run code on my NUCLEO-H743ZI. Life was good until about three days ago when all of a sudden I could no longer send code to the NUCLEO.
I get the dreaded “Open OCD child process termination. Reason: Unplugged target or STLink already in use or STLink USB driver not installed” error.

I see several people on the forum having the same issue. Some suggest stlink v2, which I gather the NUCLEO can handle ... and has been handling till now, right? I don’t need to configure that somewhere do I?
I see others suggesting it’s the USB cable gone bad. I have tried three other cables as well. Same problem.

I have used both
Open OCD: 1.19.0.201807130628
along with
OpenSTM32 IDE 2.5.0.201807130628
and:
Open OCD: 1.20.0.201809060829
along with
OpenSTM32 IDE 2.6.0.201809060829

I have tried “Connect under reset” and “Hardware reset” and “Software system reset” as reset modes in Generator options.

Any help would be appreciated as my development is at a standstill. Thanks.

I’m not on a Mac (on Linux); I’ve seen that a few times.

Mostly it’s because you have an OpenOCD zombie process hanging around (kill process, or reboot machine)

Sometimes it’s because your OS has lost the plot in regard to USB devices (ie: unplug ST-Link, re-plug)

The other day, it was driving me nuts and I realised that my USB hub had crashed (!); unplugged the hub and re-plugged and everything was good again.


Thanks, hh. I guess I didn’t mention the many ... many times I have unplugged and replugged the USB cable, the many times I’ve restarted SW4STM32, the many times I’ve rebooted the Mac.

I’ve looked over ps output (and used Mac’s Activity Monitor) to see what process might be zombied that I might kill .... I’ve looked for obvious ones, but really I don’t know what an OpenOCD process might actually be called in the ps output. Any hints there would be helpful. Then again, you’d think reboots would kill zombies.

In any case, no luck yet.


Well, it’s good to get the obvious stuff out of the way first.
Yes, a reboot would solve the zombie process thing.

I take it you have checked the device is actually available on USB? On Linux I would use the ‘lsusb’ command, I think on MacOS you’d have to use the System Profiler tool.
If you can’t see it you are back to cables and connectors (or a dead ST-Link)

If that works, next step is try a tool that doesn’t use OpenOCD - eg: the STMCubeProgrammer tool which will try and discover the device and, very usefully, upgrade the software in the ST-Link interface itself (there’s a little STM32 that does the USB to ST-Link task separate to the STM32H743ZI on your Nucleo board.


hh,
Thanks once again.
I got the STM32CubeProgrammer ...

I can tell you that
- I know the USB port itself works because I can plug in my Arduino (with a non micro USB cable) and it shows up under the Mac’s System Profiler. The NUCLEO does not with its micro USB cable.
- Using any of four different USB to Micro USB cables, the NUCLEO board does not show up. (Hard to imagine all four cables are bad)
- Using the STM32CubeProgrammer, no ST-LINK configuration even shows up … I take that to mean that either the cable is bad or somehow the NUCLEO’s own ST-LINK is somehow dead as you mentioned.

However, I don’t really know what it means for the ST-LINK on the NUCLEO to be “dead” ... or how to revive it, if indeed it is, if STM32CubeProgrammer doesn’t even recognize it.


I guess it’s not impossible for your four cables to be bad, but it is unlikely; if they work with some other peripheral then it’s pretty much looking like your NUCLEO...

Looking at the data sheet for your board, it doesn’t appear there are jumpers that could be causing this.

I would guess that the two most likely things are either you cracked the tracks on the USB connector on the NUCLEO (just physical wear and tear) _or_ you zapped it somehow (ESD)
The software wouldn’t just die, and anyway as I mentioned the micro that does the ST-Link isn’t the STM32H743 that you are programming.

Can’t do much about ESD damage but the cracked tracks would be discoverable and repairable if you have a multimeter and a fine soldering iron... but personally I’d triple check maybe with a fifth cable and another computer (eg: linux box with lsusb) that you’re sure it’s not something simple before going at it with the tools...

Following up. I finally decided to buy a new NUCLEO board (heck, they’re remarkably inexpensive for what they are).
Yup. Code loading, running. Seems that all is well.
Now if I only knew what exactly I did to fry the old one so I could avoid that mistake again...

In any case, hh, many thanks for your time on tracking all this down.

you are welcome.

don’t forget: now you have another st-link (the one embedded in the new board) and conceivably you can program the old board using that.