Rockbox

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Catalin Patulea - 2008-01-13

FS#8454 - Implement debug() for ARM architectures via JTAG DCC

The ARM hardware debugger via JTAG spec (EmbeddedICE) specifies a sideband channel for target↔debugger communication called DCC (Debug Communications Channel). openocd, an open-source debugger compatible with the EmbeddedICE standard, supports using this channel for textual debug messages from the target.

The attached patch implements the target side of this channel. Messages can be enabled in openocd using the “target_request debugmsgs enable” command.

WARNING: If -DDEBUG is enabled and there is no hardware debugger attached to drain the DCC buffer, debug() becomes very slow because it has to wait for the writes to time out. However, this is unlikely to happen because -DDEBUG isn’t typically enabled for target builds.

Fix for "Error: selected processor does not support `bkpt 0'" on non-arm9ej-s architectures (like arm9tdmi).

Oh, and this patch also fixes some concurrency issues with debugf (which is not reentrant because of the static printf buffer).

Now also fixes "undefined reference to `debug_init'" for Normal (as opposed to Bootloader) builds.

Once more with passion! (Fix double-newlines due to openocd appending a newline.)

ranma commented on 2010-10-15 13:43

I tried your patch, it works fine. With mit USB JTAG interface it's very slow though. Probably more due to USB roundtrip times than JTAG speed (6MHz).
Because it's so slow I think it would be more appropriate to modify logf, as logf is enabled on a file by file basis, whereas debugf is sprinkled all over the place I think.
There would probably need to be an "Enable logf over jtag DCC" configure option because of the long timeouts when no jtag debugger is attached.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing