Skip to main content



      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 04:17 Go to next message
Eclipse UserFriend
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
if(temp_U0RBR)
{
flg_Rxd0_Receive = 1;
}


#if MODBUS_DEVICE_CONFIG == MODBUS_MASTER
ModBusResponseReceive(temp_U0RBR);
#else
ModBusQueryReceive(temp_U0RBR);
#endif
}

VICVectAddr = 0;

}

i didnt get isr properly it throws an error.
  • Attachment: interrupts.c
    (Size: 12.11KB, Downloaded 319 times)
Re: Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq [message #1719994 is a reply to message #1719923] Wed, 13 January 2016 10:56 Go to previous messageGo to next message
Eclipse UserFriend
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 10:57] by Moderator

Re: Type expected '=', ',', ';', 'asm' or '__attribute__' before '__irq [message #1720003 is a reply to message #1719994] Wed, 13 January 2016 11:23 Go to previous message
Eclipse UserFriend
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.
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: Sat Jul 05 11:50:40 EDT 2025

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

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

Back to the top