diff --git a/cpu/msp430/Makefile.msp430 b/cpu/msp430/Makefile.msp430 index 81c71f51a..6d5370575 100644 --- a/cpu/msp430/Makefile.msp430 +++ b/cpu/msp430/Makefile.msp430 @@ -35,10 +35,17 @@ endif CONTIKI_CPU_DIRS = $(CONTIKI_CPU_FAM_DIR) . dev MSP430 = msp430.c flash.c clock.c leds.c leds-arch.c \ - watchdog.c lpm.c mtarch.c rtimer-arch.c + watchdog.c lpm.c rtimer-arch.c UIPDRIVERS = me.c me_tabs.c slip.c crc16.c ELFLOADER = elfloader.c elfloader-msp430.c symtab.c +ifndef CPU_HAS_MSP430X +# include mtarch.c only in the non-large memory model case, because +# the current implementation assumes 16-bit addresses (function pointers +# stored as "unsigned short"). +MSP430 += mtarch.c +endif + ifeq ($(TARGET_MEMORY_MODEL),large) ELFLOADER = elfloader-msp430x.c symtab.c endif