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


Unable to debug on custom STM32 board

I’ve been using System Workbench to try to build and debug code to a custom STM32 board that I have made. The code builds fine, but I get the following error after I start debug:

System Workbench Error

I am currently using a STM32F303RE chip and the following debug configuration:

System Workbench Debug Config

I’ve tried using the custom config file and other ST-Link version, but to no avail. Any help is greatly appreciated.

France

Hi,

On your custom board, do you connect the reset line to the debug probe? By default OpenOCD expect to be able to connect to the board when it is in reset mode, using the reset line to place the MCU in reset state.

Please could you check that?

Please also try to start the debug session by adding option “-d” to the script other options and send what was displayed on the OpenOCD console?

Bernard (Ac6)


Usually when I see this error (vFlashErase) it is because some of the falsh areas are write, pcrop, and/or rop protected.
I would recommend looking at the options bytes in ST-Link Utility (ctrl+b).


Yestuday I have similar error and solve this problem. The main problem is the many people uses ST-Link Programmer/Debuger clone from Aliexpress. But this clone have no nReset signal pin, like in 15 pin of original ST-Link. There are only jReset & SWIM_Reset pins.
To solve the problem, I need connect Reset pin of target MCU to 18 pin (PB0) programmer MCU.


I had this problem and the solution layed in another thread. It was to remove no-srst from OpenOCD .cfg file for my target (STM32F0).
This is the full path to the file I had to edit:
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.11.2.201612060912\resources\openocd\scripts\target\stm32f0x.cfg
The no-srst is also redifned in a project specific file but I’m not sure which one of them has prevalence:
C:\Users\myuser\stm32wb_workspace\RFOutput_cube\RFOutput_cube.cfg
Which is obviously the path to my workspace and the current project.


Fix it in software! :-D

Before you can debug, the IDE has to send the binary image to the MCU’s flash memory (or SRAM, if you’ve set it up for that). Before it can write the new image, it has to erase the existing image, if any. That’s where you’re getting the error message - at the very beginning of the process.

Your present configuration is telling OpenOCD that there is a reset wire attached from the ST-Link to your target board. That is in addition to the SWCLK and SWDIO lines, ground and Vtarget. OpenOCD is trying to use the reset line to undeniably get the MCU’s attention. This is not necessary.

Change your reset configuration from “reset_config srst_only srst_nogate” to “reset_config none”. I just added a “#” in front of the line, which causes it to be considered as a comment, so I can go back when I need to later.

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

reset_config none

PS: someone explain to me in words I can understand how to properly format code in this forum. Please! The “Help” button has a bad link to the Wiki syntax help page. The actual page gives terse examples that I can’t seem to follow.

I hope this helps.


Dale


void main(void) {
	char s[] = "Vetch";
	printf("Thank you, %s!\n", s);
}

biggrin Excellent!
Happy new year.