cancel
Showing results for 
Search instead for 
Did you mean: 

How to program and debug idb007v1 from TrueSTUDIO via ST-Link/V2?

Posted on February 17, 2018 at 11:45

Hi,

I would like to debug a program on BlueNRG-1 using SWD interface on idb007v1 board.

Unfortunately, I cannot even program the chip via this interface.

Here is my configuration:

1) ST-Link/V2 is connected by 20-lines  ribbon cable to CN7 connector

2) idb007v1 board is powered from USB

3) ST-Link/V2 firmware version V2J30S7

4) Windows 7/64bit drivers:

   a. STLink dongle 2017-06-08 v2.1.0.0 STMicroelectronics

   b. VCP driver       2010-04-25 v1.3.1.0 STMicroelectronics

5) IDE: Atollic TrueSTUDIO for STM32 9.0.0

When I try to start debugging in TrueStudio following error appears:

Atollic TrueSTUDIO gdbserver for ST-Link. Version 4.2.0 (WIN32 2018-01-16 10:57:14 15656)

Copyright (c) 2018, STMicroelectronics. All rights reserved.

Starting server with the following options:

Persistant Mode : Disabled

LogFile Name : debug_log.txt

Logging Level : 1

Listen Port Number : 61234

Status Refresh Delay : 15s

Verbose Mode : Disabled

SWD Debug : Enabled

Vendor = 0x3B

Error in initializing ST-Link device.

Reason: ST-LINK: Could not verify ST device! Abort connection.

and sometimes:

Target no device found

Error in initializing ST-Link device.

Reason: No device found on target.

Just to verify programming ability via SWD I also tried to use ST-Link utility, it communicates with ST-Link/V2 but is not able to connect to device (i.e. chip).

Another flash programming tool - STM32CubeProgrammer does not support BlueNRG-1 chip.

I can only program BlueNRG-1 flash memory by BlueNRG Flasher.

But this tool is using another path based on preprogrammed bootloader and USART communication.

I am interesting in using SWD and debugging feature.

How can I obtain that?

Kind regards,

Piotr

#debug #idb007v1 #bluenrg-1 #truestudio #swd
8 REPLIES 8
Posted on February 17, 2018 at 22:00

Small update, but not a solution of my problem:

BlueNRG chips have their ST-Link utility:

BlueNRG-1 ST-LINK utility for BlueNRG-1, BlueNRG-2 MCU

https://my.st.com/content/my_st_com/en/products/embedded-software/wireless-connectivity-software/stsw-bnrg1stlink.license%3d1518899744901.html

 

After instalation the tool has a SWD frequency set to 4MHz, so following error apears when I try to connect:

  21:57:12 : Can not connect to target!

            If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu.

  21:57:15 : No target connected

I needed to lower frequency to 100kHz to make it work with BlueNRG-1.

Andrew Neil
Evangelist III
Posted on February 20, 2018 at 12:11

Have you tried asking on the Atollic forums?

Posted on February 27, 2018 at 09:29

This Is ok for programming the board, but not for the debug.

Did someone manage to debug an app on the IDB007V1 ?

Posted on April 22, 2018 at 14:05

Hi romaniuk,

Did you got any progress on this issue?

Are you able to work with Atollic TrueSTUDIO 9.00?

Posted on April 23, 2018 at 14:57

No. 

Please read discussion on the Atollic Forum.

It is still, not supported and they do not know when it will be.
Dilbert K
Senior

So disappointed....

I am using "Atollic TrueSTUDIO for STM32 9.0.1" with "BlueNRG-1_2 DK 3.0.0" + STlink-V2 for IDB007V2 (BlueNRG-2) board and having identical issue.

I tried IAR tools, result the same.

Anyone have ever success using STLink for debugging on BlueNRG-1,2 ??

PZwar
Associate II

Could not verify ST device!

Thank you so much, Kraal!

I inspected the looks of the chip and found it quite different from the ones I used before.

The text was not engraved but printed in a sloppy way. I think that your suggestion of a counterfeit is right.

I tried to make these counterfeits working under STM32CUBEIDE and OpenOCD.

Therefore, I adapted the st_scripts/target/stm32f1x.cfg file by replacing the 0x1ba01477 by 0x2ba01477.

I also added a line:

reset_config trst_only

This gives a error message:

Error: BUG: can't assert SRST

Neverthless, I could load and debug my code.

thanks a lot,

what exactly reset_config trst_only do?