Skip to content

Commit 383f997

Browse files
committed
docs(README): Add a section on STLink
1 parent 91932ac commit 383f997

1 file changed

Lines changed: 32 additions & 9 deletions

File tree

README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,23 @@ Program a nRF51822
9999
To flash an application to a nRF51822 BLE chip, there is some setup
100100
you must do.
101101

102-
1. Install the [`arm-none-eabi-gcc`](https://launchpad.net/gcc-arm-embedded) compiler.
102+
First, install the [`arm-none-eabi-gcc`](https://launchpad.net/gcc-arm-embedded) compiler.
103103

104104
On Ubuntu:
105105

106106
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
107107
sudo apt-get update
108108
sudo apt-get install gcc-arm-embedded
109109

110-
2. Install the JLink [software](https://www.segger.com/jlink-software.html)
110+
### With JLink
111+
112+
1. Install the JLink [software](https://www.segger.com/jlink-software.html)
111113
for your platform. You want the "Software and documentation pack".
112114

113-
3. Acquire a [JLink JTAG programmer](https://www.segger.com/jlink-general-info.html).
115+
2. Acquire a [JLink JTAG programmer](https://www.segger.com/jlink-general-info.html).
114116
The "EDU" edition works fine.
115117

116-
4. Program an app! With the JLink box attached to the target board:
118+
3. Program an app! With the JLink box attached to the target board:
117119

118120
make flash
119121

@@ -122,12 +124,33 @@ The "EDU" edition works fine.
122124

123125
make erase-all
124126

125-
See the [make](https://github.com/lab11/nrf5x-base/tree/master/make) folder
126-
for a complete list of commands.
127+
### With STLink/v2
128+
129+
1. Install [openocd](http://openocd.org/), an On-Chip Debugging / In-System Programming tool.
130+
131+
On Ubuntu:
132+
133+
sudo apt-get install openocd
134+
135+
2. Get a [STLink/v2 programmer](http://www.st.com/en/development-tools/st-link-v2.html).
136+
There are also popular unofficial versions described [here](http://wiki.sgmk-ssam.ch/wiki/STM32_dev#ST-Link_V2_Programmer) in more detail.
137+
138+
3. Add `PROGRAMMER = stlinkv2` to your Makefile.
139+
140+
4. Program an app! With the STLink attached to the target board:
141+
142+
make flash-softdevice # only necessary the first time, after erase of if you change the softdevice
143+
make flash
144+
145+
will write the app and softdevice to the nRF51822. You can erase
146+
a chip with:
147+
148+
make erase-all
149+
150+
151+
See the [make](https://github.com/lab11/nrf5x-base/tree/master/make) folder for a complete list of commands.
127152

128-
Most of our boards use a [TagConnect header](http://www.tag-connect.com/TC2030-IDC-NL)
129-
instead of the way-too-large ARM JTAG header. We use [our own](https://github.com/lab11/jtag-tagconnect)
130-
adapter, but Segger also makes [one](https://www.segger.com/jlink-6-pin-needle-adapter.html).
153+
Most of our boards use a [TagConnect header](http://www.tag-connect.com/TC2030-IDC-NL) instead of the way-too-large ARM JTAG header. We use [our own](https://github.com/lab11/jtag-tagconnect) adapter, but Segger also makes [one](https://www.segger.com/jlink-6-pin-needle-adapter.html).
131154

132155

133156
Git Submodules

0 commit comments

Comments
 (0)