r/flipperzero • u/VVr3nch Community Manager • Oct 24 '24
How to debug an ARM MCU firmware using Flipper Zero
With the DAP Link app, Flipper Zero can be turned into a tool for debugging firmware on ARM MCU-based devices. You can flash the firmware to the MCU and control the program's execution: set breakpoints, execute the program step by step, and view MCU memory.
Try debugging via the DAP Link app:
- Install the DAP Link app on your Flipper Zero from the Apps Catalog.
- Open the DAP Link app and go to Config > Help and Pinout.
- Connect your target device to the Flipper Zero using wires, following the pinout shown in the app. You'll need to connect the SWC, SWD, GND, and 3.3V pins.
- Go back to the main screen of the DAP Link app.
- Connect the Flipper Zero to your PC using a USB cable.
6m In your IDE, open the firmware project.
7. Choose CMSIS-DAP as the debug probe and start the debug session.
The DAP Link app also supports the USB-to-serial adapter function. To find Flipper Zero pins used for serial connection, go to Help and Pinout in the DAP Link app.
Interesting fact: Flipper Zero is also based on an ARM MCU, so you can use it as a debug probe for another Flipper Zero.
23
u/Qazax1337 Oct 24 '24
Finally a post that isn't "Tell me why I should buy the flipper" and "Can I hack Microsoft with the flipper"
Great post :)
1
u/Keladran0 Oct 24 '24
this is so cool! is there one for the STM32 swd interface?