simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] gdbinit for raising interrupts.


From: Marko Panger
Subject: Re: [Simulavr-devel] gdbinit for raising interrupts.
Date: Sun, 02 Nov 2003 16:34:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031014 Thunderbird/0.3

Yesterday night I tried the latest CVS version with the rising irq patch included and it works great.

1) I just like to ask why the interrupt vector numbering in avr-libc and the one in the mega128 datasheet isn't the same. For example timer0 output compare interrupt is on vector nr. 10, according to the datasheet and if I would like to trigger this interrupt from gdb I have to rise irq_9. At the same time the same interrupt is defined on vector 15 avr-gcc (__vector_15) ? A little bit confusing or I am just looking at thins from a bad angle ?

Anyway I am able to trigger interrupts and I am just happy ! Thanks.

2) Regarding the timer0 functionality I have made a simple program which stays in a while(2) loop and waits timer0 output comapre function to trigger my interrupt handler but nothing happens.




Theodore A. Roth wrote:

Hi,

To make raising interrupts from gdb a little easier, add the attached dot_gdbinit_irq to your .gdbinit file and you will then have new gdb commands for raising interrupts 1-34 via the raise irq patch I just committed for simulavr.

So, to raise irq vector 18, you just type 'irq_18' at the gdb prompt. That should be simpler than trying to figure it out yourself.

The attached irq.py python script is what I used to generate the dot_gdbinit_irq defines as such:

 $ ./irq.py > dot_gdbinit_irq

Or you could do this:

 $ ./irq.py >> ~/.gdbinit

Enjoy.

Ted Roth
------------------------------------------------------------------------


define irq_1
 signal SIG81
end

define irq_2
 signal SIG82
end

define irq_3
 signal SIG83
end

define irq_4
 signal SIG84
end

define irq_5
 signal SIG85
end

define irq_6
 signal SIG86
end

define irq_7
 signal SIG87
end

define irq_8
 signal SIG88
end

define irq_9
 signal SIG89
end

define irq_10
 signal SIG90
end

define irq_11
 signal SIG91
end

define irq_12
 signal SIG92
end

define irq_13
 signal SIG93
end

define irq_14
 signal SIG94
end

define irq_15
 signal SIG95
end

define irq_16
 signal SIG96
end

define irq_17
 signal SIG97
end

define irq_18
 signal SIG98
end

define irq_19
 signal SIG99
end

define irq_20
 signal SIG100
end

define irq_21
 signal SIG101
end

define irq_22
 signal SIG102
end

define irq_23
 signal SIG103
end

define irq_24
 signal SIG104
end

define irq_25
 signal SIG105
end

define irq_26
 signal SIG106
end

define irq_27
 signal SIG107
end

define irq_28
 signal SIG108
end

define irq_29
 signal SIG109
end

define irq_30
 signal SIG110
end

define irq_31
 signal SIG111
end

define irq_32
 signal SIG112
end

define irq_33
 signal SIG113
end

define irq_34
 signal SIG114
end
------------------------------------------------------------------------

#! /usr/bin/env python

BASE_IRQ = 80

for i in range(1,35):
   print
   print "define irq_%d" % (i)
   print "  signal SIG%d" % (BASE_IRQ+i)
   print "end"
------------------------------------------------------------------------

_______________________________________________
Simulavr-devel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/simulavr-devel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]