embeddedlibrary
reusable software modules for embedded systems
|
This guide assumes you have already created a project and have the library on your PC
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. Unfortunately, MPLABX requires a workaround for you to configure this correctly. From the Include Directories window:
Press Ok when you are done making changes
Once you have setup your include directories, you'll need to add the source files to your project. First start by adding the library modules to your project. To do so:
Also, note that you will need to add all dependencies for a desired library. For example, if you use the UART module, you will need to add the charReceiver module as well. Refer to module documentation to determine dependencies.
Once you have added the library source files to your project, you will need to follow the same procedure to add the HAL layer's source files for the desired processor. These source files are located at 'PathtoLibrary/hal/ProcessorFamily/Processor (example "PathtoLibrary\hal\MSP430\MSP430F5529")'. WARNING: DO NOT ADD THE hal_timing.c FILE! This file is automatically included through the timing.c file (a trick used to make the timing interrupt as efficient as possible).