cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK Commandline Tool

micha
Associate
Posted on August 09, 2010 at 08:41

ST-LINK Commandline Tool

3 REPLIES 3
LaurentL
ST Employee
Posted on May 17, 2011 at 14:01

Hello,

First, there is an issue in the protocol in your command line, on STM32, you should use JTAG or SWD, not SWIM (only for STM8).

I suppose it is a copy paste issue. ;)

For your programming issue, there has been a correction in latest version of STVP (ST Visual Programmer).

Download the latest ST toolset with latest STVP version (3.2.1), it should work.

Another workaround is to recopy the APISample.exe and your 2 hex file in STVP directory.

If you still have the issue, your flash is not virgin.

If you want to reprogram a device, i suggest you add the ''-erase'' command.

I just tried this twice, it is working fine:

APISample.exe -BoardName=ST-LINK -Device=STM32F103xB -Port=USB -ProgMode=SWD -no_loop -no_log -FileProg=STM32F103xB_prog.hex -FileOption=STM32F103_option.hex -erase

Here is the result:

Configuration:

BoardName=ST-LINK Device=STM32F103xB Port=USB ProgMode=SWD

>>> Loading file STM32F103xB_prog.hex in PROGRAM MEMORY

>>> Loading file STM32F103_option.hex in OPTION BYTE

>>> Erasing PROGRAM MEMORY

(API) WARNING :   Mass Erasing device...

(API) WARNING :   Blank Checking device...

<<< Erasing PROGRAM MEMORY succeeds

>>> Programming PROGRAM MEMORY

<<< Programming PROGRAM MEMORY succeeds

>>> Verifying PROGRAM MEMORY

<<< Verifying PROGRAM MEMORY succeeds

>>> Programming OPTION BYTE

<<< Programming OPTION BYTE succeeds

>>> Verifying OPTION BYTE

<<< Verify OPTION BYTE succeeds

Regards,

Laurent

micha
Associate
Posted on May 17, 2011 at 14:01

Ok,

it works with the new toolkit.

Thank you

Regards

Mike

pwootton
Associate
Posted on May 17, 2011 at 14:01

Is there anyway to reset and run the device with this API?