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


Can't program/debug STM32F746ZGT6 from System Workbench

I tried to create (using the “New” Wizard) multiple projects with a variety of settings just so I can find a way to connect to my custom board.
The last one I made is a C project, an executable of type “AC6 STM32 MCU GCC”; using the “AC6 STM32 MCU GCC” toolchain.
Custom board using “STM32F746ZGTx” mcu, ST-LinkV2 device; SWD interface.
Project Firmware Configuration: “Cube HAL”
No other drivers or utilities selected.
Hust a counter added to “main” just in case.

I can build succesfully.
I CAN program my custom board using the STM32 ST-Link utility.
I use an STM32F4-Discovery board as an ST-Link-V2 programmer. The FW has been upgraded; here is output from ST-Link utility:
“11:03:37 : ST-LINK SN : 51FF72064983485233342387
11:03:37 : ST-LINK Firmware version : V2J24S0
11:03:37 : Connected via SWD.
11:03:37 : SWD Frequency = 1,8 MHz.
11:03:37 : Connection mode : Normal.
11:03:37 : Debug in Low Power mode enabled.
11:03:37 : Device ID:0x449
11:03:37 : Device family :-STM32F74x/F75x”

I can’t program/debug using the System Workbench.
I tried all sort of fixes I found on your forum and elsewhere.
Errors I get from various levels/sources:
>>>
Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-06-12-17:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1800 kHz
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : clock speed 1800 kHz
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: open failed
in procedure ‘init’
in procedure ‘ocd_bouncer’

The end was cut off:
Other error messages that might originate in earlier problem:
>>>
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
localhost:3333: The system tried to join a drive to a directory on a joined drive.
>
Error in final launch sequence
Failed to execute MI command:
load C:\Temp\DelmeLater\STM32F7TestWorkBenchDebug\TestDebug\Debug\TestDebug.elf
Error message from debugger back end:
Error erasing flash with vFlashErase packet
Error erasing flash with vFlashErase packet

Another error:
>>>
Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-06-12-17:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1800 kHz
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : clock speed 1800 kHz
Error: read version failed
in procedure ‘init’
in procedure ‘ocd_bouncer’

Hi, I have the same problem. When I program STM32 with STM32 ST-LINK Utility and then debug with disabled “Load image” in debug configuration - debugging is available, but It not very useful because many times We must program with external software. Is anybody can help Us?

More, if it helps:
>>>
GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150304-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “host=i686-w64-mingw32 target=arm-none-eabi”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type “help”.
Type “apropos word” to search for commands related to “word”.

show configuration
This GDB was configured as follows:
configure host=i686-w64-mingw32 target=arm-none-eabi
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--with-expat
--with-gdb-datadir=/home/build/work/GCC-4-9-build/install-mingw/arm-none-eabi/share/gdb (relocatable)
--with-jit-reader-dir=/home/build/work/GCC-4-9-build/install-mingw/lib/gdb (relocatable)
--without-libunwind-ia64
--without-lzma
--without-guile
--with-separate-debug-dir=/home/build/work/GCC-4-9-build/install-mingw/lib/debug (relocatable)
--with-system-gdbinit=/home/build/work/GCC-4-9-build/install-mingw/i686-w64-mingw32/arm-none-eabi/lib/gdbinit (relocatable)
--with-zlib
--without-babeltrace

(“Relocatable” means the directory can be moved with the GDB installation tree, and GDB will still find it.)


Hi,

What OpenOCD script are you using ?.
Check you debug configuration - see attaced picture.

Your C project (AC6 STM32 MCU GCC) should be ok.
How did you create your Debug Configuration ?. Is for a custom board or you choose Discovery board for STM32F7 ?


Thanks Ciprian,
I tried both custom (since my board is custom) and Disco (since my board should be “like” a Disco) to no avail.
BUT yesterday late I got success:
Instead of using either default or local script I now use “Manual spec” (ST-LinkV2 and SWD) and that works.

Thanks again,

Cat

Can you help me? I’m having the same problem. Can you describe in detail what you did? Thanks!

Here is my error:
11:25:34 **** Programming project STM32_HelloWorld on chip ****
“C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.openocd.win32_1.21.0.201811131241\tools\openocd\bin\openocd.exe” -f stm32.flash.2056568087367484630.cfg -s “C:\Users\William\Documents\STM32F4_RTOS\RTOS_Workspace\STM32_HelloWorld” -s “C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_2.3.1.201811131241\resources\openocd\st_scripts” -c “program Debug/STM32_HelloWorld.elf verify exit”
Open On-Chip Debugger 0.10.0-dev-00015-gaaf1808 (2018-11-13-13:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter_nsrst_delay: 100
adapter speed: 1800 kHz
Info : clock speed 1800 kHz
Error: open failed (no matching adapter found)
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 485
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked


11:25:34 Build Finished (took 501ms)

It was too long ago, I don’t remember.
In some programming/debug settings look for and use “Manual spec” (ST-LinkV2 and SWD) .
But now I use Atollic True Studio, STM bought it and it’s free.

Hello,

How did you install SW4STM32 ?
Because it seems there is stlink usb driver install missing.
with the msg: Error: open failed (no matching adapter found)

Can you install with admin rights the latest version and try again.

Rgds,
Laurent

I fixed the problem.... I was using a USB 3.0 connection and apparently one cannot do that. I swapped ports and voila! it programmed. Sheesh.

Sheesh indeed!
I think you should try Atollic anyway, I think it’s the current STM preferred tool with many advantages.