Heads Up: GDB ARM instruction debugger project

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Heads Up: GDB ARM instruction debugger project

Post 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.
bullestock
Posts: 27
Joined: 29 Sep 2010, 19:34
Location: Denmark
Contact:

Re: Heads Up: GDB ARM instruction debugger project

Post by bullestock »

Sounds very interesting!
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Re: Heads Up: GDB ARM instruction debugger project

Post by schodet »

I am definitely interested in this :)

I should be able to setup a write access to my repository if you want.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Heads Up: GDB ARM instruction debugger project

Post 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.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests