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


After update openocd is incomplete

Hi,

Today I did an update of AC6 (Linux). After the update there is a new folder:
~/.p2/pool/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.12.0.201611241417

Previous version folder is:
~/.p2/pool/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.8.0.201603291120


The complete path below
~/.p2/pool/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.12.0.201611241417/tools/openocd/share

is missing.

Where do I find tools/openocd/share/openocd/scripts/* now?

Is this package broken?

Regards
Dieter

Hello,

The Openocd scripts are in the mcu.debug plugin.
In the plugin openocd.linux64, you’ll find only the exe and librairies.

After update, do you have an issue to debug ?

Check that you updated to the latest version, there has been a new one recently.
Menu Help => Check for Updates

Rgds,
Laurent


Hi

Some more info:

The update did not work first. Instead a message was popping up:

“An error occurred while collecting items to be installed
session context was:(profile=_home_db_eclipse_cpp-mars_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at http://www.openstm32.org/Eclipse-updates/org.openstm32.system-workbench.site/plugins/fr.ac6.mcu.externaltools.arm-none.linux64_1.12.0.201611241417.jar.Question
Premature end of Content-Length delimited message body (expected: 92337111; received: 61517818”

But a wget of the file succeeded so I started the update again.

While the second try it did not conplain any more and the update was seemingly successful.

There are no updates available when checking now.

When I look in Help->Installation Details->Installed Software I see a subfolder “External Tools” below Name “OpenOCD”
This External Tools 1.12.0.201612060912 fr.ac6.feature.mcu.externaltools.feature.group Ac6 has the same Version
as the External Tools 1.12.0.201612060912 fr.ac6.feature.mcu.externaltools.feature.group Ac6 besides “OpenOCD”
OpenOCD is 1.12.0.201611241417 fr.ac6.feature.mcu.externaltools.openocd.feature.group Ac6 according to this info window.

Where is the new path for the openocd scripts folder?

When trying to run/debug I get an error in openocd console:
...
Error: timed out while waiting for target halted
TARGET: stm32f1x.cpu - Not halted
in procedure ‘program’
in procedure ‘reset’ called at file “embedded:startup.tcl”, line 478
in procedure ‘ocd_bouncer’

    • Unable to reset target **


This error is already known to me.
When I first try to use AC6 I had to modifiy reset config in scripts/target/stm32f1x-back.cfg target/stm32f1x.cfg
See http://www.openstm32.org/tiki-view_forum_thread.php?comments_parentId=2221&topics_offset=69Question

But now I can not find the scripts at all

My local openocd script is a modified one:

  1. This is an STM32F103C8T6-mini board with a single STM32F103C8Tx chip.
  2. Generated by System Workbench for STM32


source find interface/stlink-v2.cfg

set WORKAREASIZE 0x5000
transport select “hla_swd”

  1. source find target/stm32f1x_stlink.cfg


source find target/stm32f1x.cfg

  1. use hardware reset, connect under reset
  2. reset_config srst_only srst_nogate

reset_config srst_nogate

Regards
Dieter


Hi

Sorry it was my mistake.

Found the scripts folder as
~/.p2/pool/plugins/fr.ac6.mcu.debug_1.11.2.201612060912/resources/openocd/scripts/

The previous mentioned path/folder was also not used in the previous versions and was just
garbage/documentation bla.

Again I have modified target/stm32f1x.cfg (here in the new versions folder) and it works as before.

Regards
Dieter

Hello Dieter,

Why do you need to change the reset strategy ?

You didn’t connect the Reset line from STLink to your board ?

Beware if you run an appli that uses SWD lines as IO or uses Low power modes, if no reset applied, you might not be able to enter debug mode.

Rgds,
Laurent

Hi Laurent,

I’m currently setting up my SW4STM32 environnement with one of those bluepills board, I encounter somme erratic behaviours.
I use a STLINK V2 USB adapter (a clone one), it works fine since STLink utility run fines and that I’m able to (after 2 trials) to upload a code into the uC with SW4STM324’s debug command, even with some errors messages.

Do you say in yout post that the reset output of the STLINKV2 should alaways be connected to the reset pin of the uC ? or do you say that physical reset has to be applied only if SWD lines are not free for STLINK OR uc operate in Low Power ?

This may be an answer to the issues I met. Currently the connection with the board use the 4 wires of the connector (Vdd, Gnd and 2 wires SWD), my test app is the code generated by CubeMX compeleted by 2 line handling PC13 led blink and the SWD lines are properly dedicated for this in CubeMX. After two trials, code is uploaded and a manuel reser make the board start excuting the code : blinking led. On first trial I’ve mainly an ‘unable to write flash error’, on second the process doesn’t generate error but doesnt restart the Uc, so manual reset is required.

I think that I may have a reset issue because OpenOCD’s highlight errors linked to ‘CPU not halted’ status or ‘unable to reset’. It looks like STLINKV2 with the 2 wire SWD within SW4STM32 environnement can’t reset the cpu. Please not that STLINK utility give succefully full control on the cpu : halt, reset, connect, disonnect, uploaed, read,...etc.

Thanks
Chris

Hi Chris,

I just say that if you program code (low power mode or SWD pins used as GPIO in your appli for example), you will need a reset for the stlink to communicate. If the stlink doesn’t reset the mcu, it might not enter SWD mode.

I doubt that stlink utility works with the “connect under reset” mode on these boards without reset connected to the stlink.


Unfortunately, it seems there is also an issue on SW4STM32 latest version (1.14.0) for “use local script” cfg file.
If the cfg is in project workspace, it won’t be executed. That is the case for custom board created during a new project.
The workaround is either to copy the cfg elsewhere or to use the “manual spec” mode for the cfg.

And for the boards that don’t have reset line connected from STlink like yours, you can add the -c “reset_config none” in openocd options in debug config launch (debugger tab).

Rgds,
Laurent

Hi Laurent,

I would like to thank you, I’m now able to upload code withour error, even if some error stills appears in OpenOCD console, the final result is ok. Now it’s time to focus on CubeMX and software rather than digging around IDE setup !

Regards
Chris


Hi Laurent,

I’m using one of these cheap ST-Link V2 adapters from Ebay.
It is connected only with SWCLK, SWDIO and GND to a “bluepill” (Maple Mini clone) PCB. for programming and debugging.
Thanks for the hints.

Dieter