As I understand, on linux systems debugging is done via the ptrace sys-call.
I would like to know how would I write a debugger for a micro-controller (no-OS).
Let us for the sake of simplicity assume the case of a software debugger for a board like Arduino Due (ARM based).
- What would I have to learn to accomplish such a project, assuming I have a fair idea on how debuggers work on Linux and Windows
- How different would programming a debugger for a MCU system be? (I can't use sys-calls)
- Is debugging achievable via USB or serial interface?
- Which languages should I use? (C, C++, Arm assembly)
- How can the armgcc compiler help me with my project (are there flag options such as -g etc?)
I plan to implement the debugger as a command line Linux utility.
target remote. The protocol consists essentially of text packets beginning in$, followed by a command and its arguments, and ended with#and a checksum.