From f331e5a10dc94f9bda20cfcd1c3b348f0ba4cb27 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 11 Jun 2016 17:32:25 -0400 Subject: merge stm32 stuff into a proper page --- electronics/microcontrollers.page | 5 ---- electronics/stm32.page | 52 +++++++++++++++++++++++++++++++++++++++ electronics/stm32.txt | 49 ------------------------------------ 3 files changed, 52 insertions(+), 54 deletions(-) create mode 100644 electronics/stm32.page delete mode 100644 electronics/stm32.txt (limited to 'electronics') diff --git a/electronics/microcontrollers.page b/electronics/microcontrollers.page index 92b91dd..f036a9f 100644 --- a/electronics/microcontrollers.page +++ b/electronics/microcontrollers.page @@ -28,8 +28,3 @@ it was an MIT AI Lab project. A real time operating system written in C (VENUS) runs on the metal and an L framework called MARS coordinates message/event handling between multiple agents. It was written for robotic research. -ARM Cortex-M3/4 Stuff -------------------------- - - - - - "STM32/ARM Cortex-M3 HOWTO: Development under Ubuntu (Debian)" (from fun-tech.se: diff --git a/electronics/stm32.page b/electronics/stm32.page new file mode 100644 index 0000000..4c1c200 --- /dev/null +++ b/electronics/stm32.page @@ -0,0 +1,52 @@ + +Memory Utilization +===================== + +`text` is what ends up in flash (only). +`data` is initialized variables: need to be storad in flash, then end up in RAM. +`bss` is uninitialized data: nothing in flash, but does consume RAM. + +The `-x --format=sysv` flags to `arm-none-eabi-size` can be helpful. + +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_project.elf < load_blackmagic.gdb + sleep 1.0 + +`load_blackmagic.gdb`: + + target extended-remote /dev/ttyACM0 + monitor swdp_scan + attach 1 + load + quit + +References +============= + +Keil Application Note 209: Using Cortex-M3 and Cortex-M4 Fault Exceptions + +ARM Cortex-M3 HardFault Status Register Documentation: + + +"STM32/ARM Cortex-M3 HOWTO: Development under Ubuntu (Debian)" (from fun-tech.se: + diff --git a/electronics/stm32.txt b/electronics/stm32.txt deleted file mode 100644 index d8b817c..0000000 --- a/electronics/stm32.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Memory Utilization -===================== - -'text' is what ends up in flash (only). -'data' is initialized variables: need to be storad in flash, then end up in RAM. -'bss' is uninitialized data: nothing in flash, but does consume RAM. - -The "-x --format=sysv" flags to arm-none-eabi-size can be helpful. - -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 - -References -============= - -Keil Application Note 209: Using Cortex-M3 and Cortex-M4 Fault Exceptions - -ARM Cortex-M3 HardFault Status Register Documentation: -http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/Cihdjcfc.html -- cgit v1.2.3