summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-03-03 20:51:42 +0100
committerJF <jf@codingfield.com>2020-03-03 20:51:42 +0100
commitfd45746b8cdb13dc7b0bfc175b5d5829bcdd8a07 (patch)
tree6cde83829a16ae275c2a3abab101ea967a89f51a /README.md
parent545636940f68108a361dda85e0e48a240909cf29 (diff)
Add doc in README.md : how to flash using gdb
Diffstat (limited to 'README.md')
-rw-r--r--README.md54
1 files changed, 51 insertions, 3 deletions
diff --git a/README.md b/README.md
index f0040b80..2940dfd9 100644
--- a/README.md
+++ b/README.md
@@ -102,6 +102,7 @@ $ make -j pinetime-app
```
## How to program
+### Using make
* Erase
@@ -128,9 +129,56 @@ $ make FLASH_MERGED_pinetime-app
$ make help
```
-
-
-
+### Using GDB and a Black Magic Probe (BMP)
+You can use this procedure if you want to flash the firmware (from a release, for example) without having to build the project locally.
+
+Enter the following command into GDB:
+
+```
+target extended-remote /dev/ttyACM0
+monitor swdp_scan
+attach 1
+file ./pinetime-app-full.hex
+load
+run
+```
+
+*Note* : Sometimes, I need to run this procedure 2 times : the first time, the screen stays blank, and the second time, it works. This is something I'll need to debug...
+
+Example:
+```
+$ /home/jf/nrf52/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gdb
+
+(gdb) target extended-remote /dev/ttyACM0
+Remote debugging using /dev/ttyACM0
+(gdb) monitor swdp_scan
+Target voltage: ABSENT!
+Available Targets:
+No. Att Driver
+ 1 Nordic nRF52 M3/M4
+ 2 Nordic nRF52 Access Port
+
+(gdb) attach 1
+Attaching to Remote target
+warning: No executable has been specified and target does not support
+determining executable automatically. Try using the "file" command.
+0xfffffffe in ?? ()
+(gdb) file ./pinetime-app-full.hex
+A program is being debugged already.
+Are you sure you want to change the file? (y or n) y
+Reading symbols from ./pinetime-app-full.hex...
+(No debugging symbols found in ./pinetime-app-full.hex)
+(gdb) load
+Loading section .sec1, size 0xb00 lma 0x0
+Loading section .sec2, size 0xf000 lma 0x1000
+Loading section .sec3, size 0x10000 lma 0x10000
+Loading section .sec4, size 0x5150 lma 0x20000
+Loading section .sec5, size 0xa000 lma 0x26000
+Loading section .sec6, size 0x10000 lma 0x30000
+Loading section .sec7, size 0xdf08 lma 0x40000
+Start address 0x0, load size 314200
+Transfer rate: 45 KB/sec, 969 bytes/write.
+```
## RTT