* Parse Error - __irq
@ 2006-04-11 14:25 Bindu R
2006-04-11 15:46 ` Niklaus
0 siblings, 1 reply; 4+ messages in thread
From: Bindu R @ 2006-04-11 14:25 UTC (permalink / raw)
To: gcc-help; +Cc: gcc-help-help
Hi,
I want to know how use __irq (interruption) at
arm-elf-
gcc to ARM920T, i try to compile a C program with
this parameter (__irq) and it say "parse error".
Please can somebody help me or tell me about how i fix
it.
Thanks for your time.
Regards,
Bindu
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Parse Error - __irq
2006-04-11 14:25 Parse Error - __irq Bindu R
@ 2006-04-11 15:46 ` Niklaus
2006-04-12 6:32 ` Bindu R
0 siblings, 1 reply; 4+ messages in thread
From: Niklaus @ 2006-04-11 15:46 UTC (permalink / raw)
To: Bindu R; +Cc: gcc-help, gcc-help-help
On 4/11/06, Bindu R <catchdots@yahoo.com> wrote:
> Hi,
>
> I want to know how use __irq (interruption) at
> arm-elf-
> gcc to ARM920T, i try to compile a C program with
> this parameter (__irq) and it say "parse error".
> Please can somebody help me or tell me about how i fix
> it.
>
> Thanks for your time.
Please give the complete source code of the file and what output gcc -v gives.
>
> Regards,
> Bindu
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Parse Error - __irq
2006-04-11 15:46 ` Niklaus
@ 2006-04-12 6:32 ` Bindu R
2006-04-12 12:49 ` John Love-Jensen
0 siblings, 1 reply; 4+ messages in thread
From: Bindu R @ 2006-04-12 6:32 UTC (permalink / raw)
To: Niklaus; +Cc: gcc-help, gcc-help-help
Hi Niklaus,
Please find the content of header file(2410IIC.h):
void __irq IicInt(void);
Definition of corresponding irq in
2410IIC.c(filename)is as follows:
void __irq IicInt(void)
{
U32 iicSt,i;
rSRCPND = BIT_IIC; //Clear pending bit
rINTPND = BIT_IIC;
iicSt = rIICSTAT;
if(iicSt & 0x8){} //When bus arbitration
is failed.
if(iicSt & 0x4){} //When a slave address
is matched with IICADD
if(iicSt & 0x2){} //When a slave address
is 0000000b
if(iicSt & 0x1){} //When ACK isn't
received
switch(_iicMode)
{
case POLLACK:
_iicStatus = iicSt;
break;
case RDDATA:
if((_iicDataCount--)==0)
{
_iicData[_iicPt++] = rIICDS;
rIICSTAT = 0x90; //Stop
MasRx condition
rIICCON = 0xaf;
//Resumes IIC operation.
Delay(1); //Wait
until stop condtion is in effect.
//Too
long time...
//The
pending bit will not be set after issuing stop
condition.
break;
}
_iicData[_iicPt++] = rIICDS; //The
last data has to be read with no ack.
if((_iicDataCount)==0)
rIICCON = 0x2f;
//Resumes IIC operation with NOACK.
else
rIICCON = 0xaf;
//Resumes IIC operation with ACK
break;
case WRDATA:
if((_iicDataCount--)==0)
{
rIICSTAT = 0xd0; //Stop
MasTx condition
rIICCON = 0xaf;
//Resumes IIC operation.
Delay(1); //Wait
until stop condtion is in effect.
//The pending bit will not be
set after issuing stop condition.
break;
}
rIICDS = _iicData[_iicPt++];
//_iicData[0] has dummy.
for(i=0;i<10;i++); //for
setup time until rising edge of IICSCL
rIICCON = 0xaf;
//resumes IIC operation.
break;
case SETRDADDR:
// Uart_Printf("[ S%d ]",_iicDataCount);
if((_iicDataCount--)==0)
break; //IIC
operation is stopped because of IICCON[4]
rIICDS = _iicData[_iicPt++];
for(i=0;i<10;i++); //For
setup time until rising edge of IICSCL
rIICCON = 0xaf;
//Resumes IIC operation.
break;
default:
break;
}
}
Output of gcc:
linux>> arm-elf-gcc -c -g -mcpu=arm920t
-mlittle-endian -mapcs 2410IIC.c
linux>> 2410IIC.h; parse error before 'IicInt'
linux>> 2410IIC.c; parse error before 'IicInt'
--- Niklaus <niklaus@gmail.com> wrote:
> On 4/11/06, Bindu R <catchdots@yahoo.com> wrote:
> > Hi,
> >
> > I want to know how use __irq (interruption) at
> > arm-elf-
> > gcc to ARM920T, i try to compile a C program with
> > this parameter (__irq) and it say "parse error".
> > Please can somebody help me or tell me about how i
> fix
> > it.
> >
> > Thanks for your time.
> Please give the complete source code of the file and
> what output gcc -v gives.
> >
> > Regards,
> > Bindu
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Parse Error - __irq
2006-04-12 6:32 ` Bindu R
@ 2006-04-12 12:49 ` John Love-Jensen
0 siblings, 0 replies; 4+ messages in thread
From: John Love-Jensen @ 2006-04-12 12:49 UTC (permalink / raw)
To: Bindu R, Niklaus; +Cc: MSX to GCC, gcc-help-help
Hi Bindu,
What is __irq defined as? (I don't care about IicInt.)
You should have something like this somewhere:
#define __irq magic_something_here
Example:
#define __irq __attribute__((interrupt("IRQ"))
q.v.
http://www.ohse.de/uwe/articles/gcc-attributes.html#func-interrupt
Thanks,
--Eljay
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-04-12 12:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 14:25 Parse Error - __irq Bindu R
2006-04-11 15:46 ` Niklaus
2006-04-12 6:32 ` Bindu R
2006-04-12 12:49 ` John Love-Jensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).