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



Reply via email to