Added flags to enable 20-bit support from msp430-gcc 4.7.x
Fix SDCC Compile Error
Merge pull request #729 from g-oikonomou/fix-nd6-sdcc

Fix SDCC Compile Error
Merge pull request #637 from alignan/z1-add-flags-20bit-support

Added flags to enable 20-bit support from msp430-gcc 4.7.x
Sender rank in Hop-by-Hop option has inverted bytes
Setting uip_ext_len again breaks hop-by-hop option
Insert properly Hop-by-Hop option at first hop
Improve RPL hop-by-hop option detection
Merge pull request #650 from cetic/pr-rpl-hbh-fixes

Fix for RPL Hop-by-Hop options
rl78: Change RIMEADDR_CONF_SIZE to LINKADDR_CONF_SIZE because the rimeaddr module has been renamed to linkaddr.
Merge pull request #734 from hexluthor/rl78-linkaddr

rl78: Change RIMEADDR_CONF_SIZE to LINKADDR_CONF_SIZE
Fix time accounting on msp430 Series 1 and Series 2 MCU based platforms.

The problem with the current version of the code was that the condition at the end of the do...while loop at Timer A1 interrupt:
 while((TACCR1 - TAR) > INTERVAL);
evaluates to false whenever TACCR1 == TAR.
Not incrementing TACCR1 in this case leads to Timer A1 interrupt not being called for 2 seconds, until TAR counter reaches TACCR1 again after an overflow.

The patch avoids this problem by changing the condition of the loop, and using CLOCK_LT macro to compare between time values.

The patch also attempts to fix another problem: a read of TAR register while it is being updated may return a lower value than the actual contents. To avoid that, the "read twice and compare results" idiom should be used. As the TAR register is updated by the actual hardware, it is of no importance whether it is read with interrupts disabled or enabled; the problem can occur in both contexts.