[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] Re: follow up on return from interrupt
From: |
Keith Gudger |
Subject: |
[Simulavr-devel] Re: follow up on return from interrupt |
Date: |
Tue, 2 Dec 2003 13:00:59 -0800 (PST) |
Ted:
I checked it out, and it works as advertised. I can't say for sure that
it doesn't break something else, but it should not.
Do you have any ideas about my previous problem of why I get an I/O read
before simulavr even gets attached? Here's the output:
./simulavr -g -d atmega128
Simulating a atmega128 device.
MESSAGE: file decoder.c: line 3517: generating opcode lookup_table
Enter 9 bits of hex data to read into the uart at address 0x002c:
This happens before the gdb client has done "target remote :1212". It
only happens with the UART in I/O space - the UART1 in RAM space does not
get its read routine called.
The 'C' code that is getting called:
static uint8_t uart_read( VDevice *dev, int addr )
{
UART_T *uart = (UART_T *)dev;
UARTIntr_T *uart_t;
int offset = addr - vdev_get_base(dev);
uart_t = (UARTIntr_T *)avr_core_get_vdev_by_name(
(AvrCore *)vdev_get_core((VDevice *)uart),
uart->int_name );
if ( offset == UART_UDR_ADDR )
{
uart_t->usr &= ~mask_RXC ; /* clear RXC bit in USR */
return uart->udr_rx = uart_port_rd( addr );
}
...
Any ideas as to why this gets called when the vdev gets instantiated?
Thanks.
Keith
On Tue, 2 Dec 2003, Theodore A. Roth wrote:
> Keith,
>
> Did you get a chance to see if this patch works?
>
> Ted Roth