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


Failed to launch debug

Hello

When I try to run a debug session i get the following error mesages:

Error in final launch sequence
Failed to execute MI command:
load “D:\Co_Pilote_2016_08\Co_Pilote\SW4STM32\Co_Pilot_Configuration\Debug\Co_Pilot Configuration.elf”

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

and a small extract from tthe openOCD trace:
...
Debug: 632 3237 target.c:2788 target_wait_state(): waiting for target halted...
Error: 634 4238 target.c:2796 target_wait_state(): timed out while waiting for target halted
Debug: 635 4238 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu curstate
Debug: 636 4238 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu curstate
User : 637 4238 command.c:546 command_print(): TARGET: stm32f4x.cpu - Not halted
in procedure ‘reset’
in procedure ‘ocd_bouncer’
...


It looks like the processor is not “halted” as expected.

I updated the IDE using help/search for update and accepting all updates, so I should have an up to date software.

I also tried modifying the “reset_config” from stm32f4x.cfg file as mentioned in some of the forum thread but with no success, so i am using the value as provided with the package.

I am using the STLink from a STM32F4 discovery board, and configured for STlink V2 SWD connected to a custom board.

Using STM32 STlink utility I can erase and program processor flash memory and obtain the following information: (Help/About => version 3.9.0, USBDriver.Dll V4.4.0.0, CLI 2.5.0, Target/Setting FW V2J27S0 Port SWD Frequency 1.8MHz Mode Normal Debug in low power mode enabled, Reset mode Hardware reset) .

My STLink and custom board are also working with other IDE environments (coocox and emblocks), but I would like to migrate to OpenSTM32 which seems to present some benefits compared to the other IDEs.


Please let me know any suggestion in order to get the debug working.

Best regards
Gerard

Hello,

STLink utility should be closed or at least not connected to the STLink of course.

On your custom board, did you connect the Reset line output from STlink to the STM32 reset input on your board ?

It is necessary to connect the Reset if you want to reconnect on an application already programmed that might use low power modes or SWD lines as io and SW4STM32 is using the Reset to connect to the target.

Rgds,
Laurent


Hi Laurent
Thanks for your reply.

I confirmed that:
- STLink utility is stopped
- The Reset line output is connected to the reset of the my custom board processor (is their a simple way to double check? This is the way it is supposed to be, but a bug is always possible! -like PCB trace cut or bad soldering...! Anyway, the STLink utility is working fine so there should be a way to erase and program memory with my current hardware config)

I do not need to reconnect to an already programmed application, at least at the moment, since I will likely reprogram after each debug session. It will effectively be usefull later when the program become more stable.

By the way, the application was developped using CubeMX and then converted from C to C++.

Regards
gerard.


Hi Laurent and All.

OpenSTM32 can now program my custom board and I could start debugging.

It appeared that the reset signal was not connected properly to the board and processor. After making the necessary correction, all seems fine.
I was confident that my HW was good since it was working with STLink utility and with 2 other Eclipse based IDEs. They should rely on “other mechanism” to set the processor in expected state.

Thanks again.
Gerard