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 two short videos (registration required) highlighting:

System Workbench for STM32


AC6 OpenOCD not working with STM32CubeMX import

I’m using the lastest version of AC6 System workbench, my computer is installed with a linux Debian 9.4 for AMD64.

I test the openocd bundeled with AC6 outside eclipse and i’ts working fine with the configuration file that i had to modifyat the line : source find interface/stlink.cfg.
and change it to : source find interface/stlink-v2.cfg

the configuration menu of the debugger, I chose the ‘user defined’ option for the configuration script.
But inside eclipse I’ve a timeout error for the debugger backend


Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: Connexion terminée par expiration du délai d’attente. (means Timeout)
localhost:3333: Connexion terminée par expiration du délai d’attente.
’’

If i start manualy openocd and open a debug session inside eclipse it’s working well to but i don’t like this solution.
I’ve the same config of AC6 on windows and it’s working with no problems

For linux, where to search?

Also, when i start a debug session, before the timeout event comes, I have this message in the console:

Open On-Chip Debugger 0.9.0 (2018-01-21-13:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
embedded:startup.tcl:21: Error: Unknown param:
, try one of: -irlen, -irmask, -ircapture, -enable, -disable, -expected-id, or -ignore-version
in procedure ‘script’
at file “embedded:startup.tcl”, line 60
at file “Debug.cfg”, line 28
in procedure ‘swj_newdap’ called at file “/home/francois/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_2.1.4.201801121207/resources/openocd/st_scripts/target/stm32f4x.cfg”, line 72
in procedure ‘hla’ called at file “/home/francois/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_2.1.4.201801121207/resources/openocd/st_scripts/target/swj-dp.tcl”, line 28
in procedure ‘ocd_bouncer’
at file “embedded:startup.tcl”, line 21

I have the same problem with my STM32F429I-DISCO.
I will try to investigate and write if I find any hints on how to solve the problem.

I have a similar problem both on Debian linux 9.5 and on OSX High Sierra.
The error is:
19:20:56 **** Programming project 001Led_toggle on chip ****
/Applications/Ac6/SystemWorkbench.app/Contents/Eclipse/plugins/fr.ac6.mcu.externaltools.openocd.macos64_1.18.0.201807130628/tools/openocd/bin/openocd -f stm32.flash.207448820850091542.cfg -s /Volumes/dati/src/workspace/001Led_toggle -s /Applications/Ac6/SystemWorkbench.app/Contents/Eclipse/plugins/fr.ac6.mcu.debug_2.2.0.201807130628/resources/openocd/st_scripts -c “program Debug/001Led_toggle.elf verify reset exit”
Open On-Chip Debugger 0.10.0-dev-00010-g96aab7b (2018-07-13-06:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
embedded:startup.tcl:21: Error: Unknown param:
, try one of: -irlen, -irmask, -ircapture, -enable, -disable, -expected-id, or -ignore-version
in procedure ‘script’
at file “embedded:startup.tcl”, line 60
at file “stm32.flash.207448820850091542.cfg”, line 29
in procedure ‘swj_newdap’ called at file “/Applications/Ac6/SystemWorkbench.app/Contents/Eclipse/plugins/fr.ac6.mcu.debug_2.2.0.201807130628/resources/openocd/st_scripts/target/stm32f4x.cfg”, line 72
in procedure ‘hla’ called at file “/Applications/Ac6/SystemWorkbench.app/Contents/Eclipse/plugins/fr.ac6.mcu.debug_2.2.0.201807130628/resources/openocd/st_scripts/target/swj-dp.tcl”, line 28
in procedure ‘ocd_bouncer’
at file “embedded:startup.tcl”, line 21

Even when I try to flash a simple example program.

I had it too. Changing interface from JTAG to SWD solved this for me.

Hello,

Why do you use the ‘user defined’ config files ?
If you let the debugger choose the stlink.cfg file, it is better.
Openocd will just complains that it found a different usb id for the stlink (stlink V2 is different compares to a stlink v2-1) but that’s just a warning, it works then.
Openocd recognizes the STlink type and adapt itself.

Rgds,
Laurent

LaurentL, because i’ve the same error with system generated file, it’s why i try to use a user genereted file.
I work around this problem and find a solution, not pretty but it’s working.

I create an external tool that lauch the stlink openocd session.
After that the tool is lauched i start the debug session.
There, I’ve not this error and in the debug perspective there is a second openocd session that is stoped.
But the debug process run fine.

France

Hi,

Did you try killing all existing openocd sessions before starting the debugger? sometimes openocd sessions are running in the background thus disturbing the normal debug session startup. If the session refuses to disapear you may try to exit Eclipse then restart.

Bernard (Ac6)

Yes dautrevaux, I did it but the reslust is the same

Ok, i understand,

We have tested on Ubuntu, not Debian.
Could there be a difference ? path issues ?

And if you do a simple project from the ide, is it working fine ?
Is it only when importing a prj from CubeMx that you have this issue ?

Which board is it ? a custom board or an ST board ?

Rgds,
Laurent

I’ll try that at all.
My board is the Olimex STM32-E407.
Olimex provide a sample blink led project that I’ve imported into AC6 workbench but it’s not a native AC6 project.
There the debuging method is to open openocd through external tools menu and lauch an hardware gdb session and it work fine.
I’ll try to make a native AC6 simple project and see if the option debug as an AC6 project work.

Making a new AC6 project using the same cpu and board configuration from scratch is working fine. It seems that The STM32CubeMx make problems.

I know now why this error appears.

In the workspace in c++ perspective, i suggest you to open place the “Debug” window in a place where it’s contain is always visible.
at the start of a debug session, i see the openocd process stoped, i don’t know why (treminated with exit value: 0), and gdb is running and hangs. After a few seconds comes this time-out error, probably because openocd is stopped.
It may be an AC6 bug ?

I forgot to precice that I install of AC6 workbench was done with “install new software” and the version of eclipse is ‘Neon 3’, the same used by AC6.
The same problem comme with this type of install with the last version of eclipse, ‘Photon’

I try also by installing the AC6 binary package and the result is the same.

Could you be more precise on how to reproduce your issue ?

Your first sentence is not clear to me.
With the C/C++ perspective active, you can’t change the debug perspective.
Did you click on “switch to debug perspective” when debugging ?

Maybe there is an issue with Debian distrib.
You said you installed the latest version but was it working fine before ?
Or you just tried SW4STM32 now on Debian so only with latest version.

Rgds,
Laurent

No, i’m not in Debug perspective but in C++ perspective. When AC6 start a debug session with everything ok, he switch automaticaly in debug perspective

Just do the folowing steps:

1°) Start AC6 workbench
2°) Go in C++ perspective, if it is not the curent one.
3°) The window on the left is normaly the ‘Project Explorer’ window.
Down, just next the explorer windows, you have a windows with tabs called ‘problems’, ‘Task’, ‘Console’.....and one tab called ‘Debug’.
Drag this tab just next the ‘explorer window’ and select it. At this time nothing is displayed on this window.

