Skip to content

Commit 07004eb

Browse files
committed
Unify bringup and flashing docs
1 parent 2095b02 commit 07004eb

File tree

3 files changed

+42
-32
lines changed

3 files changed

+42
-32
lines changed

doc/src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[Hangman](./README.md)
44

55
- [Development]()
6-
- [Flashing](./flashing.md)
76
- [Hardware]()
87
- [Assembly](./assembly.md)
98
- [Bringup](./bringup.md)

doc/src/bringup.md

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,41 @@
1-
# Bringup
1+
# Bringup
22

3-
How to get the board from being assembled to being functional, using Windows, WSL and a ST-Link
3+
How to get the board from being assembled to being functional
4+
5+
## nRF Command Line Tools + Segger J-Link
6+
7+
Note that Nordic encourages the use of the nRF Util over nrfjprog. I've found nrfjprog to be more
8+
reliable in the past and haven't migrated to nRF Util, but it's probably not too hard to figure out
9+
the equivalent commands.
10+
11+
### Prereqs
12+
13+
* Obtain a Segger J-Link debugger
14+
* Download the [nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools)
15+
* Download the SoftDevice s113 from <https://www.nordicsemi.com/Products/Development-software/S113>
16+
17+
### Instructions
18+
19+
1. Connect your debugger.
20+
1. Flash the SoftDevice. This generally only needs to be done once.
21+
22+
```sh
23+
nrfjprog --family nrf52 --program s113_nrf52_7.2.0_softdevice.hex --chiperase --verify --reset
24+
```
25+
26+
Your .hex filename may differ.
27+
1. Flash the hangman firmware:
28+
29+
```sh
30+
DEFMT_LOG=info cargo run --release --bin proto1_0 --features nrf52832
31+
```
32+
33+
## Windows + ST-Link
34+
35+
Instructions using Windows, WSL and a ST-Link
36+
37+
### Requirements
438

5-
## Requirements on Windows ##
639
- Working WSL2
740
- ST-Link, with installed drivers (I used a ST-Link V2-1, borrowed from a Nucleo Board)
841
- Install usbipd-win on windows: run `winget install --interactive --exact dorssel.usbipd-win` in a windows terminal
@@ -13,7 +46,8 @@ How to get the board from being assembled to being functional, using Windows, WS
1346
- Download the SoftDevice for the chip from NRF (I used s113_nrf52_7.3.0_softdevice.hex)
1447

1548

16-
## Flashing on Windows ##
49+
### Flashing
50+
1751
- Connect the ST-Link
1852
- Follow these instructions to get the ST-Link connected to WSL: https://learn.microsoft.com/de-de/windows/wsl/connect-usb
1953
- `usbipd list`
@@ -30,10 +64,12 @@ How to get the board from being assembled to being functional, using Windows, WS
3064
- Build and flash the code with `cargo run --bin proto1_0 --release`
3165
- Done! Further flashing etc. should not require reflashing the SoftDevice
3266

33-
### Notes:
67+
### Notes
68+
3469
- If you just want to flash the softdevice in one command you can do it like this: `openocd -f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/nrf52.cfg -c "init; halt; nrf5 mass_erase; program /full/path/.../s113_nrf52_7.3.0_softdevice.hex preverify verify; shutdown"`
3570

36-
### Sources:
71+
### Sources
72+
3773
- https://www.jentsch.io/nrf51822-flashen-mit-st-link-v2-und-openocd/
3874
- https://github.com/seemoo-lab/openhaystack/wiki/Flashing-nRF-with-OpenOCD---ST-Link
3975
- https://github.com/lupyuen/stm32bluepill-mynewt-sensor/blob/nrf52/scripts/nrf52/flash-boot.sh
@@ -44,4 +80,3 @@ How to get the board from being assembled to being functional, using Windows, WS
4480
- https://hackmd.io/@aeefs2Y8TMms-cjTDX4cfw/r1fqAa_Da
4581
- https://learn.microsoft.com/de-de/windows/wsl/connect-usb
4682

47-

doc/src/flashing.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)