This package consumes the following services:
atom-stlink - stlink V2 integration for Atom
This package allows you to flash your STM32/stlink V2 device from within Atom using stlink. It is meant as an extension to the build-med to allow flashing the results from the mbed-cli
build process.
Features
- Configuration dialog to configure target file, board serial etc. on per project basis (configuration is written to
stlink_settings.json
). - Flash
.hex
or.bin
file - Erase flash
Prerequisites
To use stlink, make sure you installed the st-flash
and st-info
binaries on your system. See instructions here on how to get the binaries.
Installation
To install this package from the package repository:
apm install stlink
Or install from git:
cd $HOME/$MY_GIT_REPOS
git clone https://github.com/wendlers/atom-stlink
Change into the newly cloned directory and link the package into your atom install:
cd atom-stlink
apm link
Next, install required node packages:
apm install
Now, when you start your atom next time, you might be asked to install the some dependencies.
Usage
Quick Start
- Connect your board
- Open a project for your board in Atom. Compile it to a
.hex
or.bin
file (if you use mbed-cli and like to compile directly from Atom, you might want to try the build-med package). - Configure stlink for your project by opening the stlink panel with
shift+alt+p
(or from right click menu and selectingstlink: toggle
). - In the configuration panel at least specify a
file
to flash (and aaddress
if a .bin file is used). - Now hit
flash
or pressshift-alt-s
to flash your board. - Flashing progress is indicated by the spinning busy indicator in the right bottom corner.
Configuration Parameters
The following could be set in the stlink panel:
- The
board serial
which is only needed if you have more than one board connected. - The
file
to flash. Could be a .bin or .hex file. - If the
reset
switch is turned on, the board will be reset after flashing is done.
In the package settings the following could be configured:
st-flash binary
: name and optional path for the st-flash tool which comes with stlink.st-info binary
: name and optional path for the st-info tool which comes with stlink.
Available Functions
The following functions could be performed (from the stlink panel,the menu, the context-menu or by keyboard shortcut):
- toggel stlink panel (
shift+alt+p
): open the stlink panel - flash (
shift-alt-s
): flash specified file - erase (
shift-alt-e
): erase chip