Loading...
 
Skip to main content

System Workbench for STM32


AC6 + ST-Link V2 + SWD programming

Hello!

I would like to ask, if and how can the AC6 be configured to enable programming & debugging using SWD withouth hardware reset line. At this point all I'm getting is "can not reset device" error.

Tunisia

Hello Rain Ellerma,

Could you please give us more details (mcu ? board ?) ?
Have you tried using ST-LINK UTILITY (with debug in low power mode is enabled) ?
- - - - - - - - -
As I know System Workbench cannot explicitly configure the reset type ! (I am not sure !!)
Alternatively, you can do it by modifiying openocd scripts (cfg files) related to your board or mcu.

Best Regards,
Tarek


Custom board
STM32F407 MCU

The programming, debugging and everything works using Keil and Atollic systems, with STM utilities etc.

I'll check if I can get the printout of the whole failing procedure in coming days if that helps. There should be a easy way to configure the system to work without Reset wire connection (as the whole programming/debugging interface is built to work without it).

Rain


Tunisia

You can modify your custom board cfg file like
stm32f4discovery.cfg located in C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_xxxxxxxxxxxxx\resources\openocd\scripts\st_board

the last line configures the reset type :

  1. use hardware reset, connect under reset

reset_config srst_only srst_nogate

by modifying this line you can modify reset type

Tarek

Yes, modifying to "reset_config srst_nogate" did the trick for me and the MCU gets halted.

Dieter


For the life of me, I can't seem to find out how to use the Stlink in Ac6.
Where is the menu item?
For me the Ac6 is worthless if I can't send my program to the board.
This IS working in both Keil and IAR.and I don't want to do anything that wll kill that.

Thanks,
Bert

France

Hi Bert,

Your program is sent automatically to the board whenever you ask to debug it (right click on compiled project then Debug As.. >> Ac6 MCU C/C++ Application).
.
If you don't want to debug but just to program the flash, then right-click on your project (the project must target your board) and go to the "Target" sub-menu: you will find commands to erase the flash and program it

Bernard (Ac6)


Hi Harry

I gave you the solution in April. For me it works like a charm.

When I recreate my project I do the following steps:

1. Build all
2. Right click on Debug/projectname.elf
3. DebugAs -> Ac5 STM32 c/c++ Application (let it fail)
4. Right click on Debug/projectname.elf
5. DebugAs -> Debug Configurations
6 Append '-Debug' to the Name and click appy
7. Select Tab "Debugger" and use my "local script"

local.script contains:

Copy to clipboard
# This is an STM32F103C8T6-mini board with a single STM32F103C8Tx chip. # Generated by System Workbench for STM32 source [find interface/stlink-v2.cfg] set WORKAREASIZE 0x5000 transport select "hla_swd" #source [find target/stm32f1x_stlink.cfg] source [find target/stm32f1x.cfg] # use hardware reset, connect under reset #reset_config srst_only srst_nogate reset_config srst_nogate


Dieter


France

Hi Harry,

To use STLink-V2 without a reset connection you must edit the debug script. For that you should select "Use local script" to reference your script, instead of keeping it auto-generated, thus it will not be modified (go to the "Debugger" tab of the debug configuration to change the radio button from "Manual spec" to "Use local script").

You should probably also rename the .custom.cfg script name to some name that does not start by a dot, so that it will be more visible. If you do not see this file name (nor .project or .cproject) in your project you should right click on the small triangle at the top right of the project explorer window, select "Customize view..." and uncheck the ".*resources" line, like in the screenshot below).

Hope this helps,

Bernard (Ac6)


I already tried that, but the custom config seems to be ignored, as I wrote in my other post from april. (nothing changed until today - tried it again)
I'm using linux. and also the board-definition doesn't work.
It doesn't store anything, and always asks me to enter a new board-definition.

For me it seems, that the Software ist nearly untested with linux, and thats very frustrating. (Not shure, if the situation is much better with windows)

