Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq(hello my self savan chauhan, i use eclipse kepler and mars also both have similar kind of error with interrupt function,when i use __irq that time eclipse throws error.)
Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq [message #1719923] Wed, 13 January 2016 09:17 Go to next message
savan chauhan is currently offline savan chauhanFriend
Messages: 2
Registered: January 2016
Junior Member
void UART0Interrupt (void) __irq //Read from UART0
unsigned char temp_U0RBR;

if(U0LSR & 0x01) //RDA Int Enable
flg_Rxd0_Receive = 1;

temp_U0RBR = U0RBR; //Reset RDA Int
flg_Rxd0_Receive = 1;


VICVectAddr = 0;


i didnt get isr properly it throws an error.
  • Attachment: interrupts.c
    (Size: 12.11KB, Downloaded 268 times)
Re: Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq [message #1719994 is a reply to message #1719923] Wed, 13 January 2016 15:56 Go to previous messageGo to next message
David VavraFriend
Messages: 1430
Registered: October 2012
Senior Member
Gosh. You did something; don't bother saying what; got an error; give no clue what it might be; and still want answers?

What is throwing the error?
What is the error?

Is it in your title: "Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq"?

Are we to assume interrupts.c is the actual code you are using? If so, I noticed you commented out "__irq". Why was it there in the first place? Whose code is it? What's it for? GCC doesn't know what it means. Maybe you want another compiler (like for ARM)?

A little more information is needed like

    stating what is the exact error message is;
    what you are actually doing: running? debugging?;
    where and how you are seeing the message.
    Posting it would be nice.

We shouldn't have to guess.

[Updated on: Wed, 13 January 2016 15:57]

Report message to a moderator

Re: Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq [message #1720003 is a reply to message #1719994] Wed, 13 January 2016 16:23 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 725
Registered: August 2014
Senior Member
Let's guess anyway:

- The target is an ARM7TDMI cross-compile for LPC213x,
- The code tries to be an UART driver for MODBUS.

- There is something fishy with the included headers,
preventing the compiler to recognize the __irq macro,
or this is a port from e.g. 8051 code, and the interrupt
handler has to be configured differently.

It would help guessing if:
- The host operating system were told,
- The cross-compiler make and version were told,
- The compilation switches were told.


Tauno Voipio
Previous Topic:BInary Not Found (Tried everything)
Next Topic:Jlink run without debug OR don't stop after Terminate Ctrl+F2
Goto Forum:

Current Time: Sun Aug 14 07:48:33 GMT 2022

Powered by FUDForum. Page generated in 0.01254 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top