Showing results for 
Search instead for 
Did you mean: 

Cannot import variables in STM Studio. Error opening ST-Link connection.

Associate II

Hello All,

I am hoping to reach out to the community for help with an error that I am experiencing with STM Studio. I recently installed STM Studio, part #: STM-STUDIO-STM32, version: 3.6.0.

When I try to import a variable to view I get an error message (picture attached) stating:

GDB cmd [print /x &(AHBPrescTable[0])] failed:

Error: Address of symbol "AHBPrescTable" is unknown.

I get two subsequent errors when I try to send the variable to the viewer:

Error opening ST-Link connection

Failure opening connection with target

I have downloaded and installed Java Runtime Environment: jre-8u201-windows-x64

I am using:

OS: Windows 10 x64 bit

IDE: Atollic TrueStudio v9.1.0

Debugger/Programmer: ST-LINK V2

Chip: STM32F030R8T6 (ARM core M0)

I had a similar error connecting to the ST-Link when I first tried using Atollic TrueStudio. The issue at that time was that Windows Defender was blocking st-link_gdb server.

I have tried running STM Studio with Windows Defender turned off, but it did not fix the problem in this case. Any insight and solutions you can provide are most appreciated! Thank you.


Hey Community,

This is for anyone who is still getting the (Error opening ST-Link connection and Failure opening connection with target) errors with STM Studio.

What worked for me when using Keil uVision 5 (not True Studio, although there probably is a similar option in True Studio) is to go into "Options for Target" --> "Debug Tab" --> "ST-Link Debugger Settings" --> "Pack Tab" --> "Untick the Enable Checkbox". This made STM Studio work straight away.

Good luck!

Associate II

Thanks All. It was really helpful...

Could you explain me the way in True Studio because I can't find. I can debug and the board gives me the right answer all the time but I can't access Stm Studio

How did you solve the problem? I couldn't solve, where is the .map?