summaryrefslogtreecommitdiffstats
path: root/electronics
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@twinleaf.com>2014-06-30 10:20:36 -0400
committerbryan newbold <bnewbold@twinleaf.com>2014-11-05 23:24:28 -0800
commit9ab3e8b83ab0a5535b2c4fb20983443b19a52c20 (patch)
tree169629c4a779250a4bfdf34fd6ab3887c6ff95a3 /electronics
parent019d98f79149da41ee6a12f86e850d49eaff793d (diff)
downloadknowledge-9ab3e8b83ab0a5535b2c4fb20983443b19a52c20.tar.gz
knowledge-9ab3e8b83ab0a5535b2c4fb20983443b19a52c20.zip
stm32: quick debug and upload notes
Diffstat (limited to 'electronics')
-rw-r--r--electronics/stm32.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/electronics/stm32.txt b/electronics/stm32.txt
new file mode 100644
index 0000000..6785840
--- /dev/null
+++ b/electronics/stm32.txt
@@ -0,0 +1,32 @@
+
+Debugging
+================
+
+Access all registers:
+
+ (gdb) x/x 0xE000ED14
+ 0xe000ed14: Cannot access memory at address 0xe000ed14
+ (gdb)
+ 0xe000ed18: Cannot access memory at address 0xe000ed18
+ (gdb) show mem inaccessible-by-default
+ Unknown memory addresses will be treated as inaccessible.
+ (gdb) set mem inaccessible-by-default off
+ (gdb) x/x 0xE000ED14
+ 0xe000ed14: 0x00000200
+
+Uploading via SWD
+====================
+
+upload_blackmagic.sh:
+
+ #!/bin/bash
+ arm-none-eabi-gdb build/stm32f401cc_telemetry.elf < load_blackmagic.gdb
+ sleep 1.0
+
+load_blackmagic.gdb:
+
+ target extended-remote /dev/ttyACM0
+ monitor swdp_scan
+ attach 1
+ load
+ quit