You should pass the -mmcu=msp430f1611
option also to the linker. Am 17.09.2011 04:06, schrieb Alessandro Triglia: > Hi > > I am new to this and to GNU software in general. I have installed MSPGCC on > my Windows Vista and Windows 7 PCs (directly from the zip file). I created > a small project, and all the C source files compile with msp430-gcc without > errors. The first problem I encountered was that msp430-ld would not find > the "memory.x" file. I can see that it looks for this file in a couple of > directories, but not in a directory where the file is. I "solved" that > problem by copying a suitable "memory.x" file to the working directory. > Then I tried to debug the program using msp430-gdb (with "target sim" > followed by "load" and "file") but the debugger crashes as soon as I give > the "start" command. I also tried with mspsim, but it returns an error that > I don't understand. I tried both programs with another ELF file and they > work fine. When I look at my output file, I have the feeling that something > is missing. My stuff is all there but there is not much else. > > What could I be doing wrong? > > Here is a fragment of the batch file that I am using: > > ------------------ > set CFLAGS=-g -Os -mmcu=msp430f1611 > > msp430-gcc -c %CFLAGS% -o build\main.o main.c > > msp430-gcc -c %CFLAGS% -o build\xluper430430.o xluper430430.c > > msp430-gcc -c %CFLAGS% -o build\xluper430430testencodings.o > xluper430430testencodings.c > > msp430-ld build\main.o build\xluper430430.o > build\xluper430430testencodings.o -Map build\x4.map -o build\x4.firmware > ------------------ > > The directory containing msp430-gcc.exe and msp430-ld.exe is in the system > path. > > My main() function is shown to begin at 0x4000, which contains a "call" > instruction (but the debugger seems to crash before executing that > instruction). > > Thanks in advance > > Alessandro Triglia > > > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users