Ok,

You're saying that functions in the libary that are not direclty called are not linked. Do you have any solution to suggest besides not putting these functions in the library? I'm sure there's a way to make them link since interrupt functions are a special case.

Thank you very much,

Yvan

From: "diwil" <[email protected]>
Reply-To: [email protected]
To: <[email protected]>
Subject: RE: [Mspgcc-users] Problem linking interrupt functions in library
Date: Fri, 29 Jul 2005 12:11:16 +0400

If object code does not refer some function residing in library, the last
one will not be linked.
~d

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Yvan
Castilloux
Sent: Friday, July 29, 2005 12:25 AM
To: [email protected]
Subject: [Mspgcc-users] Problem linking interrupt functions in library

Hi,

I use msp430-ar to make a library of functions.  When I include the
interrupt functions in the library, the linker just disregard them.  For
instance, the following function with header

interrupt( UART0RX_VECTOR ) Usart0_Rx( Void_t )
{
...
}

will not link if it is pre-compiled in the library but it will if it is
compiled normally.

Here are the commands I use in the make file:
1-library
ldevicelib:     $(DEVICE_OBJS) $(DEVICE_HEAD)
                msp430-ar -ruv $(LIBDIR)/libdevicelib.a $(DEVICE_OBJS) ;

2-compiling
$(OBJ_DIR)/%.o : $(SRCDIR)/%.c
        $(CC)  $(CCOPTIONS) $(OPTIMIZER) $(DEBUGGER) $(DEFINED) -I$(INCLDIR)

-I$(CC_INC_DIR) $< -o $@

3-linking
rfseals.elf : ${OBJECTS}
                    ${CC} -mmcu=${CPU} -o $@ -L$(LIBDIR) ${OBJECTS}
$(LDFLAGS) \
                    -ldevicelib

Any commments?

The only thing I can think of is that the linker disregards them because it
thinks the functions are not used anywhere (they are not called in the code
like standard functions).  Can you force the linkage then?

Thank you,

Yvan




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users



Reply via email to