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


debugging with STM32L476 Discovery

Can someone tell me how to run the debugger with STM32L476 Discovery?
Everytime I attempt it, it fails.

I have now issue running the debugger with my STM32L152 Discovery board.
I am using OpenSTM Workbench with Linux Fedora 22.

The only way I got new code to load and run on the L4 is by copying it into the usb flash drive of the
L4 discovery board. It works but no debugger.

mat

Maybe I have similar problem with nucleo-l476rg:
I bought this board some months ago, I kept it in the drawer so far, now I would like to test it on Linux Ubuntu 14.04.
Even if System Workbench for STM32 and CubeSTM32 declare to support the boards I have an issue on debug.
I imported very simple code from Cube to SW, compiled and linked (no errors). When debugging and downloading the code I get the following error:

Error message from debugger back end:
localhost:3333: Connection timed out.

Launching Eclipse from the terminal we can see the complete command string composed by eclipse to run the debugger:

OpenOCD launch command (run in /home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts/st_board):
/home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.8.0.201603291120/tools/openocd/bin/openocd -f nucleo_l476rg.cfg -s /home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts/st_board -s /home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts -c gdb_port 3333

we can add to this string a log file and debug options (-l mylog -d), so the command will be:

/home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.8.0.201603291120/tools/openocd/bin/openocd -f nucleo_l476rg.cfg -s /home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts/st_board -s /home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts -l mylog.log -d -c gdb_port 3333

We can run this command from terminal after changing the directory to
/home/rob/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts/st_board
The last lines of the log file are in my case

Info : 248 12 core.c:1388 adapter_init(): clock speed 1800 kHz
Debug: 249 12 openocd.c:137 handle_init_command(): Debug Adapter init complete
Debug: 250 12 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 251 12 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 253 12 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 254 12 hla_transport.c:154 hl_transport_init(): hl_transport_init
Debug: 255 12 hla_transport.c:171 hl_transport_init(): current transport hla_swd
Debug: 256 12 hla_interface.c:44 hl_interface_open(): hl_interface_open
Debug: 257 12 hla_layout.c:42 hl_layout_open(): hl_layout_open
Debug: 258 12 stlink_usb.c:1697 stlink_usb_open(): stlink_usb_open
Debug: 259 12 stlink_usb.c:1714 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x374b serial:
Error: 260 15 stlink_usb.c:1727 stlink_usb_open(): open failed
Debug: 261 15 hla_layout.c:49 hl_layout_open(): failed
Debug: 262 15 command.c:628 run_command(): Command failed with error code -4
User : 263 15 command.c:689 command_run_line(): in procedure ‘init’
in procedure ‘ocd_bouncer’
Debug: 264 15 command.c:628 run_command(): Command failed with error code -4
User : 265 15 command.c:689 command_run_line():
Debug: 266 15 hla_interface.c:119 hl_interface_quit(): hl_interface_quit

so the problem seems to be the communication link between the ocd-server and the st-link/v2-1.
I am not able to investigate further.
My ask is:
Have you got to debug your board openocd under linux?
Thx.