Skip to content
Ryan Summers edited this page Sep 23, 2015 · 14 revisions

Using SUBLIBinal

This wiki page will guide you through the process of implementing SUBLIBinal and MPLABX assuming that you have a fresh install of linux (or any other operating system) on your computer.

Steps:


Install MPLABX

The first thing you must to is install MPLABX development environment. MPLABX is used for programming PIC microcontrollers and has been developed by Microchip.

Install MPLABX from here.

It is also necessary to install the XC32 Compiler v1.40.

top


Download the Source Code

SUBLIBinal source code and library object file can be easily downloaded through GitHub releases! Simply download the release by downloading the object file and the source code. Place the source code and the object file into an easy to access directory, as you will include this directory in your MPLABX projects.

Alternatively, you can simply use the source code to create your own project within MPLABX. Simply download the source code and create a new library project in MPLABX. Include all source and header files and build the library project. Then, in all subsequent projects that use the library, include your library project in the "library" folder. This replaces the need for an object file.

top


Clone SUBLIBinal

Clone the SUBLIBinal repository onto a directory in your computer using any git tool of your choice. The repository contains project files for MPLABX to use as configuration. On windows, Git Extensions can be a great tool for working with git repositories.

On linux, navigate to your desired directory in the command line and type the command (git must be installed)

git clone git@github.com:PalouseRobosub/SUBLIBinal.git

This will create a repository of the code on your own local machine so that you may build your own library project. Please refer to downloading the source code for information about how to create a library project.

top


Configure MPLABX Projects

The next step will walk through how to configure an MPLABX project to utilize the SUBLIBinal library. Create a new MPLABX project (File->New Project).

  1. Select Standalone Project -> Next.
  2. Select the PIC32MX250F128B for the Device parameter, then select Next.
  3. Select the Licensed Debugger, then select Next.
  4. Select the XC32 Compiler, then select next.
  5. Enter a project name and select Finish.

Now, configure the project for SUBLIBinal.

  1. Right click the project and select Project Properties.
  2. Navigate down to xc32-gcc and select (underneath Conf->XC32 submenues)
  3. Set Option categories to "Preprocessing and messages"
  4. Modify "Include directories" to include the location that you placed the SUBLIBinal source code.
  5. Select Apply.
  6. Now, navigate to Libraries
  7. Select "Add Library/Object File..."
  8. Select the object file from the obj directory in the cloned repository.
  9. Select Apply, then OK.

Your project should now be configured to properly use SUBLIBinal! To alternatively include the library object file, right click on the "Libraries" folder within your project and navigate to the object file for SUBLIBinal located in the obj/ directory of the respitory.

top


Verify Functionality

Clone this wiki locally