This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 GCC updates

Other Parts Discussed in Thread: MSP430F5438A, CCSTUDIO


MSP430 GCC header and linker scripts files update

 

The MSP430 GCC header and linker scripts files are updated to become similar to the TI MSP430 compiler linker CMD files i.e defining all symbols in their own linker script.

A new file device_symbols.ld is created for every device having all symbols and which has its include in the standard device linker file. This change requires to add a new path in the linker library path.

As consequence, old existing MSP430 GCC projects will be broken and you will get a linker error once you do the update to the MSP430 Emulators and Device Support Files v6.3.1.8 or later.

This does not affect new created projects.

Please follow the below explanation to get your projects updated.

Old files

The older header file had a hardcoded address for every MSP430 symbol (base address, registers, addresses )

Example, in the msp430f5438a.h file

msp430f5438a.h said:
#define WDTCTL_               0x015C    /* Watchdog Timer Control */


New files

The new MSP430 GCC header files do not have those definitions anymore, but instead move their address to a companion linker script that is included by the traditional device's linker script.

The new header file for example msp430f5438a.h uses a macro to pass the symbol resolution to linker.

msp430f5438a.h said:
sfr_w(WDTCTL);                                /* Watchdog Timer Control */


In msp430f5438a.ld, the new symbols file (msp430f5438a_symbols.ld) is included at the end to resolve all already defined register and addresses.

msp430f5438a.ld said:


/****************************************************************************/


/* Include peripherals memory map                                           */


/****************************************************************************/


INCLUDE msp430f5438a_symbols.ld


How to migrate your existing MSP430 GCC project

Once you download MSP430 Emulators and Device Support Files v6.3.1.8 or later, please proceed as follows to fix your existing MSP430 GCC CCS projects.


  1. Edit your GCC linker script and add the following at the end of the file: “INCLUDE device_symbols.ld” where device should be your selected MSP430 device. For example “INCLUDE msp430f5438a_symbols.ld

  2. This linker script is located at the directory "${CCS_BASE_ROOT}/msp430/include_gcc", which must be included in the linker's library search path.

    1. Go to Project Properties

    2. Then Select GNU Linker

    3. Select Libraries

    4. In the “Library search path (-L, --library path)”, add a new path for “${CCS_BASE_ROOT}/msp430/include_gcc

 

MSP430 GCC 4.9 build 364 and build 467 not discovered by CCS 6.1.2 and earlier versions

MSP430 GCC compilers have an installation issue with CCS v6.1.2 and earlier where it will not properly discover the MSP430 GCC 4.9 build 364 or build 467 releases if you have already installed an MSP430 GCC 4.9 build 167 release. CCS will continue finding and using the build 167.

If you already downloaded the latest MSP430 GCC 4.9 build 364 or build 467 from App Center, please proceed as follows in order to fix the above issue:

  1. Move the older MSP430 GCC build 167 of the GCC tool from the <ccs>/ccsv6/tools/compiler/ directory.  Then the newer compiler build will be discovered, and any user projects will automatically build with the newer compiler.

  2. If the new tool doesn’t work for any reason, you could move the old tool back into <ccs>/ccsv6/tools/compiler/.

 

The issue will be fixed in CCS 6.1.3 and later versions.

This fix only works with GCC 5.0.x and newer and is not retroactive to 4.x releases of GCC.


MSP430 GCC 5.x not seen by CCS 6.1.2 and earlier versions

MSP430 GCC compilers have an installation issue with CCS v6.1.2 and earlier where it will not properly register the MSP430 GCC 5.x release. The MSP430 GCC 4.9 release will properly register and show as an available compiler version.

In order to fix this issue, please proceed as follows:

  1. Save below xml file to this location: <ccs>\ccsv6\eclipse\plugins\com.ti.ccstudio.buildDefinitions.GNU_6.1.1.201512151800\resources\buildDefinitions\msp430\

  2. Restart CCS.

  3. From your CCS project, update the compiler on the General tab to point to the new MSP430 GCC 5.x release and click ok. You should now see both MSP430 GCC compiler versions (4.9 and 5.x) as available choices.

The issue will be fixed in CCS 6.1.3 and later versions.

http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection#CCSv6

 MSP430_GNU_5.0.zip