Hello,

I'm fairly new to the world of MSP430s therefore this might be a simple
case for more experienced users. However I don't know how to explain or
fix the following behaviour.

But first things first. I use a Fedora 15 x86 installation as a host
system. I installed mspgcc from source using the mspgcc-20110716.tar.bz2
tar-ball from SourceForge. As far as I can tell everything worked out
fine. In addition to the mspgcc-toolchain I installed mspdebug from
Fedora repositories.

My goal is to run a simple example on an CC430F6137 MCU. Compilation and
Linking seems to work fine as I can not find any warnings or errors in
the output (see attached file).

However if I try to run my binary on the MCU nothing happens. mspdebug
displays the following output while flashing:
Erasing...
Programming...
Writing  156 bytes to 8000...
Writing   32 bytes to ff80...

I then compiled the same code using IAR and found out that when I flash
the IAR-binary using mspdebug everything works out fine and I can run
the code. In addition I noticed that mspgdebug does not write 32 bytes
in the vector table but only 2 bytes to position 0xfffe.
I then read those last two bytes out of the table and saw that it was 
00 at 0xfffe
80 at 0xffff

Now the interesting part: If I flash my mspgcc binary to the MCU, set
the last two bytes manually and reset the MCU, then I can run the mspgcc
binary!

Is this a bug in mspgcc or am I doing something wrong?

Kind Regards,
Valentin

**** Build of configuration Debug for project Scrap_3 ****

make all 
Building file: ../src/msp430x6xx_fet_1.c
Invoking: Cross GCC Compiler
msp430-gcc -I/opt/toolchains/msp430/include 
-I/opt/toolchains/msp430/msp430/include -O0 -g3 -Wall -c -fmessage-length=0 
-mmcu=cc430f6137 -v -MMD -MP -MF"src/msp430x6xx_fet_1.d" 
-MT"src/msp430x6xx_fet_1.d" -o"src/msp430x6xx_fet_1.o" 
"../src/msp430x6xx_fet_1.c"
Using built-in specs.
Reading specs from 
/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/lib/msp430mcu.spec
COLLECT_GCC=msp430-gcc
COLLECT_LTO_WRAPPER=/opt/toolchains/msp430/libexec/gcc/msp430/4.5.3/lto-wrapper
Target: msp430
Configured with: ../gcc-4.5.3/configure --target=msp430 
--enable-languages=c,c++ --prefix=/opt/toolchains/msp430
Thread model: single
gcc version 4.5.3 (GCC) 
COLLECT_GCC_OPTIONS='-I/opt/toolchains/msp430/include' 
'-I/opt/toolchains/msp430/msp430/include' '-O0' '-g3' '-Wall' '-c' 
'-fmessage-length=0' '-mmcu=cc430f6137' '-v' '-MMD' '-MP' 
'-MFsrc/msp430x6xx_fet_1.d' '-MTsrc/msp430x6xx_fet_1.d' '-o' 
'src/msp430x6xx_fet_1.o' '-mcpu=430xv2' '-mmpy=32dw' '-mivcnt=64'
 /opt/toolchains/msp430/libexec/gcc/msp430/4.5.3/cc1 -quiet -v 
-I/opt/toolchains/msp430/include -I/opt/toolchains/msp430/msp430/include 
-imultilib mcpu-430x/mmpy-16 -MMD src/msp430x6xx_fet_1.d 
-MFsrc/msp430x6xx_fet_1.d -MP -MTsrc/msp430x6xx_fet_1.d -MQ 
src/msp430x6xx_fet_1.o -dD -D__CC430F6137__ ../src/msp430x6xx_fet_1.c 
-mcpu=430xv2 -mmpy=32dw -mivcnt=64 -quiet -dumpbase msp430x6xx_fet_1.c 
-mmcu=cc430f6137 -mcpu=430xv2 -mmpy=32dw -mivcnt=64 -auxbase-strip 
src/msp430x6xx_fet_1.o -g3 -O0 -Wall -version -fmessage-length=0 -o 
/tmp/ccqSv0lW.s
GNU C (GCC) version 4.5.3 (msp430)
        compiled by GNU C version 4.6.0 20110603 (Red Hat 4.6.0-10), GMP 
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
Finished building: ../src/msp430x6xx_fet_1.c
 
Building target: Scrap_3
Invoking: Cross GCC Linker
msp430-gcc -L/opt/toolchains/msp430/lib 
-L/opt/toolchains/msp430/msp430/lib/ldscripts/cc430f6137 
-L/opt/toolchains/msp430/msp430/lib -o"Scrap_3"  ./src/msp430x6xx_fet_1.o   
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127243
ignoring nonexistent directory 
"/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/sys-include"
Finished building target: Scrap_3
ignoring duplicate directory "/opt/toolchains/msp430/msp430/include"
  as it is a non-system directory that duplicates a system directory
 
#include "..." search starts here:
#include <...> search starts here:
 /opt/toolchains/msp430/include
 /opt/toolchains/msp430/lib/gcc/msp430/4.5.3/include
 /opt/toolchains/msp430/lib/gcc/msp430/4.5.3/include-fixed
 /opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/include
End of search list.
GNU C (GCC) version 4.5.3 (msp430)
        compiled by GNU C version 4.6.0 20110603 (Red Hat 4.6.0-10), GMP 
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127243
Compiler executable checksum: 350bb2154de32d523968c7a528f0c64e
COLLECT_GCC_OPTIONS='-I/opt/toolchains/msp430/include' 
'-I/opt/toolchains/msp430/msp430/include' '-O0' '-g3' '-Wall' '-c' 
'-fmessage-length=0' '-mmcu=cc430f6137' '-v' '-MMD' '-MP' 
'-MFsrc/msp430x6xx_fet_1.d' '-MTsrc/msp430x6xx_fet_1.d' '-o' 
'src/msp430x6xx_fet_1.o' '-mcpu=430xv2' '-mmpy=32dw' '-mivcnt=64'
 /opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/bin/as 
-mcpu=430xv2 -mmcu=cc430f6137 -o src/msp430x6xx_fet_1.o /tmp/ccqSv0lW.s
COMPILER_PATH=/opt/toolchains/msp430/libexec/gcc/msp430/4.5.3/:/opt/toolchains/msp430/libexec/gcc/msp430/4.5.3/:/opt/toolchains/msp430/libexec/gcc/msp430/:/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/:/opt/toolchains/msp430/lib/gcc/msp430/:/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/bin/
LIBRARY_PATH=/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/mcpu-430x/mmpy-16/:/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/lib/mcpu-430x/mmpy-16/:/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/:/opt/toolchains/msp430/lib/gcc/msp430/4.5.3/../../../../msp430/lib/
COLLECT_GCC_OPTIONS='-I/opt/toolchains/msp430/include' 
'-I/opt/toolchains/msp430/msp430/include' '-O0' '-g3' '-Wall' '-c' 
'-fmessage-length=0' '-mmcu=cc430f6137' '-v' '-MMD' '-MP' 
'-MFsrc/msp430x6xx_fet_1.d' '-MTsrc/msp430x6xx_fet_1.d' '-o' 
'src/msp430x6xx_fet_1.o' '-mcpu=430xv2' '-mmpy=32dw' '-mivcnt=64'

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to