8 years, 5 months ago.

Its possible to develop mbed sofware with linux, Ubuntu 14.04?

I use desktop PC midi-tower, icore7, 6 cores, 12 threads, and a lot of RAM, but I use Ubuntu 14.04 mbed.org is it compatible with it? Thanks. Jaume

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32L476RGT6 microcontroller.

-

posted by Roberto Di Stefano 15 Feb 2016

1 Answer

8 years ago.

I bought this board some months ago, I kept it in the drawer so far, now I would like to test it on Ubuntu 14.04. Even if System Workbench for STM32 and CubeSTM32 support the boards the the case is serious. I imported very simple code from Cube to SW, compiled and linked. When debugging I get the 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 option (-l mylog -d)

/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. 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 server and the st-link/v2-1. I am not able to investigate further. My ask is: Is there anyone debuging the Nucleo-STM32l476RG with openocd under linux? Thx.

p.s. I apologize for the lack of line-feed in the log file cut/copy: reading it is hard.

Can you try with the instructions for pyOCD here? https://docs.mbed.com/docs/debugging-on-mbed/en/latest/

posted by Jan Jongboom 20 Apr 2016