diff --git a/cpu/msp430/Makefile.msp430 b/cpu/msp430/Makefile.msp430 index 70d2bcf77..8649233b0 100644 --- a/cpu/msp430/Makefile.msp430 +++ b/cpu/msp430/Makefile.msp430 @@ -82,7 +82,7 @@ ifdef WERROR CFLAGSWERROR=-Werror endif -CFLAGS += $(CFLAGSNO) +CFLAGS += $(CFLAGSNO) -fno-strict-aliasing ### These flags can reduce the code size and RAM usage with up to 10% diff --git a/cpu/msp430/msp430def.h b/cpu/msp430/msp430def.h index 2738b7ed7..f4614efcf 100644 --- a/cpu/msp430/msp430def.h +++ b/cpu/msp430/msp430def.h @@ -32,29 +32,31 @@ #ifndef MSP430DEF_H #define MSP430DEF_H -#if defined(__IAR_SYSTEMS_ICC__) || defined(__MSPGCC__) -#include -#if __MSPGCC__ -#include -#endif /* __MSPGCC__ */ -#else -#include -#include -#endif - #ifdef __IAR_SYSTEMS_ICC__ #include #include +#include #define dint() __disable_interrupt() #define eint() __enable_interrupt() #define __MSP430F1611__ 1 #define __MSP430__ 1 #define CC_CONF_INLINE #define BV(x) (1 << x) -#else -#define CC_CONF_INLINE inline + +#else /* __IAR_SYSTEMS_ICC__ */ + +#ifdef __MSPGCC__ +#include +#include +#else /* __MSPGCC__ */ +#include +#include #define MSP430_MEMCPY_WORKAROUND 1 -#endif +#endif /* __MSPGCC__ */ + +#define CC_CONF_INLINE inline + +#endif /* __IAR_SYSTEMS_ICC__ */ #ifdef HAVE_STDINT_H #include diff --git a/platform/sky/Makefile.common b/platform/sky/Makefile.common index ebfbea6e9..3a4510580 100644 --- a/platform/sky/Makefile.common +++ b/platform/sky/Makefile.common @@ -19,7 +19,7 @@ CFLAGS+=-Os -g endif ifdef IAR -CFLAGS+=-e --vla -Ohz --multiplier=16s --core=430 --double=32 +CFLAGS += -D__MSP430F1611__=1 -e --vla -Ohz --multiplier=16s --core=430 --double=32 CFLAGSNO = --dlib_config "$(IAR_PATH)/LIB/DLIB/dl430fn.h" $(CFLAGSWERROR) endif diff --git a/platform/sky/platform-conf.h b/platform/sky/platform-conf.h index 7c3eec2e0..a64057154 100644 --- a/platform/sky/platform-conf.h +++ b/platform/sky/platform-conf.h @@ -53,17 +53,6 @@ #define PLATFORM_HAS_BATTERY 1 #define PLATFORM_HAS_SHT11 1 -#ifdef __IAR_SYSTEMS_ICC__ -#define __MSP430F1611__ 1 -#define __MSP430__ 1 -#define CC_CONF_INLINE -#define BV(x) (1 << x) -#else -#define CC_CONF_INLINE inline -#define MSP430_MEMCPY_WORKAROUND 1 -#endif - - /* CPU target speed in Hz */ #define F_CPU 3900000uL /*2457600uL*/