Hello everyone,
I have devised a work-around to compile and link code for the
MSP430x20xx series. The linker's default linker script chokes on
seeing OUTPUT_ARCH("msp:200") because it is not yet supported in the
BFD library of the latest binutils. Therefore, support for the msp:200
target must be achieved by reusing the support already present for the
msp:21 target.
* The MSP430F2101 has the same memory map and core (mspgcc-wise) as
the MSP430F200x.
* The MSP430F2111 is related to the MSP430F201x.
To compile and link the code, I change the target on the command line
and before inclusion of the device-specific headers.
Here is the procedure (taking the example of the MSP430F2013):
--------------------
* Makefile:
CPU = msp430x2111
CFLAGS = -mmcu=${CPU} -O2 -Wall -g
ASFLAGS = -mmcu=${CPU} -D_GNU_ASSEMBLER_
--------------------
* Before EVERY invocation of #include <io.h> (Mine is centralized
around a header called hardware.h that defines hardware-specific
constants, as in the MSPGCC examples).
#ifdef __MSP430_2111__
#undef __MSP430_2111__
#endif
#define __MSP430_2013__
HERE is the include of io.h
#include <io.h>
--------------------
This causes the compiler to compile and link according the MSP430F2111
linker script, which is valid. The defines make sure that the default
hardware-specific headers loaded are those of the MSP430F2013 and not
MSP430F2111.
The generated binary is memory-map compatible with the MSP430F2013.
I hope this workaround helps those of you trying to code for the MSP430F20xx.
Best Regards,
Tennessee Carmel-Veilleux (514-343-6111 ext 14764, 514-396-8800 ext 7622)
Electronics Design Technician, LRP, Université de Montréal
Electrical Engineering Student, École de technologie supérieure
Electrical Team Leader, Project SONIA AUV, ETS (http://sonia.etsmtl.ca)