Steve,
Here's my makefile:
--------------------------------------------------------------
# Project: LCD-Proto-gcc
# Makefile created by Dev-C++ 4.9.8.0
CPP = msp430-gcc.exe
CC = msp430-gcc.exe
WINDRES = windres.exe
RES =
OBJ = test.o $(RES)
LINKOBJ = test.o $(RES)
LIBS = -L"C:/ProgramFiles/mspgcc020030506/lib/gcc-lib/msp430/3.2.3"
-mmcu=msp430x149 -lfp
../../../../../ProgramFiles/mspgcc020030506/msp430/lib/msp1/libm.a
../../../../../ProgramFiles/mspgcc020030506/msp430/lib/msp1/libfp.a
INCS = -I"C:/ProgramFiles/mspgcc020030506/msp430/include/msp430"
-I"C:/ProgramFiles/mspgcc020030506/msp430/include"
-I"C:/ProgramFiles/mspgcc020030506/msp430/include/sys"
CXXINCS = -I"C:/ProgramFiles/mspgcc/msp430/include/msp430"
-I"C:/ProgramFiles/mspgcc/msp430/include"
-I"C:/ProgramFiles/mspgcc/msp430/include/sys"
BIN = test-gcc.exe
CXXFLAGS = $(CXXINCS) -mmcu=msp430x149 -g -O -Wall
CFLAGS = $(INCS) -mmcu=msp430x149 -g -O -Wall
.PHONY: all all-before all-after clean clean-custom
all: all-before test-gcc.exe all-after
clean: clean-custom
rm -f $(OBJ) $(BIN)
$(BIN): $(LINKOBJ)
$(CC) $(LINKOBJ) -o "test-gcc.exe" $(LIBS)
test.o: test.c
$(CC) -c test.c -o test.o $(CFLAGS)
----------------------------------------------------------------------
I have played around to see when this error happens and it seems to be related
to a floating point variable that is global in scope. For example, the
following code does not link:
-------------------- Broken code: ----------------------------
#include <math.h>
#include "MSP430x14x.h" // Standard Definition Control Register
#include "stdio.h"
float fValue;
int main(void)
{
float ppm;
fValue = (ppm * 4096.0) / (470000.0 - ppm);
return 0;
}
------------------ end broken code ---------------------------
If <fValue> is declared inside main(), the code links.
The error from the above code is:
/cygdrive/c/ProgramFiles/mspgcc020030506/bin/../lib/gcc-lib/msp430/3.2.3/../../../../msp430/lib/msp2/libfp.a(mulsf.o)(.text+0xc8):/cygdrive/c/mspgcc-source/msp430/msp430-libc/src/libm/mulsf.c:99:
undefined reference to `__umulsi3hw'
Thanks for your help!
loren
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455