4°) On the tool bar, you have a symbol that is the same as the ‘Debug’ window icon.
Click on it and a pull-down menu apear where you can see these lines:

(Your Project name) Debug (with the icon of AC6 workbench) (in my case it is: STM32-E407 Debug )
-------------
Debug as...
Debug Configurations
Organize Favorites

If you have no AC6 debug configuration aviable you have to create it by clicking on ‘Debug configurations’

5°) Click on : ” ‘Your Project name’ Debug” (with the icon of AC6 workbench in front of this text).
This will start a Debug session with the native AC6 debug confguration and look at the ‘Debug’ windows, just next the ‘Project Explorer’ windows on the left of the workspace
When the debug session start you will see on this Debug window an line with an arrow (in my case: STM32-E407 Debug (AC6 STM32 Debugging)
Click on the arrow to expand the three, yet when you have started the debug session.

The 2 images included on this post show you what will be displayed on the ‘Debug window’

file:///home/francois/Images/AC6%20Debug%20window%20process%20runing.pngQuestion
file:///home/francois/Images/AC6%20Debug%20window%20process%20terminated.pngQuestion

LaurentL I’ve used previous versions of AC6 and it was always runing perfect even if it was on Debian linux or on windows (8.1 familly edition).
(I do multiplatforms drivers and softwares for custom hardware.)
Before using AC6, when I began with STM32, i’ve used the GNU MCU plugin on eclipse. AC6 is a great enhancement that make me save time.




Curiosity push me to install the same configurations of eclipse (Photon and neon) and all the isues and errors are the same
Even the exit code of openocd: on Linux the exit code of openocd is 1 (and not 0 like i told before) and on windows the exit code is 0.

I found something. I had in my path variable a location of an old version of openOCD. I remove it from the path variable and restart my computer. At this moment everything is ok for windows (an STM32CubeMX generated project or a native AC6 project).


Italy

Hi, is from these day I am getting intermittent failure from programming STM32 devices.
I am using Linux Mint 17.3,
from frdeclercq on 2018-07-20 16:07 post I felt that openocd is still 2013 version 0.7.0-2. so

apt-get uninstall openocd removed the old revision then all restarted work.

apt-get and software managers are all locked to old revision and no new are on repository messing up compilers and code generators.
Thanks again frdeclercq to point me to solution of this annoying threat.
Regards
Roberto