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


Error Debugging

Stm32F429I-Disco board was working fine in debugger until today. Now keep getting this error:

Error in final launch sequence
Failed to execute MI command:
load M:\stm\STM32Cube_FW_F4_V1.13.0\Projects\STM32F429I-Discovery\T2-codec\SW4STM32\STM32F429I_DISCO\Debug\STM32F429I_DISCO.elf

Error message from debugger back end:
Error erasing flash with vFlashErase packet
Error erasing flash with vFlashErase packet

Hi,
I’m in the same case since I encounter debug problems when trying to make blink an LED of a board that include a STM32F103C8T6.

I set up the hardware firmware (GPIOs) with the program STM32CubeMx, and wrote two lines code to make the led blink:

HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin);
HAL_Delay(1000);

Simple.

Then I build the project which was ok

But when I tried to debug here is the same error message as you got :

https://community.st.com/servlet/JiveServlet/downloadImage/2-151700-16292/pastedImage_1.pngQuestion



Updated open OCD but still the same for debug.
In fact in RUN mode the log file says: ** Unable to reset target ** shutdown command invoked.

Tried as well to modify the version of st-link in the debug config from st link V2.1 to V2 but still the same...ST-link file updated as well.
I do not have trouble with the nucleo F411RE board.
but It chooses by default a default script for debug device : nucleo_f411re.cfg
https://i58.servimg.com/u/f58/14/75/42/81/captur10.jpgQuestion
On the contrary when using the STM32F103 board there is no default script evalable and I check in Manual spec the st link V2 or V2.1 with no result.
I tried this board with arduino and it works so the board is ok.
Thanks for your help.

Hi Lewis,

It seems there is an issue on SW4STM32 latest version (1.14.0) for “use local script” cfg file.
If the board 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 and to reselect it by browse button or to use the “manual spec” mode for the cfg.

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

Rgds,
Laurent

Hi Laurent,
Thanks for your comment. Could you explain more in details what do you mean by “to use the “manual spec” mode for the cfg. ” How do I get to manual spec mode?
Thanks

Hi Lewis,

You need to go in “Debug Configurations...” of the project.
Accessible with right click of mouse on the project name => Debug As => Debug Configurations...
In the “Debugger” tab (2nd tab), you’ll find the 3 choices of config at the bottom of the page, the last one is “Manual spec”.

Rgds,
Laurent

OK It finally works !
Thanks Laurent
It seems that the Stlink board I use needs a different setup than the direct onboard one mounted on the nucleo.
Could you explain what -c “reset_config none” means? Is there a specific eclipse code to learn for debug?

Now , just need to get familiar with those Boot0 Boot1 butons switch on this custom board. If anyone know what they’re really used for I’ll be grateful.
These might be related to reset line to setup for a good boot.

Hi,

The command tells openocd that there is no hardware reset from the debug tool.

For the boot switch, have a look in the reference manual of the device, the boot modes are explained.
Most of the time, you won’t touch this config, “boot in flash” should be the default.

Rgds,
Laurent


Thanks. I got it working. It wast jsut openocd.exe not ending.