2
2
3
3
https://github.com/makerdiary/nrf52840-mdk
4
4
5
- ## flashing and printing with probe-run
5
+ ## flashing with cargo flash
6
6
7
- This is the recommended way to go.
7
+ This is the recommended way to go for flashing
8
8
9
- * Install the dependencies for[ probe-run] ( https://crates.io/crates/probe-run )
9
+ * Install the dependencies for[ cargo-flash] ( https://crates.io/crates/cargo-flash )
10
+ * Install probe-run ` cargo install cargo-flash `
11
+
12
+ Then simply ` cargo flash --release --example blinky `
13
+
14
+ ## debugging with probe-run
15
+
16
+ This is the recommended way to go for debugging
17
+
18
+ * Install the dependencies for[ probe-run] ( https://crates.io/crates/probe-run ) (same as for cargo-flash if you already have that)
10
19
* Install probe-run ` cargo install probe-run `
11
20
* On linux you need udev rules saved to somewhere like /etc/udev/rules.d/50-cmsis-dap.rules
12
21
@@ -40,30 +49,15 @@ stack backtrace:
40
49
9: 0x00000156 - Reset
41
50
```
42
51
43
- Note fresh out of the box devices seem to need to be erased
44
-
45
- ``` bash
46
- Error: Error while flashing
47
- Caused by:
48
- The execution of ' erase_sector' failed with code 103
49
- ` ` `
50
-
51
- Install some other tool like cargo-flash or pyocd one time and
52
-
53
- ` ` ` bash
54
- pip3 install pyocd
55
- pyocd erase -t nrf52840 --chip
56
- ` ` `
57
-
58
- # # OpenOCD
52
+ ## Debugging with OpenOCD
59
53
60
54
I was unable to get this working with the openocd that ships with
61
55
ubuntu 18.04, but was able to hook up SWD to my JLink. This thread
62
56
is someone else having similar issues:
63
57
64
58
https://devzone.nordicsemi.com/b/blog/posts/debugging-on-nrf52840-with-gdb-from-cli-on-linux
65
59
66
- # # JLink
60
+ ## Debugging with JLink
67
61
68
62
I hooked up my JLink using one of these breakouts:
69
63
https://www.adafruit.com/product/2743
@@ -77,6 +71,10 @@ https://www.adafruit.com/product/2743
77
71
| TDO | SWO |
78
72
| GND | GND x 3 |
79
73
74
+ * Uncomment the ` arm-none-eabi-gdb ` runner in .cargo/config
75
+ * Start your gdbserver
76
+ * use ` cargo run `
77
+
80
78
## License
81
79
82
80
Licensed under either of
0 commit comments