diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 43 |
1 files changed, 34 insertions, 9 deletions
@@ -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 |
2 | Open source firmware for the Novation Launchpad Pro grid controller! By customising this code, you can: | 4 | Open 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 | ||
19 | I'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. | 21 | I'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 |
22 | This project uses [Vagrant](https://www.vagrantup.com/) to manage the build environment. As such, you need to: | 24 | |
25 | ## Using Docker | ||
26 | |||
27 | If your system is running docker you can easily setup the environment with: | ||
28 | |||
29 | ``` | ||
30 | docker build -t novation-launchpad-pro-dev . | ||
31 | docker run -it -v $(pwd):/launchpad-pro novation-launchpad-pro-dev | ||
32 | make | ||
33 | ``` | ||
34 | |||
35 | ## Using Vagrant | ||
36 | |||
37 | To use [Vagrant](https://www.vagrantup.com/) to manage the build environment you need to: | ||
23 | 38 | ||
24 | 1. Clone this repository on your host computer (if using the command line, make sure you `git clone --recursive`). | 39 | 1. Clone this repository on your host computer (if using the command line, make sure you `git clone --recursive`). |
25 | 2. Install [Vagrant](https://www.vagrantup.com/) | 40 | 2. 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 | ||
30 | If you have a poor internet connection, ummm, find a better one :) | 45 | If you have a poor internet connection, ummm, find a better one :) |
31 | 46 | ||
32 | # Building | 47 | ### Building |
33 | Once 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. | 48 | Once 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: |
36 | 1. SSH into the Vagrant "box" by doing `vagrant ssh` | 51 | 1. SSH into the Vagrant "box" by doing `vagrant ssh` |
37 | 2. At the command prompt, simply type `make` | 52 | 2. 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 | ||
43 | 1. Log in to the Ubuntu GUI (the password is, as is the convention, **vagrant**). | 58 | 1. Log in to the Ubuntu GUI (the password is, as is the convention, **vagrant**). |
44 | 2. Launch Eclipse from the doodah on the top left (it's a bit like Spotlight) | 59 | 2. Launch Eclipse from the doodah on the top left (it's a bit like Spotlight) |
45 | 3. 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. | 60 | 3. 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. |
46 | 4. Click "Workbench" at the Ecliplse startup screen. | 61 | 4. Click "Workbench" at the Eclipse startup screen. |
47 | 5. In Eclipse, choose "File->Import..." | 62 | 5. In Eclipse, choose "File->Import..." |
48 | 6. Under "C/C++", choose "Existing Code as Makefile Project", hit "Next" | 63 | 6. Under "C/C++", choose "Existing Code as Makefile Project", hit "Next" |
49 | 7. Give the project any name you like (launchpad?) | 64 | 7. 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 | ||
55 | Either 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! | 70 | Either 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 | |||
74 | On 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 | ``` | ||
77 | brew tap PX4/homebrew-px4 | ||
78 | brew install gcc-arm-none-eabi | ||
79 | make | ||
80 | ``` | ||
81 | |||
57 | # Uploading to a Launchpad Pro | 82 | # Uploading to a Launchpad Pro |
58 | Now 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. | 83 | Now 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 | ||
60 | I 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: | 85 | I 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 | ||
92 | Instead, 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 ;) | 117 | Instead, 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 | ||
94 | If do you want to debug interactively (and of course you do), you can use the interactive desktop simulator on OS X: | 119 | If do you want to debug interactively (and of course you do), you can use the interactive desktop simulator on macOS: |
95 | 120 | ||
96 | 1. Build the Xcode project located in `/tools/osx` | 121 | 1. Build the Xcode project located in `/tools/osx` |
97 | 2. Connect your Launchpad Pro | 122 | 2. Connect your Launchpad Pro |
@@ -128,4 +153,4 @@ It appears that VirtualBox does not yet work on Windows 10. | |||
128 | If 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`. | 153 | If 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 |
131 | OK - 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 | 156 | OK - 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! |