embeddedlibrary
reusable software modules for embedded systems
|
This guide assumes you have already created a project and have the library on your PC
Before attempting to install the MSPGCC compiler, verify that you do not already have it. You may have installed it when installing CCS.
To check if you have the MSPGCC compiler installed:
If you have the GCC compiler installed, you may skip to the next section.
If you do not have the GCC compiler installed:
These instructions will guide you through setting up the GCC compiler for an existing project
Before configuring anything, you must create a new build configuration that uses the GCC compiler. To do so:
Now that you have a build configuration that uses the GCC compiler, you must setup the project much like you do for the TI compiler
In order for the compiler to find the libraries header files, you must set the include directories for the project. To do so:
You need to add the following directories:
If you have created your system.h file in the project directory, you will also need to add the project directory to the include directories. To do so:
Press Ok when you are done making changes
The last thing that needs to be configured to build your project is to add two Symbols to the configuration. The first will allow the MSP430 support files to work correctly. The second allows the library to change how it handles certain preprocessor directives such as interrupt declarations (see below)
To add the symbols:
There are very few things that change from a software perspective when switching between the TI compiler and the GCC compiler. One qwirk that is not uniform across compilers is that declaration of interrupts. However, using the code template below and the symbol you previously defined, the declarations can be written so that both compilers are satisfied.