avarice
avarice copied to clipboard
[patch #6] IDR (OCDR) support
tsirc <None> 2007-02-24 19:05:34
The attached short patch enables support for the I/O Debug Register (IDR). The result is that any byte written to the On-chip Debug Register (OCDR) will appear on stdout of the avarice process. Other options exist, such as sending a `O' console-output packet to GDB, but I prefer stdout. Following is an example of how to use this feature with avr-libc.
Cheers, Shaun
#include <avr/io.h> #include <stdio.h>
static int ocd_putchar(char c, FILE *stream) { (void)stream; while (OCDR & 1<<IDRD); OCDR = c; return 0; }
int main() { static FILE ocdout = FDEV_SETUP_STREAM(ocd_putchar, NULL, _FDEV_SETUP_WRITE); stdout = &ocdout; puts("Hello, world!"); return 0; }
This issue was migrated from https://sourceforge.net/p/avarice/patches/6/
joerg_wunsch 2008-05-26 11:54:29
Logged In: YES user_id=1097648 Originator: NO
This has been obsoleted with the user-configurable ICE event handling as of revision 1.8 of src/jtag2run.cc. The major difference now is that a user break to the debugger is synthesized upon receiving an IDE dirty event. Would it make more sense to just continue looping for further events in that case? The current solution appears to be a bit more flexible to me (because the code could contain "controlled break to debugger" statements) but it's slower in case you just want to continue.
joerg_wunsch 2008-05-26 11:54:30
- assigned_to: nobody --> joerg_wunsch
- status: open --> pending-out-of-date
sf-robot 2008-06-10 02:20:22
Logged In: YES user_id=1312539 Originator: NO
This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
sf-robot 2008-06-10 02:20:22
- status: pending-out-of-date --> closed-out-of-date