Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step 2: Join our GitHub organization uw-midsun

Step 3: Follow your system specific instructions below

Windows:

Word of Warning: This install is probably the most painful and likely to break/not work do your best and if you get stuck just ask

Step 1: Download and install Eclipse this will require at minimum a JRE or JDK version 1.7.0 or higher. I had issues with the x86 or 64 bit install so you may want to consider something just installing the x64 or 32 bit version first. Also note: when you get to the Eclipse installer you only need the C/C++ version of Eclipse.

Step 2: Follow this guide to install the correct build tools and the GCC ARM compiler and set them up in your environment. 

Step 3: Install Python version 2.7 you will need to add it to your environment path so that the Makefile runs the lint correctly.

Step 4: In theory that should be everything. Try it by cloning a copy of the template from here and building it in Eclipse. If you can't build then you may have to use bash for Windows 10 to build (goto step 6).

If building in Eclipse works for you then you can stop here. Note that linting may require you to use Powershell of bash for Windows and run the command "python cpplint.py <path to file(s)>" in the project-template directory.

Step 5: Follow this guide to set up bash for Windows 10. If you don't have Windows 10 I suggest getting a Linux VM at this point.

Step 6: Goto step 1 of the Linux guide and follow it (I only needed to install gcc-arm-none-eabi and make). You can skip step 4 as Bash for Windows does not support usb interfaces. You will have to debug from Eclipse. 

Step 7: Run make and watch success happen (I almost guarantee this will work).

Congrats if you made it this far without actually dual-booting or getting a Linux VM!

Linux:

In theory, this is the easiest install method. For that reason, those interested in running a VM or dual-booting their machine to get Linux are welcome to do so. Although, we don't explicitly support either we can probably provide guidance if you get really stuck. However, if you break anything doing it we are not liable!

This step by step is currently for Ubuntu adjust to your system as needed

Step 1: Install 32 bit C libraries and some of the build tools if you don't have them. There may be more if you aren't on Ubuntu (if you are on Arch you many need all of multilib :'( )

Code Block
languagebash
firstline1
$ sudo apt-get -y install lib32ncurses5 gdb python2 gcc-arm-none-eabi

Python may be called python or python2 or python2.7 depending on your distro.

Step 2: If you weren't able to download the gcc toolchain download, unpack and install the GCC ARM Linux tarball from here. Add Python 2.7 to your ~/.bashrc or ~/.bash_profile if is isn't already in your PATH. Also give is the bash alias python2 if it isn't already accessible under that name.

Step 4: Install st-link or OpenOCD, they may be in your package repository but you can always build from source. 

Step 5: In theory that is everything, assuming your distribution is sane and already has make installed. Grab an IDE or text editor if you don't already have one you like. The link in step 2 of the Windows guide has a tutorial for setting up Eclipse if that is your preferred IDE.

Step 6: Try cloning a copy of the template from here and building it by navigating to the directory and typing 

Code Block
languagebash
firstline1
$ make

If it compiles you did everything right (except perhaps the linter (check this by running make lint) if not you need to fix or add something. You should produce a file called main.elf.

Mac OS X:

All this has been tested on a Virtual Machine running El Capitan.

Step 1: Follow the commands on this site to install brew.

Step 2: Install gcc-arm-embedded using brew

Code Block
languagebash
themeConfluence
brew cask install gcc-arm-embedded

Step 3: If you have Python 3 installed (or Python 2 is called via python), alias python2.7 to python2.

Code Block
languagebash
themeConfluence
alias python2='/usr/bin/python2.7'

You should probably add this to your ~/.bash_profile or ~/.bashrc, depending on how you configure your bash variables.

Step 4: Try cloning a copy of the template from here and building it by navigating to the directory and typing 

Code Block
languagebash
firstline1
$ make

If it compiles, you did everything right (except perhaps the linter (check this by running make lint) if not you need to fix or add something. You should produce a file called main.elf.Download Vagrant and Virtual Box

Step 4: Install the Vagrant image

Step 5: Start the Vagrant box

Code Block
themeConfluence
$ vagrant up 

(this may take a while) and

Code Block
themeConfluence
$ vagrant ssh 

into the box

Step 6: Change directory into the firmware folder 

Code Block
themeConfluence
$ cd ~/env/firmware

Step 7: Run make 

Optional: learn more bash shell commands if you want

Project Template

The package template contains seven directories, a Makefile, a linter and a README. Use this for starting new projects only. Existing projects will have their own repositories which will share a copy of libraries, linker, and extra. 

...

Code Block
languagebash
firstline1
$ make lint
OR
$ python cpplint.py <file(s)>
OR
$ python2 cpplintlint.py <file(s)>

Running make lint executes cpplint on all files in src and inc. If you want to just lint specific files use python cpplint. Note the cpplint will accept wildcards in the file definitions.

...