summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md43
1 files changed, 34 insertions, 9 deletions
diff --git a/README.md b/README.md
index 910cb08..b1c6b60 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
1[![Build Status](https://travis-ci.org/dvhdr/launchpad-pro.svg?branch=master)](https://travis-ci.org/dvhdr/launchpad-pro)
2
1# Launchpad Pro 3# Launchpad Pro
2Open source firmware for the Novation Launchpad Pro grid controller! By customising this code, you can: 4Open source firmware for the Novation Launchpad Pro grid controller! By customising this code, you can:
3 5
@@ -18,8 +20,21 @@ We could have released the full source for the factory shipping firmware, but we
18 20
19I'm sure you'll have feedback for us, so please do get in touch! I'm [blogging the process too](http://launchpadfirmware.tumblr.com/) if you'd like to read my musings. 21I'm sure you'll have feedback for us, so please do get in touch! I'm [blogging the process too](http://launchpadfirmware.tumblr.com/) if you'd like to read my musings.
20 22
21# Installation 23# Setup the Development Environment
22This project uses [Vagrant](https://www.vagrantup.com/) to manage the build environment. As such, you need to: 24
25## Using Docker
26
27If your system is running docker you can easily setup the environment with:
28
29```
30docker build -t novation-launchpad-pro-dev .
31docker run -it -v $(pwd):/launchpad-pro novation-launchpad-pro-dev
32make
33```
34
35## Using Vagrant
36
37To use [Vagrant](https://www.vagrantup.com/) to manage the build environment you need to:
23 38
241. Clone this repository on your host computer (if using the command line, make sure you `git clone --recursive`). 391. Clone this repository on your host computer (if using the command line, make sure you `git clone --recursive`).
252. Install [Vagrant](https://www.vagrantup.com/) 402. Install [Vagrant](https://www.vagrantup.com/)
@@ -29,21 +44,21 @@ This project uses [Vagrant](https://www.vagrantup.com/) to manage the build envi
29 44
30If you have a poor internet connection, ummm, find a better one :) 45If you have a poor internet connection, ummm, find a better one :)
31 46
32# Building 47### Building
33Once your new "box" is up and running, you can build the app in one of two ways. In the spirit of experimentation, we've created a full Eclipse development environment for you to use. However, you might prefer to do things on the command line. 48Once your new "box" is up and running, you can build the app in one of two ways. In the spirit of experimentation, we've created a full Eclipse development environment for you to use. However, you might prefer to do things on the command line.
34 49
35# To use the command line interface: 50### To use the command line interface:
361. SSH into the Vagrant "box" by doing `vagrant ssh` 511. SSH into the Vagrant "box" by doing `vagrant ssh`
372. At the command prompt, simply type `make` 522. At the command prompt, simply type `make`
38 53
39# To build using the Eclipse GUI 54### To build using Eclipse GUI
40 55
41**Make sure you wait until the `vagrant up` command has fully completed** before logging in to your VM. The GUI appears long before the provisioning script finishes. If you don't, you'll have to log out and log back in again before Eclipse can see the correct path. 56**Make sure you wait until the `vagrant up` command has fully completed** before logging in to your VM. The GUI appears long before the provisioning script finishes. If you don't, you'll have to log out and log back in again before Eclipse can see the correct path.
42 57
431. Log in to the Ubuntu GUI (the password is, as is the convention, **vagrant**). 581. Log in to the Ubuntu GUI (the password is, as is the convention, **vagrant**).
442. Launch Eclipse from the doodah on the top left (it's a bit like Spotlight) 592. Launch Eclipse from the doodah on the top left (it's a bit like Spotlight)
453. Accept the default when Eclipse asks you for a workspace. I can't figure out how to store the workspace in source control, so you need to import it. 603. Accept the default when Eclipse asks you for a workspace. I can't figure out how to store the workspace in source control, so you need to import it.
464. Click "Workbench" at the Ecliplse startup screen. 614. Click "Workbench" at the Eclipse startup screen.
475. In Eclipse, choose "File->Import..." 625. In Eclipse, choose "File->Import..."
486. Under "C/C++", choose "Existing Code as Makefile Project", hit "Next" 636. Under "C/C++", choose "Existing Code as Makefile Project", hit "Next"
497. Give the project any name you like (launchpad?) 647. Give the project any name you like (launchpad?)
@@ -54,8 +69,18 @@ Once your new "box" is up and running, you can build the app in one of two ways.
54 69
55Either of the above methods will generate the firmware image, `launchpad_pro.syx`, in the project `build` directory. You can then upload this to your Launchpad Pro from the host! 70Either of the above methods will generate the firmware image, `launchpad_pro.syx`, in the project `build` directory. You can then upload this to your Launchpad Pro from the host!
56 71
72## Using macOS
73
74On macOS you can easily install the GCC ARM toolchain using the [homebrew package manager](http://brew.sh). The EABI tools are maintained in an external repository which you need to put on tap first. You can then run ```make``` to directly compile the code:
75
76```
77brew tap PX4/homebrew-px4
78brew install gcc-arm-none-eabi
79make
80```
81
57# Uploading to a Launchpad Pro 82# Uploading to a Launchpad Pro
58Now you've got some nice new code to run! To upload it to your Launchpad Pro, you'll need a sysex tool for your host platform (I'd love to get it working from the virtual machine, but that's for later). I recommend [Sysex Librarian](http://www.snoize.com/SysExLibrarian/) on OS X, and [MIDI OX](http://www.midiox.com/) on Windows. On Linux, I'll bet you already have a tool in mind. 83Now you've got some nice new code to run! To upload it to your Launchpad Pro, you'll need a sysex tool for your host platform (I'd love to get it working from the virtual machine, but that's for later). I recommend [Sysex Librarian](http://www.snoize.com/SysExLibrarian/) on macOS, and [MIDI OX](http://www.midiox.com/) on Windows. On Linux, I'll bet you already have a tool in mind.
59 84
60I won't describe how to use these tools, I'm sure you already know - and if you don't, their documentation is superior to mine! Here's what you need to do: 85I won't describe how to use these tools, I'm sure you already know - and if you don't, their documentation is superior to mine! Here's what you need to do:
61 86
@@ -91,7 +116,7 @@ We decided not to support or encourage using a hardware debugger, as opening a L
91 116
92Instead, you're going to have to do things the old fashioned way - by blinking LEDs or sending MIDI messages (though hopefully no need for a 'scope!). For what it's worth, that's the way I've developed this version of the firmware - dogfooding all the way ;) 117Instead, you're going to have to do things the old fashioned way - by blinking LEDs or sending MIDI messages (though hopefully no need for a 'scope!). For what it's worth, that's the way I've developed this version of the firmware - dogfooding all the way ;)
93 118
94If do you want to debug interactively (and of course you do), you can use the interactive desktop simulator on OS X: 119If do you want to debug interactively (and of course you do), you can use the interactive desktop simulator on macOS:
95 120
961. Build the Xcode project located in `/tools/osx` 1211. Build the Xcode project located in `/tools/osx`
972. Connect your Launchpad Pro 1222. Connect your Launchpad Pro
@@ -128,4 +153,4 @@ It appears that VirtualBox does not yet work on Windows 10.
128If your connection drops out while updating the Vagrant box, you can get stuck, unable to `vagrant up`. To resolve, you need to delete the temp file - `~/vagrant.d/tmp`. 153If your connection drops out while updating the Vagrant box, you can get stuck, unable to `vagrant up`. To resolve, you need to delete the temp file - `~/vagrant.d/tmp`.
129 154
130# Firmware development tips 155# Firmware development tips
131OK - we're not going to need to use the MISRA rules, but there are a few things to avoid. Dynamic memory allocation is a no (well it will work, but it's best avoided). Floating point will work, but it's implemented in software and will be slooooow. C++ ought to work, but you'll definitely want to avoid exceptions and RTTI! \ No newline at end of file 156OK - we're not going to need to use the MISRA rules, but there are a few things to avoid. Dynamic memory allocation is a no (well it will work, but it's best avoided). Floating point will work, but it's implemented in software and will be slooooow. C++ ought to work, but you'll definitely want to avoid exceptions and RTTI!