SLAU646F September 2015 – June 2020
To build one of the examples manually, open a terminal and change to the example for the target device and operating system. The compiler executable msp430-elf-gcc must be available on your system path.
msp430-elf-gcc -I <Path to MSP430 Support Files> -L <Path to MSP430 Support Files>
-T DEVICE.ld -mmcu=DEVICE -O2 -g blink.c -o blink.o
The placeholder <Path to MSP430 Support Files> is the directory that contains the MSP430 support files (header files and linker scripts to support the different MSP430 devices).
The placeholder DEVICE tells the compiler and linker to create code for the target device. The command line argument -T DEVICE.ld is not normally required. When the -mmcu=DEVICE option is passed, the linker searches for the linker script “DEVICE.ld” in the current directory, and for paths specified with -L.
Example
msp430-elf-gcc -I ../../../include -L ../../../include -mmcu=msp430fr5969 \
-O2 -g blink.c -o blink.o