From 1e2d603f5af3e5810ff809e43a90f3ec900d4d2a Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Fri, 2 Sep 2011 16:49:11 -0500 Subject: [PATCH] Updates to work with mspgcc 20110716 and subsequent releases Signed-off-by: Joakim Eriksson --- tests/cputest.c | 10 ++++++++-- tests/msp430setup.c | 18 ++++++++++++++++-- tests/timertest.c | 9 +++++++-- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index 58c9162..ab05aff 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -38,10 +38,17 @@ */ #include "msp430setup.h" -#include #include #include +#if __MSPGCC__ +#include +#include +#define eint() __eint() +#define dint() __dint() +#else /* __MSPGCC__ */ +#include #include +#endif /* __MSPGCC__ */ /* From Adams test-suite */ #define TEST(...) if(__VA_ARGS__) { \ @@ -211,7 +218,6 @@ static struct { crashed gcc... */ } invert; -#include #ifndef BV #define BV(n) (1 << (n)) #endif diff --git a/tests/msp430setup.c b/tests/msp430setup.c index 9c9828c..66bdda0 100644 --- a/tests/msp430setup.c +++ b/tests/msp430setup.c @@ -37,10 +37,17 @@ */ #include "msp430setup.h" +#if __MSPGCC__ +#include +#include +#include +#include +#else /* __MSPGCC__ */ #include #include -#include #include +#endif /* __MSPGCC__ */ +#include /*--------------------------------------------------------------------------*/ @@ -330,7 +337,14 @@ msp430_setup(void) #define asmv(arg) __asm__ __volatile__(arg) #define STACK_EXTRA 32 -static char *cur_break = (char *)(&__bss_end + 1); + +static char *cur_break = (char *)( +#if defined(__MSP430_LIBC__) && 20110612 <= __MSP430_LIBC__ + __bss_end +#else + &__bss_end + 1 +#endif +); /* * Allocate memory from the heap. Check that we don't collide with the diff --git a/tests/timertest.c b/tests/timertest.c index ccd3049..43daa6f 100644 --- a/tests/timertest.c +++ b/tests/timertest.c @@ -38,10 +38,15 @@ */ #include "msp430setup.h" +#if __MSPGCC__ +#include +#include +#else /* __MSPGCC__ */ #include -#include -#include #include +#endif /* __MSPGCC__ */ +#include +#include /* From Adams test-suite */ #define TEST(...) if(__VA_ARGS__) { \