OH BTW, this is with mspgcc4
msp430-gcc -v
Using built-in specs.
Target: msp430
Configured with:
/home/user/mspgcc4/build/gcc-4.4.3-build/../gcc-4.4.3/configure
--prefix=/home/user/contiki-2.x/platform/castlerock/tools/msp430-gcc-4.4.3
--target=msp430 --enable-languages=c,c++
--with-pkgversion=MSPGCC4_r4-20100210 : (reconfigured)
/home/user/mspgcc4/build/gcc-4.4.3-build/../gcc-4.4.3/configure
--prefix=/home/user/contiki-2.x/platform/castlerock/tools/msp430-gcc-4.4.3
--target=msp430 --enable-languages=c,c++
--with-pkgversion=MSPGCC4_r4-20100210 : (reconfigured)
/home/user/mspgcc4/build/gcc-4.4.3-build/../gcc-4.4.3/configure
--prefix=/home/user/contiki-2.x/platform/castlerock/tools/msp430-gcc-4.4.3
--target=msp430 --enable-languages=c,c++
--with-pkgversion=MSPGCC4_r4-20100210
Thread model: single
gcc version 4.4.3 (MSPGCC4_r4-20100210)
AND
msp430-libc-20100207
Anthony Asterisk wrote:
I just tried to use strotl() on the msp430f5437. It failed and I
tracked the problem down to a problem with multiply. Check this out:
register unsigned long int tmp1 = i;
unsigned long int tmp2 = i;
long int tmp3 = i;
int tmp4 = i;
printf("i %lx tmp1 %lx tmp2 %lx tmp3 %lx tmp4
%x\n",i,tmp1,tmp2,tmp3,tmp4);
tmp1 = tmp1 * base;
tmp2 = tmp2 * base;
tmp3 = tmp3 * base;
tmp4 = tmp4 * base;
printf("i %lx tmp1 %lx tmp2 %lx tmp3 %lx tmp4
%x\n",i,tmp1,tmp2,tmp3,tmp4);
i 0 tmp1 0 tmp2 0 tmp3 0 tmp4 0
i 0 tmp1 3fff3fff tmp2 3fff3fff tmp3 3fff3fff tmp4 0
Any advice how to proceed with debugging this? Is this a problem with
usage of hardwarde multiplier?