Currently I'm evaluating changing to another framework (ARM-Plugin & Co), because I can't see any effort in solving all this Problems.

Instead of fixing Bugs, you create new ones like in the 1.9-Version, where debugging was inmpossible, and it took several days to fix....
Fortunaly I'm a hobbyist and don't have to earn my money with programming, but that is inakzeptable!

Harry


This thread comes up when searching for this problem and the solution isn't quite correct so I'm replying even though it's old.

It makes no sense to have the line reset_config srst_nogate by itself. This was probably discovered by randomly editing the config files until it worked. The srst_nogate option would only make sense if you are actually using the nSRST line, and removing srst_only means that nSRST is not being used. The reason this works is only because of the default behavior of the reset_config option.

The correct setting for programming a board that does not have nSRST connected (i.e. software-only reset) is:

reset_config none

Amen.

I only discovered this useful fact this morning.

When you use the ST-Link to program an off-board MCU (i.e., without a dedicated reset line attached), you have to override the default reset configuration to "none".


Hi ,

I am getting the error while debugging as follows. could you please suggest any solution for this.

On-Chip Debugger 0.10.0-dev-00278-ga53935e-dirty (2017-05-09-09:25)
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 speed: 4000 kHz
adapter_nsrst_delay: 100
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v27 API v2 M v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.240945
Info : STM32F429ZITx.cpu: hardware has 6 breakpoints, 4 watchpoints

Hi,

We don't see any error on your log.

If you haven't connected the reset from the STlink to the STM32, you should change the reset to "software system reset".
In SW4STM32 v2, you can now change some debug configuration like the clock freq or the reset.

Rgds,
Laurent


Hello,
I finally got the Ac6, STM32F103C8T6 and ST-Link v2 work. I also created a tutorial of the steps taken to make it work.
The link is on my wordpress site here: http://www.exclude.se/?p=170


It's simple)) But I lost a lot of time to find out.
You need to configure in the cube "Pinout -> SYS -> Debug -> Serial Wire".
Then create the project in Cube for SWD and compile it.
Program the controller once in a different way, for example with ST-LINK Utility.
Configure the project debugging as the author writes above: http://www.exclude.se/?p=170
Now debugging in SWD+STLink-V2 works withouth hardware reset line.
If you remove Debug -> Serial again, the debugging will not work again...



Hello.
I use SW for STM32 to import / modify / compile projects like INAV (https://github.com/iNavFlight/inav).
This is going well.
Unfortunately I can not find the solution in the menus of the imported project to debug under OpenOCD.ST-LINK V2.
I do not have access to the view to define the recipient board and to start OpenOCD ....

To verify I created a small project "Test" that I could compile.
When I clicked on "Debug as" I could create the configuration file of the card thanks to a view that I could not access before (INAV)
On the other hand, then, I met the error described in this forum related to the bad VID / PID (PID 0x374B instead of 0x3748)
Can detail to me the operations that I must perform to solve these two problems?

1- Menus to access at board description and openocd start debug when import project
2- Solution to VID/PID ST-LINK V2 problem : Solution is modify ST-LINK V2.CFG in AC6 repertory
In advance Thank you.
Rob


Hi,

When I am trying to build LoRaWAN-demo-72-bootcamp i am getting errors like these:Description Resource Path Location Type
Unknown LoRaWAN-demo-72-bootcamp Unknown Unknown org.eclipse.core.internal.resources.Marker@7dc86cde is not of a displayable type

Description Resource Path Location Type
Unknown subdir.mk Unknown Unknown org.eclipse.core.internal.resources.Marker@5776c3fd is not of a displayable type.

LoRaWAN-demo-72-bootcamp successfully build on Mbed Online compiler.and then i exported those code to System wrokbench for STM32 IDE it is not building.
Thank you.
Prakash


 
Collapse/expand modules below