Skip to content

Latest commit

 

History

History
163 lines (106 loc) · 5.28 KB

INSTALL.md

File metadata and controls

163 lines (106 loc) · 5.28 KB

How to install and use the Bare-Arduino-Project

Table of Contents generated with DocToc

About

You will be guided during the installation and setup of the toolchain.

The toolchain gathers all the pieces of software you need to successfully write, compile, debug, recompile and upload the code of your Arduino projects.

It took us quite some time to figure out what to do, how to do it, which Homebrew formula to install, how to use the Makefile and so on. When we say quite some time, you can count full working weeks of reading, trying, trying again, cursing because nothing is working, dead ends, new ideas, clearer vision and finally a working toolchain.

It's our present to the world!

Have fun! :)

Installation Guide

Important note about bugs and issues

If during or after the installation process, something does not work with the Bare-Arduino-Project, please **first report the issue here** in this repo issue tracker and not in Arduino-Makefile.

It will allow us to investigate first and not overflow the Arduino-Makefile issue tracker with unrelated issues.

Getting Ready - The Toolbox

OS X

Before starting, please make sure you have those installed:

  • Arduino IDE 1.0.x - Download the app from the website
  • Homebrew - Follow the instructions on their website
  • Git - use brew install git to install the latest version

Important Note : the Arduino IDE 1.5.x and 1.6.x BETA are not suppported yet. Refer to issue #45 in Arduino-Makefile for more information. Pull requests are welcome there.

Linux

Before starting we need to install git and arduino:

# First add the git-core ppa
$ sudo add-apt-repository ppa:git-core/ppa

# Update list
$ sudo apt-get update && sudo apt-get upgrade

# Install git 2.x.x and Arduino 1.0.x
$ sudo apt-get install git arduino

1. Install avr-gcc, binutils, avr-libc and avrdude

OS X

We've made a Homebrew formula that you can tap like dat ass:

$ brew tap WeAreLeka/avr
$ brew install avr-libc
$ brew install avrdude

Check that everything has been installed properly by running avr-gcc -v and avrdude -v.

Linux

$ sudo apt-get install gcc-avr binutils avr-libc avrdude

Make sure everything is up and running by running avr-gcc -v and avrdude -v.

2. Clone Bare-Arduino-Project repository from Github

Simply clone the repo:

$ git clone https://github.com/WeAreLeka/Bare-Arduino-Project path/to/New_Arduino_Project

Initialize and update submodules:

$ cd path/to/New_Arduino_Project
$ git submodule update --init --recursive

Create a Github repository and push to it:

$ cd path/to/New_Arduino_Project
$ git remote set-url origin https://github.com/{{YOUR GITHUB USERNAME}}/New_Arduino_Project
$ git push --set-upstream origin master

3. Install pySerial

To upload the program, we need to reset the Arduino board. This is done using a python script stored in ./Arduino-Makefile/bin

First, if you don't already have Python, you can install it using Homebrew on OS X:

$ brew install python

Then install pySerial:

$ pip install pyserial

4. Test that evrything is up and running

To make sure you're up and running to hack Arduino, we are going to compile some code.

First cd to src/mySecondProject folder:

$ cd path/to/New_Arduino_Project
$ cd src/BarProject

Then copy the Makefile-Example.mk:

1 if you are on OS X
$ cp ../../Makefile-OSX.mk ./Makefile

# or if you're running Linux
$ cp ../../Makefile-Linux.mk ./Makefile

Don't forget to modify the Makefile to suit your needs.

Then compile and upload your code to an Arduino Uno:

$ make
$ make upload

If it's not working, make sure everything has been installed correctly and check your Makefile configuration. Also make sure you are using and Arduino Uno.

If nothing seems to help, you can fill an issue here.