I originally started out using the install instructions from mikrocontroller.net, but it took about 6 attempts to actually get a working installation. I later found the following instructions in the archive, with which I have had considerably less trouble. To this day, I'm not sure what the official' method is, but this does seem to work.

packaging/README-MAINTAINER.txt
(http://mspgcc.cvs.sourceforge.net/mspgcc/packaging/README-MAINTAINER.txt?view=markup)

TonyB





----- Original Message ----- From: "Gianni Di Caro" <[email protected]>
To: <[email protected]>
Sent: Tuesday, August 05, 2008 11:27 AM
Subject: [Mspgcc-users] linking problems in linux (undefined symbols)


Hi,
I'm experiencing problems similar to those discussed in a previous
thread (Can't compile programs under OSX).
<http://sourceforge.net/mailarchive/forum.php?thread_name=484455EE.7030209%40gmail.com&forum_name=mspgcc-users>
However, the solutions suggested there didn't fully work in my case.
I successfully installed all the necessary packages and have gcc-3.2.3
(+3.3 for msp) and binutils 2.17 (patched with the patches from the CVS
repository).
I could actually compile and run the following test file that I modified
from http://www.mikrocontroller.net/en/mspgcc (which is the site where I
found
good installation instructions) using: msp430-gcc -mmcu=msp430x1612 -g
-Os -o test1.elf test1.c

#include <io.h>
volatile static int x = 10;
void wait(void);         //prototype for wait()
int main(void)
{
 int c = 99;
 x *= c;
 P1DIR=0xFF;            //port 1 = output
 P1OUT=0x01;            //set bit 0 in port 1
 for(;;) {              //infinite loop
   P1OUT=~P1OUT;        //invert port 1
   wait();              //call delay function
 }
 return x;
}

void wait(void)          //delay function
{
 volatile int i;        //declare i as volatile int
 for(i=0;i<32000;i++);  //repeat 32000 times
}

However, when I tried to compile my application (a controller for the
ScatterNode device), I get the following errors:

/usr/local/msp430/lib/gcc-lib/msp430/3.2.3/msp2/libgcc.a(_copy_data.o):
In function `__do_copy_data':
config/msp430/libgcc.S:(.init4+0x2): undefined reference to `__data_size'
config/msp430/libgcc.S:(.init4+0xc): undefined reference to
`__data_load_start'
/usr/local/msp430/lib/gcc-lib/msp430/3.2.3/msp2/libgcc.a(_clear_bss.o):
In function `__do_clear_bss':
config/msp430/libgcc.S:(.init4+0x2): undefined reference to `__bss_size'
make: *** [target] Error 1

Compilation (of all Scatter libraries) goes fine until linking, which is
executed with the following command, with the application inamed EMPTY
(all the referred libraries and include files are there and look fine,
by the way):

msp430-gcc -Wl,-T"../../System/lddefault.x" -Wl,-Map="out/EMPTY.map"
-Wl,--cref -W -Wall -Os -mmcu=msp430x1612 -D__SCATTERWEB__
-D__EOSVER_MAJOR=1 -D__EOSVER_MINOR=1 -D__COMPILE_TIME=1217951844
-D__APP_NAME="\"EMPTY\"" -D__WITH_LIBSCATTERWEB -D__WITH_LIBCC1020
-DLIBRARY_COUNT=2 -DLIBRARY_STRINGLIST="\"scatterweb\",\"CC1020\""
-fno-defer-pop -I. -I"../../System/include"
-I../../Libraries/libscatterweb/include
-I../../Libraries/libCC1020/include -include
../../Libraries/libscatterweb/libscatterweb.h -include
../../Libraries/libCC1020/libCC1020.h -fno-defer-pop -Lout -o
out/EMPTY.elf  ./bin/ScatterWeb.Process.o -lscatterweb -lCC1020

I tried to recompile gcc using the CVS version dating back to May 25th,
as suggested, but it didn't work.

What is strange is the fact that I could compile the simple test
program, while I get those 'basic' errors with my application. In
principle I should have gotten them also with test1.c, I guess.

Any ideas??? I'm getting crazy with this msp430 stuff! Actually I
installed and make it working perfectly under Windows+Cygwin, but since
I hate windows I'm struggling to make it working under linux... help me
to not give it up!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to