added compiler flags and macros for IAR and mspgcc 4.4.5 compilers

This commit is contained in:
Niclas Finne 2011-09-21 16:54:25 +02:00
parent b251619a2f
commit 367c82a5ab
4 changed files with 17 additions and 26 deletions

View file

@ -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%

View file

@ -32,29 +32,31 @@
#ifndef MSP430DEF_H
#define MSP430DEF_H
#if defined(__IAR_SYSTEMS_ICC__) || defined(__MSPGCC__)
#include <msp430.h>
#if __MSPGCC__
#include <legacymsp430.h>
#endif /* __MSPGCC__ */
#else
#include <io.h>
#include <signal.h>
#endif
#ifdef __IAR_SYSTEMS_ICC__
#include <intrinsics.h>
#include <in430.h>
#include <msp430.h>
#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 <msp430.h>
#include <legacymsp430.h>
#else /* __MSPGCC__ */
#include <io.h>
#include <signal.h>
#define MSP430_MEMCPY_WORKAROUND 1
#endif
#endif /* __MSPGCC__ */
#define CC_CONF_INLINE inline
#endif /* __IAR_SYSTEMS_ICC__ */
#ifdef HAVE_STDINT_H
#include <stdint.h>

View file

@ -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

View file

@ -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*/