Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] RE: compiler-independent ISR declarations [RSS Feed]

#1 Nov. 21, 2005 10:14:45

Steffen N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: compiler-independent ISR declarations


Hello,

I've problems to compile with IAR.
The line is:

#define ISR(a,b) #pragma vector = a ## _VECTOR \
__interrupt void b(void)

Error: expected a macro parameter name P:\vhdl\EKG\pgm\msp\isr_compat.h
68

This is the same problem, I ran some times ago. The Preprocessor thinks
about a parameter with any #foo (as #pragma in this case).
Is there a switch in IAR to compile this things?

Thanks,

Steffen

--------------------------------------------------------------------
| Fraunhofer Institut Photonische Microsysteme |
| |
| Fraunhofer Institute for Photonic Microsystems ( Germany ) |
| |
| Steffen Netz | phone : ( +49 ) (0)351/8823-212 |
| Maria-Reiche-Str. 2 | fax : ( +49 ) (0)351/8823-266 |
| 01109 Dresden | email : steffen.n...@ipms.fraunhofer.de |
--------------------------------------------------------------------

Offline

#2 Nov. 21, 2005 18:36:01

Chris L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: compiler-independent ISR declarations


Steffen Netz schrieb:#define ISR(a,b) #pragma vector = a ## _VECTOR \
__interrupt void b(void)..> Error: expected a macro parameter nameP:\vhdl\EKG\pgm\msp\isr_compat.h 68>
> This is the same problem, I ran some times ago. The Preprocessor
> thinks about a parameter with any #foo (as #pragma in this case).
> Is there a switch in IAR to compile this things?a # within a macro is used for stringification of a parameter, ## tojoin parameters with other text.some compilers support a "pragma()" (or "__pragma()" etc) pseudo macrothat can be used for pragmas within macros. i think IAR has somethinglike that.these problems are the reason for gcc to have __attribte__(()) and notusing #pragmas at all ;-)chris

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] RE: compiler-independent ISR declarations [RSS Feed]

Board footer

Moderator control

Enjoy the 22nd of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support