I am not sure how much this is useful for Chronos project,
but this is my patch to bsp_msp430_defs.h (relative to swrc088c).
As for SimpliciTI/MRFI this should be all you need.
I think it is better to use __GNUC__ than __MSP430__ to tell gcc.

Index: Components/bsp/mcus/bsp_msp430_defs.h
===================================================================
--- Components/bsp/mcus/bsp_msp430_defs.h       (.../rf2500/IAR_Source) 
(revision 253)
+++ Components/bsp/mcus/bsp_msp430_defs.h       (.../rf2500-0.2/IAR_Source)     
(working copy)
@@ -99,6 +99,13 @@
 #define BSP_EarlyInit(void)  _system_pre_init(void)
        
 /* ------------------ Unrecognized Compiler ------------------ */
+#elif defined(__GNUC__)
+
+#define BSP_COMPILER_GCC
+
+#define __bsp_ISTATE_T__            unsigned short
+#define __bsp_ISR_FUNCTION__(f,v)   interrupt(v) f()
+
 #else
 #error "ERROR: Unknown compiler."
 #endif
@@ -116,6 +123,21 @@
 
 #endif
 
+#if (defined BSP_COMPILER_GCC)
+#include <io.h>
+#include <signal.h>
+
+#define __bsp_ENABLE_INTERRUPTS__()       __enable_interrupt()
+#define __bsp_DISABLE_INTERRUPTS__()      __disable_interrupt()
+#define __bsp_INTERRUPTS_ARE_ENABLED__()  (READ_SR&0x0008)
+
+#define __bsp_GET_ISTATE__()              (READ_SR&0x0008)
+#define __bsp_RESTORE_ISTATE__(x)         __asm__("bis %0,r2" : : "ir" 
((uint16_t) x))
+#define __bsp_QUOTED_PRAGMA__(x)          _Pragma(#x)
+#endif
+
+
+
 /* 
------------------------------------------------------------------------------------------------
  *                                          Common
  * 
------------------------------------------------------------------------------------------------
@@ -124,6 +146,7 @@
 #define __bsp_CODE_MEMSPACE__   /* blank */
 #define __bsp_XDATA_MEMSPACE__  /* blank */
 
+#ifndef __GNUC__
 typedef   signed char     int8_t;
 typedef   signed short    int16_t;
 typedef   signed long     int32_t;
@@ -131,6 +154,7 @@
 typedef   unsigned char   uint8_t;
 typedef   unsigned short  uint16_t;
 typedef   unsigned long   uint32_t;
+#endif
 
 #ifndef NULL
 #define NULL 0


Reply via email to