Shigenobu,
I was using my own CC_MSPGCC in my makefile to distinguish the MSPgcc
compiler because I did not know about __GNUC__. I did not find mention
of it in the MSPgcc compiler defined symbols docs at
http://mspgcc.sourceforge.net/manual/x863.html As a result of your
suggestion below, to distinguish the MSPgcc compiler I have replaced all
references in the source files to my CC_MSPGCC with __GNUC__ and have
removed CC_MSPGCC from my make files.
I'll take a look at your use of BSP_COMPILER_GCC during my next session.
I am continuing to use __MSP430__ or __MSP430__6137 to distinguish the mcu.
Thanks for taking time to help me.
Paul
On 5/21/2010 7:13 PM, Shigenobu Kimura wrote:
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
------------------------------------------------------------------------------
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
--
Paul
Sehorne owned or managed Web Sites
* Airport Homes <http://airporthomes.org/>
* Female Body Building <http://bodybuilding.sehorne.net/>
* Credit Repair <http://creditrepair.sehorne.net/>
* Personal Loans <http://personalloans.sehorne.net/>
* Shopping <http://shop.sehorne.net/>
* Hidden Valley Airpark <http://hiddenvalleyairpark.org/>