cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot communicate with the tool

zaparivanny
Associate II
Posted on March 21, 2016 at 10:40

Hello!

I compile sourse code stvp (http://www.st.com/web/en/catalog/tools/PF257522) in visual studio 2015.

The program displays

an error

in console:

>>> Programming PROGRAM MEMORY

(API) ERROR : Cannot communicate with the tool.

Wrong tool selection or check tool power supply or check that a previous session

 is closed.

<<< Programming PROGRAM MEMORY fails

Full log:

D:\workspace\ApiSample\Debug>APISample.exe -Device=STM8S103K3 -ProgMode=SWIM -Port=USM -FileProg=D:\ELload.hex

STVP_CmdLine version 1.4

Verbose ON

Log activity ON

Display Progress OFF

Message box warning if protect option byte ON

Loop mode ON

Erase device OFF

Blank check device OFF

Verify device ON

Configuration:

BoardName=ST-LINK Device=STM8S103K3 Port=USM ProgMode=SWIM

>>> Filling PROGRAM MEMORY image in computer with Blank Value

<<< Filling PROGRAM MEMORY image in computer succeeds

>>> Loading file D:\STProjectGIT\El_load_2\Release\Exe\ELload.hex in PROGRAM MEM

ORY image in computer

<<< Loading file succeeds

>>> Programming PROGRAM MEMORY

(API) ERROR : Cannot communicate with the tool.

Wrong tool selection or check tool power supply or check that a previous session

 is closed.

<<< Programming PROGRAM MEMORY fails

#stvp #stm8 #st-link
6 REPLIES 6
LaurentL
ST Employee
Posted on March 21, 2016 at 14:20

Hello,

Check your syntax, the port is USB, not USM.

You can also use the STVP_CmdLine.exe installed with the toolset in STVP directory.

Rgds,

Laurent

zaparivanny
Associate II
Posted on March 21, 2016 at 16:03

stvp has been installed. I write ''USB'', but nothing change.

LaurentL
ST Employee
Posted on March 21, 2016 at 16:49

Is it an ST board (discovery) ?

If not, did you check connections ?

What is the OS used ?

Can you see the STLink (USB) in device manager ?

Does STVP connect to the STLink and STM8 target without issues ?

Can you try with the STVP_CmdLine.exe installed in STVP.

Rgds,

Laurent
zaparivanny
Associate II
Posted on March 21, 2016 at 17:53

I use ST-LINK. STVP_CmdLine.exe is works,

but

the compiled

application in vs2015

(http://www.st.com/web/en/catalog/tools/PF257522) does not work.

Georg Zöller
Associate
Posted on December 12, 2016 at 14:36

I also have the problem.

I downloaded the program, registered and then installed it.

This error message then comes ''Cannot communicate with the tool.

Wrong tool selection or check tool power supply or check that a previous session is closed.''.

USB has detected the PC and I can not go any further.

From Result.log:

new log session

date:    12/12/16

time:    13:59:59

----------------------------------------------------------

STVP_CmdLine version 1.6

NO ARGUMENTS GIVEN: will use default config. Type STVP_CmdLine -help for usage

Configuration:

BoardName=ST-LINK Device=STM8L15xC6 Port=USB ProgMode=SWIM

ProgMemFileName=ProgMem.hex

OptionFileName=Option.hex

Verbose ON

Log activity ON

Display Progress OFF

Message box warning if protect option byte ON

Loop mode ON

Erase device OFF

Blank check device OFF

Verify device ON

>>> Filling PROGRAM MEMORY image in computer with Blank Value

<<< Filling PROGRAM MEMORY image in computer succeeds

>>> Loading file ProgMem.hex in PROGRAM MEMORY image in computer

<<< Loading file succeeds

>>> Loading file Option.hex in OPTION BYTE image in computer

<<< Loading file succeeds

>>> Programming PROGRAM MEMORY

Cannot communicate with the tool.

Wrong tool selection or check tool power supply or check that a previous session is closed.

<<< Programming PROGRAM MEMORY fails0690X00000603L2QAI.jpg0690X00000603UrQAI.jpg0690X00000603UwQAI.jpg0690X00000603UsQAI.jpg0690X00000603V1QAI.jpg
Georg Zöller
Associate
Posted on January 06, 2017 at 08:45

Hello, I'm back again.

With the STM8-Discovery the connection has now folded.

I have connected the ST-Link / V2 and this has automatically installed the driver.

Then I connected the STM8-Discovery and lo and behold, it worked.

Thanks for your feedback!