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


openocd - wrong paths on win x64

Hi,

I was not able to download/debug generated code into a STM32F3 Discovery board (STM32F303). It was not possible to connect to the target.

Testing openocd alone I have observed that openocd directory is set to “/usr/bin” (below is opeocd output):

Debug: 17 32 options.c:98 add_default_dirs(): bindir=/usr/bin
Debug: 18 32 options.c:99 add_default_dirs(): pkgdatadir=/usr/share/openocd

this could be not so big problem (my guess) but the path where “script” folder is located on a win 64 system is not correct:
Debug: 22 47 configuration.c:44 add_script_search_dir(): adding C:/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.win32_1.2.0.201505291716/tools/openocd/bin/usr/share/openocd/scripts

On my sistem openocd ‘scripts’ folder is located on this path:
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.2.0.201506021103\resources\openocd\scripts\board
so the above path will not working.

I have check this on both Win 7 x64 and Win 8.1 x64 machine. Installer used was “install_sw4stm32_win_64bits-v1.2.exe”, and last updates after install.

Using another Windows buil for opencod (Freddie Chopin) I was able to connect to the board (see logs attached).

Attached is the command line scripts used and log files.

Plese let me know if you can reproduce this behavior.
Did you build yourself openocd ?


=========
Here are parts of the opeocd output (Freddie Chopin build) - just for reference:

Commnad line window:
------------
C:\openocd-0.9.0_fc\bin\openocd.exe -f c:\openocd-0.9.0_fc\scripts\board\stm32f3discovery.cfg -d3 -l d:\openocd_log_fc.txt

Open On-Chip Debugger 0.9.0 (2015-05-19-12:06)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.htmlQuestion
User : 13 0 command.c:546 command_print(): debug_level: 3
Debug: 14 16 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_log_output d:openocd_log_fc.txt
Debug: 15 16 command.c:145 script_debug(): command - log_output ocd_log_output d:openocd_log_fc.txt

Parts of the log file:
-----------
Debug: 17 32 options.c:98 add_default_dirs(): bindir=bin
Debug: 18 32 options.c:99 add_default_dirs(): pkgdatadir=
Debug: 19 32 options.c:100 add_default_dirs(): run_prefix=C:/openocd-0.9.0_fc/
Debug: 20 32 configuration.c:44 add_script_search_dir(): adding C:\Users\ciprian\AppData\Roaming/OpenOCD
Debug: 21 32 configuration.c:44 add_script_search_dir(): adding C:/openocd-0.9.0_fc//site
Debug: 22 32 configuration.c:44 add_script_search_dir(): adding C:/openocd-0.9.0_fc//scripts
Debug: 23 32 configuration.c:84 find_file(): found c:\openocd-0.9.0_fc\scripts\board\stm32f3discovery.cfg
Debug: 24 32 configuration.c:84 find_file(): found C:/openocd-0.9.0_fc//scripts/interface/stlink-v2.cfg
.........
Debug: 257 47 stlink_usb.c:1602 stlink_usb_open(): stlink_usb_open
Debug: 258 47 stlink_usb.c:1619 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748 serial:
Info : 259 120 stlink_usb.c:523 stlink_usb_version(): STLINK v2 JTAG v23 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : 260 120 stlink_usb.c:1730 stlink_usb_open(): using stlink api v2
Debug: 261 120 stlink_usb.c:722 stlink_usb_init_mode(): MODE: 0x02
Info : 262 120 stlink_usb.c:555 stlink_usb_check_voltage(): Target voltage: 2.907062

Above is a sucesfull connection to the board (see voltage target and STLINK version of the target board)

My mistake. Following the exact steps described on User Guide - “Importing an STM32CubeMX generated project under System Workbench for STM32” it was possible to compile and debug the project (STM32F3 Discovery board).

I use a Win 8.1 64 bit machine

It turns out that the System Workbench set few paths (correct paths) when it is invoked by pressing the Debug icon on the Eclipse:

Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-04-22-11:10)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 15 command.c:546 command_print(): debug_level: 3
Debug: 14 15 configuration.c:44 add_script_search_dir(): adding C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.2.0.201506021103\resources\openocd\scripts\st_board
Debug: 15 15 configuration.c:44 add_script_search_dir(): adding C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.2.0.201506021103\resources\openocd\scripts

and then configuration files could be found

Debug: 22 15 configuration.c:84 find_file(): found stm32f3discovery.cfg
Debug: 23 15 configuration.c:84 find_file(): found C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.2.0.201506021103\resources\openocd\scripts/interface/stlink-v2.cfg


To activate debug output for openocd I have added “-d3” under “OpenOCD Command:” entry in “Debug Configuration” window under “Debugger” tab, the comand looks like:
”${openstm32_openocd_path}\openocd.exe” -d3
The output is printed in Console window when debug is started

Attached is the complet file log.