]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Updates for GCC 4.5.3
authorR. Steve McKown <rsmckown@gmail.com>
Thu, 3 Nov 2011 23:45:36 +0000 (17:45 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 9 Jul 2012 16:34:44 +0000 (10:34 -0600)
* Include correct GCC headers depending upon version
* GCC does not stop the watchdog, so do it in PlatformP.nc
* Stopping watchdog in MotePlatformC no longer needed (olimexp16,
  tmicore, tmirws)
* tmicore writes TxIV in MoteClockP so needs MSP430REG_NORACE()

tos/chips/msp430/msp430hardware.h
tos/platforms/epic/PlatformP.nc
tos/platforms/olimexp169/MotePlatformC.nc
tos/platforms/shimmer/PlatformP.nc
tos/platforms/shimmer/chips/msp430/msp430hardware.h
tos/platforms/shimmer2/PlatformP.nc
tos/platforms/telosa/PlatformP.nc
tos/platforms/tinynode/PlatformP.nc
tos/platforms/tmicore/MoteClockP.nc
tos/platforms/tmicore/MotePlatformC.nc
tos/platforms/tmirws/MotePlatformC.nc

index e5406c5b1e93e691345e7a135c97d759d8658705..b2a5cfc26762490c0e5c60f645d5af13d7b8e13d 100644 (file)
 #ifndef _H_msp430hardware_h
 #define _H_msp430hardware_h
 
+#if defined(__MSPGCC__)
+/* mspgcc */
+#include <msp430.h>
+#include <legacymsp430.h>
+#else /* __MSPGCC__ */
+/* old mspgcc3, forked mspgcc4 */
 #include <io.h>
 #include <signal.h>
+#endif /* __MSPGCC__ */
 #include "msp430regtypes.h"
 
 
index acb3afbeecde83295ae0b66b9bc44be0b53133fd..d44b5e7f78b43b0d0f3f70f0116730176beeac59 100644 (file)
@@ -44,6 +44,9 @@ module PlatformP {
 }
 implementation {
   command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+    WDTCTL = WDTPW + WDTHOLD;
+#endif
     call MoteClockInit.init();
     call MoteInit.init();
     call LedsInit.init();
index 816e544a7301c317312d2a28e3b51c402f696adf..1f8df2f79d5409626be1d106a2c48cc56ef049ac 100644 (file)
@@ -39,11 +39,6 @@ implementation {
     /* reset all of the ports to be input and using i/o functionality */
     atomic
       {
-#ifdef __MSP430_HAS_WDT__
-       /* Stop the watchdog, if running.  Should be somewhere in chips/msp430... */
-       WDTCTL = WDTPW + WDTHOLD;
-#endif
-
        /* Port 1: 7-0:- */
        P1SEL = 0;      /* 0 0 0 0 0 0 0 0 */
        P1OUT = 0;      /* 0 0 0 0 0 0 0 0 */
index b8dc94382f56168e3766e902b8b82c5840eefbbd..01668fbad3c679b5e7ebb5abeb05a9ed9df2062b 100644 (file)
@@ -8,6 +8,9 @@ module PlatformP{
 }
 implementation {
   command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+    WDTCTL = WDTPW + WDTHOLD;
+#endif
     call MoteClockInit.init();
     call MoteInit.init();
     call LedsInit.init();
index 7911e9b3e7199e9ede2a76b4d049e255881005a5..dd0ab7f447079981ba2a127e2bbb4bca89a3a25b 100644 (file)
 #ifndef _H_msp430hardware_h
 #define _H_msp430hardware_h
 
+#if defined(__MSPGCC__)
+/* mspgcc */
+#include <msp430.h>
+#include <legacymsp430.h>
+#else /* __MSPGCC__ */
+/* old mspgcc3, forked mspgcc4 */
 #include <io.h>
 #include <signal.h>
+#endif /* __MSPGCC__ */
 #include "msp430regtypes.h"
 #include "Msp430DcoSpec.h"
 
index b8dc94382f56168e3766e902b8b82c5840eefbbd..01668fbad3c679b5e7ebb5abeb05a9ed9df2062b 100644 (file)
@@ -8,6 +8,9 @@ module PlatformP{
 }
 implementation {
   command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+    WDTCTL = WDTPW + WDTHOLD;
+#endif
     call MoteClockInit.init();
     call MoteInit.init();
     call LedsInit.init();
index 34490d6526c354aecf24abb12e91723b6ab57cb2..e56d893426327781c1a6ebe6750ca8bdb283c88a 100644 (file)
@@ -8,6 +8,9 @@ module PlatformP @safe() {
 }
 implementation {
   command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+    WDTCTL = WDTPW + WDTHOLD;
+#endif
     call MoteClockInit.init();
     call MoteInit.init();
     call LedsInit.init();
index 81e9dbfb2dcef92fce8d978c0d44a7147379bceb..f3d8ee9888c7eca653cd526d7ff4d73e351efbcc 100644 (file)
@@ -7,6 +7,9 @@ module PlatformP{
 }
 implementation {
   command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+    WDTCTL = WDTPW + WDTHOLD;
+#endif
     call Msp430ClockInit.init();
     TOSH_SET_PIN_DIRECTIONS();
     call LedsInit.init();
index a9a976845eedbcf3838f14c2b3d5d9023d6a3f98..a3353972854fe9a639a7208464269bf4e733a28e 100644 (file)
@@ -39,6 +39,9 @@ module MoteClockP {
 }
 
 implementation {
+  MSP430REG_NORACE(TAIV);
+  MSP430REG_NORACE(TBIV);
+
   command error_t Init.init()
   {
     volatile uint16_t i;
index 6882e6e8f15e36da42620592ce679049919a0291..2199adfec964f1f4579d0c4151590659628153ab 100644 (file)
@@ -39,11 +39,6 @@ implementation {
     /* reset all of the ports to be input and using i/o functionality */
     atomic
       {
-#ifdef __MSP430_HAS_WDT__
-       /* Stop the watchdog, if running.  Should be somewhere in chips/msp430... */
-       WDTCTL = WDTPW + WDTHOLD;
-#endif
-
        /* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:-, 4:-, 3:CP_CTS, 2:CP_RTS,
         * 1:BSL_TX, 0:-
         */
index ade28aa418e0a32092b593af7e5d1701d3fc050a..39b45c96caa561d455733975abfcdc1557c819ce 100644 (file)
@@ -39,11 +39,6 @@ implementation {
     /* reset all of the ports to be input and using i/o functionality */
     atomic
       {
-#ifdef __MSP430_HAS_WDT__
-       /* Stop the watchdog, if running.  Should be somewhere in chips/msp430... */
-       WDTCTL = WDTPW + WDTHOLD;
-#endif
-
        /* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:RAIN, 4:-, 3:CP_CTS, 2:CP_RTS,
         * 1:BSL_TX, 0:WSPEED
         */