Page 1 of 1

Heads Up: GDB ARM instruction debugger project

Posted: 22 Nov 2010, 09:07
by tcwan
Hi,

I'm letting folks know that I'm currently working on implementing ARM Assembly level instruction debugger support via GDB. This is a software-only debugger (i.e., no need for a JTAG interface) that I plan to release under the GPL. The project is currently at the preliminary phase.

My rationale for doing so is because I'll be using the NXT to teach assembly language programming for ARM processors to CS majors, where the JTAG requirement would be too expensive as well as inconvenient.

Credit for the original concept goes to nxtgcc (Rasmus Pedersen). Currently I'm developing it for the NxOS code base, though I'm keen to get it into the {enhanced, nxt-improved, nxtgcc} LEGO NXT firmware so that there would be a wider audience.


The way the ARM debugger works is as follows:

Code: Select all

[GDB for ARM target] <--TCP/IP--> [GDB Server] <--- USB / Bluetooth? ---> [NXT]
GDB Server Host platform: Ideally cross-platform, target POSIX (Mac OSX / Linux) environment
Compiler: GCC based Assembler / C Compiler
Connection: USB (though Bluetooth may be possible in future)

The project will involve developing the following modules:
  • - NXT ARM Breakpoint instruction exception handler (done)
    - NXT ARM Remote Debugger Stub (preliminary work started, need to coordinate with GDB Server message protocol specification)
    - NXT USB Stack (specification stage -- I'd welcome suggestions on the best approach, esp. wrt. portability / reusability between NxOS and NXT firmware, and also which USB Profile is most suitable)
    - GDB Server with USB support (need design & Debug Message protocol specification, no code yet)
I have source files available for the parts I've done, though I'm not sure what is the best way to share it with others. I can do a 'git push' to Nicolas Schodet if he's willing to accept it. If anyone is interested to collaborate on the GDB server portion please let me know.

Re: Heads Up: GDB ARM instruction debugger project

Posted: 22 Nov 2010, 20:45
by bullestock
Sounds very interesting!

Re: Heads Up: GDB ARM instruction debugger project

Posted: 23 Nov 2010, 20:27
by schodet
I am definitely interested in this :)

I should be able to setup a write access to my repository if you want.

Re: Heads Up: GDB ARM instruction debugger project

Posted: 24 Nov 2010, 01:58
by tcwan
Hi Nico,

Write access would be nice :0)
Please correspond with me via email wrt. repository access details.
Right now I have some code but not tested yet.

I'm not familiar with the NXT firmware so it would be good if you could look it over first and comment on how to best integrate it.