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


OpenOCD not working under System Workbench

OpenOCD not working when i run it from System Workbench, but works if i run it from terminal with manually defined config. When run from SW it gives ‘Error: open failed’, but it is fine when i run it manually from console. The same executable. Actually i have OpenOCD build from source and installed system wide, and i’ve pointed SW to it in debugger settings. May be i miss something more to configure and may be it uses board config from SW? But i don’t know where to look for settings.

i’m on linux if it is not clear from post

Hello,

Which version of SW4STM32 are you using ?
On which Linux Os ? Ubuntu ? or another distrib ?

The error “open failed (no matching adapter found)” is an issue with the usb connection so if you installed SW4STM32, you should have the udev rules updated for stlink usb.

Check that your external openocd session is closed before using SW4STM32.

If you have the error “libusb_open() failed with LIBUSB_ERROR_ACCESS”, it means probably you have an other appli using the stlink already.

Can you enable debug log (add -d on openocd options) and send the openocd log text on the console.

Which STLink version are you using ?

Rgds,
Laurent


Oh, thank you for reply, but i’ve solved the issue. It appeared that default openocd shipped with SW was not good enough for me (it failed from very beginning, that’s why i compiled and installed openocd from off repo). But only pointing SW to system’s openocd binary was not enough, it appeared that it was still using configs from default SW opencd (may be it was the issue from the very beginning). I believe stlink configs there are too outdated (because current openocd has only single config for all stlink versions). So i decided to copy configs from my latest openocd to SW folder, copying binary too, so that SW now uses everything in its directory and is happy with it (i needed to delete *.so too).

may be someone should update openocd (or at least configs) that is shipped with the installer?

P.S. i’m on mint 18 and using latest SW.

Openocd in SW4STM32 also detect the stlink version (since a few versions of the ide, so before openocd did the change).

I don’t know if on Mint18, this is the same udev rules mechanism for declaring stlink usb pids as on Ubuntu for example.
It seems yes, looking on web quickly.

Or maybe you are using an old STLINK V1 ?

Rgds,
Laurent

i mean that in current openocd there is only one config file - stlink.cfg. and other (stlink-v2.cfg and stlink.v21.cfg) just redirect to it. but in SW there are separate configs. This seems like outdated version to me. And the thing is that SW’s openocd refused to work with my setup, but after i’ve tried to manually run latest opencd, i saw that it works.

Yes, the stlink configs are kept but not used really (default is stlink v2.1 i think but it is not really important, openocd scans all the stlink board version and adapts itself to the stlink found).

So, maybe you have a custom board and you don’t connect the reset line from STlink ?
If it is the case, you should change the reset option in SW4STM32 (Software system reset), it is “Connect under reset” by default.

Or as i said, you had an appli already connected to the stlink ?

Rgds,
Laurent

Now i can not test whether it works or not, because i’ve overwritten the default SW openocd. But i use my board (blue pill) now without HW reset pin (i’m using it with sw reset) and it works. I still believe that openocd was using wrong config for stlink and was unable to even connect to it, not board (imho). Whatever, now everything is setup and i’m learning the stm32 and using SW and i’m happy!

Windows 10: The toolchain.
STM32CubeMX. For all it does it freezes and cannot tell you why it cannot generate code. STM don’t’ tell you that it offers middle-ware you cannot use. If you assign middle-ware it will not generate code. The middle-ware is required for the system to work properly.
I user SW4STM32. And without middle-ware generates the predicted code.
Plug the board into the PC and it is recognized. To download (flash) the program into the IC, “Run Configurations”.
Main Tab: Application: Debug\”Project”.elf
Project: “Project” Note Browse Project to fill in Application. Who Knew
Debugger Tab: GDB Command: gdb, map to “D:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_2.2.0.201807130628\resources\openocd\scripts\st_board\stm32f4discovery.cfg” for the board

OpenOCD Command: “${openstm32_openocd_path}\openocd.exe”
Error: OpenOCD Script not found (or not support yet): & java.io.IOException.
Map direct to OpenOCD; “D:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.openocd.win32_1.18.0.201807130628\tools\openocd\bin\openocd.exe”
Error: OpenOCD Script not found (or not support yet): & java.io.IOException.
This is believed to be eliminated by upgrade to latest OpenOCD.
Install: NodeJS, Then Git (Bash). Follow with NPM to install XPM to download Xpacks.
Via GIT> $ xpm install --global @gnu-mcu-eclipse/openocd
Installs the latest OpenOCD.
Map to it:
“C:\Users\Jim\AppData\Roaming\xPacks\@gnu-mcu-eclipse\openocd\0.10.0-12.1.content\bin\openocd.exe”
Error: OpenOCD Script not found (or not support yet): & java.io.IOException.
Same 2 errors and no cure! Where to from here.
Cheers Jim