Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
chrishajduk84 edited this page Apr 15, 2015 · 9 revisions

To get started, you will need three things:

Github Setup

A similar powerpoint presentation can be found here:https://docs.google.com/presentation/d/1HkjCdRQyY1LFaUO-24SxHGLx4cgeq_Z5OWQQNKFfidM/edit?usp=sharing

If you are not using the GUI skip this section.

  1. Setup a Github Account
  2. Select "Set up Git"
  3. Select "Download GitHub for "
  4. Select "Run" and continue through the installation process
  5. Once the installation is complete, launch the application.
  6. Log in
  7. Find the Git Bash shell and type in the following commands:
    git config global user.name "YOUR USERNAME HERE"
    git config global user.email "YOUR EMAIL HERE"
    These set the default name and email you use when committing to GitHub.
  8. At this point you will need to let one of the WARG team leads know your username, so that you can be added to the repository member's list.
  9. You should then be able to clone the project using the clone button, or the project URL.

You should now have the code.

MPLAB Setup

You now need the libraries and compilers, as well as the optional MPLAB X IDE, in order to develop code.

Compiler

  1. Download the compiler. You want the MPLAB XC16 Compiler V1.21 or newer. Unzip the file once it is completed.
  2. Accept the license agreement.
  3. Select "Install Compiler".
  4. Select "Install MPLAB XC16 C Compiler on this computer.
  5. Leave the activation key blank. Confirm "Yes" when the dialog prompts you about using the free version.
  6. Select "Run the compiler in free mode".
  7. Select the installation directory.
  8. Run and finish the installation.
  • Note whenever you make a new project, make sure the right compiler is selected, otherwise there will be a lot of indicated syntax errors (red underlines).

IDE (The fancy word editor that lets you do some code-shenanigans)

  1. Download the IDE Package. You want the MPLAB X IDE V2.10 or newer. Unzip the file once it is completed.
  2. Proceed through the installation process (select installation directory, accept license agreement).

GitHub Usage

If you don't know how to use Git or you need a reference, GitImmersion is a great website.

####GUI Usage:

  • Make sure you have correctly set your default storage location in the Options menu.

Saving Files (Committing and Pushing)

  1. Select your Project
  2. Select the files that are supposed to be committed.
  3. Write a commit message, that gives a general overview about each change completed in this update.
  4. Hit "Commit".
  5. Once you are ready to sync the changes, hit the sync button (top of the window).

Reading Files from the Server (Pulling)

  • Simply click the sync button at top of the window.

####General Syntax (Git Bash):

  • git add <Filename> or git add . stages the file for commit.
  • git status displays all changes being made.
  • git commit -m "<Commit message here>" makes the change.
  • git push sends the change to the server
  • git pull retrieves the latest change from the server.
  • git checkout <HASH> retrieves a SPECIFIC version from the server.
  • git checkout -b <Branch Name> creates a new branch.
  • git merge master merges the current branch with the latest code.

####General Concepts:

  • When making small changes it is okay to commit to the master branch.
  • When making large changes (that take multiple days to complete), always make a branch, so that others can work concurrently without compiling broken code.
  • Always build your code before committing (To make sure it isn't broken).
  • Try and get rid of warnings if possible.