The IAR intrinsic functions, as well as the #pragmas, are IARs way to add some 
functionality that is required for microcontroller programming but not part of 
the C standard.
One example is the access to the status register. C(++) does not know such a 
thing. Not does it know interrupt functions and interrupt vectors. Or 
enabling/disabling the interrupts, entering and exiting low power modes 
or no-operations. Or Inline assembly.

IAR defines a set of compiler pseudo-functions to add this functionality. The 
compiler will translate them into the proper assembly code.

The mspgcc-file iomacros.h defines most of them for mspgcc. For most of them, a 
simple search and replace will do the job, if necessary at all.
Interrupt functiosn are defined without the pragma as

interrupt(vector) name (void){};
(see signal.h)

the file isr_compat.h will not add macros to make your IAR source mspgcc 
compatible. It will define a set of macros which make your code, if the macros 
are used exclusively, compatible with different compilers 
including mspgcc and IAR. So it won't fix your IAR code, you'll have to 
translate the IAR intrinsics anyway. And it only covers the interrupt function 
part, not the intrinsics.

JMGross

----- Ursprüngliche Nachricht -----
Von: Paul F. Sehorne
An: GCC for MSP430 - http://mspgcc.sf.net
Gesendet am: 21 Mai 2010 01:49:27
Betreff: [Mspgcc-users] How to port the AIR __intrinsic functions

Well, in attempting to port the TI Chronos Sport Watch firmware to 
mspgcc I have encountered a serious setback - __intrinsic functions.  I 
had not anticipated anything so extreme when I started down this path.

Before reinventing the wheel I should ask if this has already been done 
and if someone is willing to share the code or if mspgcc provides a more 
palatable route than rewriting way too many functions (way too many for 
me anyway)..

Thanks,
Paul


Reply via email to