[Tinyos-devel] FTSP not working with mspgcc 4.5.3 and -Os

András Bíró bbandi86 at gmail.com
Tue Feb 21 13:01:44 PST 2012


Sorry, I might mixed it up, I think I only compiled the cygwin version
of the msp430 toolchain.

Andris

On Tue, Feb 21, 2012 at 9:43 PM, András Bíró <bbandi86 at gmail.com> wrote:
> Hi Guys,
>
> I compiled, and Miklos Maroti uploaded  those packages to the repo. It
> was compiled with the buildscript collection at /tools/toolchain
> (which was created for the new avr toolchain, but it's quite usable
> for any package building), and it should have that patch:
> http://code.google.com/p/tinyos-main/source/browse/trunk/tools/toolchain/msp430-gcc/patch/msp430-gcc-4.5.3-20110706-sf3409864.patch
> However, I see there are some new patch in Razvan's buildscript
> (https://github.com/tp-freeforall/prod/blob/tools-int/tools/platforms/msp430/toolchain/build.sh),
> I will recompile the packages with them tomorrow.
>
> The problem is that Razvan doesn't create deb packages (yet), and I
> can't update them, since I don't know when I should (I use only avr
> based platforms).
>
> Andris
>
> On Tue, Feb 21, 2012 at 7:47 PM, Thomas Schmid <thomas.schmid at gmail.com> wrote:
>> Peter,
>>
>> Awesome. Thank you so much.
>>
>> @Phil, Razvan: I am using the Debian packages form the Stanford repo. They
>> should probably be updated, especially since testing for 2.1.2 is going on.
>>
>> - Thomas
>>
>>
>>
>>
>>
>> On Tue, Feb 21, 2012 at 11:41 AM, Peter Bigot <bigotp at acm.org> wrote:
>>>
>>> On Tue, Feb 21, 2012 at 12:39 PM, Peter Bigot <bigotp at acm.org> wrote:
>>> > On Mon, Feb 20, 2012 at 12:12 AM, Philip Levis <pal at cs.stanford.edu>
>>> > wrote:
>>> >>
>>> >> On Feb 19, 2012, at 9:42 PM, Thomas Schmid wrote:
>>> >>
>>> >>> Hi all,
>>> >>>
>>> >>> We found a bug in msp430-gcc 4.5.3 while compiling FTSP (more
>>> >>> specifically FtspLpl). It took us a while to pinpoint the problem, but
>>> >>> it looks like mspgcc's optimization makes a mistake when multiplying
>>> >>> two 64-bit integers (lines 216 and 217 in TimeSyncP.nc). For some
>>> >>> reason, those multiplications produce super big numbers, even if the
>>> >>> inputs are small. Turning off -Os and using -O1 or -O2 fixes the
>>> >>> problem, and the multiplications work. Going one higher to -O3 has the
>>> >>> same result as -Os.
>>> >>>
>>> >>> I looked at the diffs of the disassembled code of the binaries, and
>>> >>> there is clearly a difference in those sections. However, my msp430
>>> >>> assembly isn't good enough to actually understand what the problem
>>> >>> could be.
>>> >>>
>>> >>> Any suggestions on how to track this further down?
>>> >>
>>> >> Peter Bigot (cc'd) is a major contributor to msp430-gcc. Maybe he can
>>> >> provide some insight.
>>> >
>>> > Based on the test program you supplied (thank you) and my
>>> > experimentation, you're using a version of mspgcc that does not have
>>> > the patch for
>>> > https://sourceforge.net/tracker/?func=detail&aid=3390964&group_id=42303&atid=432701
>>>
>>> Sorry, wrong link: the real problem is this one:
>>>
>>>
>>> https://sourceforge.net/tracker/?func=detail&aid=3409864&group_id=42303&atid=432701
>>>
>>> > A build of LTS-20110716 with patches through 20110830 showed the
>>> > problem on your test case; rebuilding with the patch set through
>>> > 20110921 failed to reproduce the problem.
>>> >
>>> > Please make sure the mspgcc you are using is LTS-20110716 with all
>>> > current official patches.  Patches are available at
>>> > https://sourceforge.net/projects/mspgcc/files/Patches/LTS/20110716/.
>>> >
>>> > I know Eric Decker has expressed concern that the official TinyOS
>>> > debian packages are not up to date; I'm not sure why, as I believe the
>>> > same person takes care of those for both TinyProd and TinyOS.  I don't
>>> > use Ubuntu/Debian systems so can't verify any binary distributions.
>>> >
>>> > Peter
>>> >
>>> >> Phil
>>
>>
>>
>> _______________________________________________
>> Tinyos-devel mailing list
>> Tinyos-devel at millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>>



More information about the Tinyos-devel mailing list