cancel
Showing results for 
Search instead for 
Did you mean: 

Does ST Link Command Line Interface (CLI) work?

Posted on June 22, 2018 at 21:29

Humph. I'm running Windows 7 64 bit, and when I run CLI, it just shuts down after listing the option bytes commands. Anyone have some experience that can help? I did restart the computer after updating to 3.2.0.0, to no avail.

I've been using the ST Link V2 pod successfully, and I've used JLink Commander (Segger's command line interface) to program boards and set read protect, but it looks like CLI will be much easier in a production setting. 

Thanks for any help!

#cli #stlinkcommand #commandline
2 REPLIES 2
Bob S
Principal
Posted on June 22, 2018 at 22:21

Yes, for me at least, though I'm on Win10 not Win7.  Though it does not have an 'interactive' mode where you can enter a command, see the response and then enter another command.  All commands must be given on the command line.  For example:

st-link_cli -c SWD UR Freq=400 -r8 0x08000000 20

Displays 32 bytes from the start of FLASH memory on the cpu (STM32L433).  Yes, the 'length' parameter appears to be interpreted as hex even without a leading '0x'.  You can chain commands like this to set several option bytes;

So if you are trying to look at the option registers then update them, you can do something like this:

st-link_cli -c SWD UR Freq=400 -rOB -OB BOR_LEV=1 nRST_STDBY=0 -rOB

That displays the current option byte settings, updates some settings and then displays the modified settings.

Posted on June 23, 2018 at 00:01

Doh! I thought that might be the case, like w/ nrfjprog tools, but didn't catch anything about st-link_cli in the manual. 

I'll try that on Monday, but I bet that's it. 

Thanks a ton Bob, and have a great weekend,

Scott