HACKING.md
-
Open the binary in Ghidra, setting the architecture to ARM Cortex little-endian
-
Open it in debugger view
-
In the Window->Memory Map tool, create maps for the flash, its mirror, and ram based on datasheet - NationalSecurityAgency/ghidra#2578 (comment)
-
Analyse code
-
Install gdb-multiarch, openocd, and connect to the running device as normal
-
In Ghidra, create a new debugger(gdb-multiarch) connection in "Debugger Targets" pane
-
target remote localhost:3333
-
Click Record on the process in inferiors in Objects panel/tab, arch: ARM Cortex little
-
Resume execution
-
In the Modules panel, click the button "Map the current trace to blabla".
-
Now you can set breakpoints, watchpoints, and whenever they're hit, Ghidra will show you where in the binary it happened