summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDaveHodder67 <dave.hodder@focusrite.com>2015-07-01 16:00:05 +0100
committerDaveHodder67 <dave.hodder@focusrite.com>2015-07-01 16:00:05 +0100
commitb9bac4f039aaeb8fee4b2f49bef148818408ef74 (patch)
treee4c2e51b254ce66d0356ff63f6b557e71ebb424e /README.md
parentd30110407eb706b9ac84d7c5465b95560834d947 (diff)
downloadlaunchpad-polymaker-b9bac4f039aaeb8fee4b2f49bef148818408ef74.tar.gz
launchpad-polymaker-b9bac4f039aaeb8fee4b2f49bef148818408ef74.zip
importing the real code (!)
Diffstat (limited to 'README.md')
-rw-r--r--README.md66
1 files changed, 39 insertions, 27 deletions
diff --git a/README.md b/README.md
index 5424389..f5f0968 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,19 @@
1# Launchpad Pro 1# Launchpad Pro
2Open source firmware for the Novation Launchpad Pro grid controller! By customising this code, you can: 2Open source firmware for the Novation Launchpad Pro grid controller! By customising this code, you can:
3 3
4- Implement your own unique standalone modes 4- Implement your own unique standalone apps
5- Create chorders, sequencers, light shows, games and more 5- Create chorders, sequencers, light shows, games and more
6- Learn a little about firmware development! 6- Learn a little about software development!
7 7
8You definitley need *some* C programming experience, but we've deliberately kept much of the firmwarey nastiness tucked away, to make the process a little friendlier. 8You'll definiteley need *some* C programming experience, but we've deliberately kept much of the firmwarey nastiness tucked away, to make the process a little friendlier.
9 9
10# Philosophy 10# Philosophy
11We could have released the full source for the factory shipping firmware, but we've decided not to for a variety of reasons. Instead, we created a simplified framework for developing "apps" on Launchpad, which comprises a build environment, application entry points / API, and a library of low level source code. Our reasoning is as follows: 11We could have released the full source for the factory shipping firmware, but we decided not to for a variety of reasons. Instead, we created a simplified framework for developing "apps" on Launchpad, which comprises a build environment, application entry points / API, and a library of low level source code. Our reasoning is as follows:
12 12
13- There is no value in customising low level routines such as LED multiplexing or ADC scanning - this code has been carefully tweaked over many months to deliver the best results, and is not something you'd want to tweak. I'm prepared to be convinced otherwise! 13- There is no value in customising low level routines such as LED multiplexing or ADC scanning - this code has been carefully tweaked over many months to deliver the best results, and is not something you'd want to mess with.
14- There is very little value in customising main() or other low level features, and again these things are hard to do well. 14- There is very little value in customising main() or other low level features, and again these things are hard to do well. Interrupt priorities? No.
15- If we shipped the application firmware as-is, we'd have a support nightmare on our hands (imagine the support calls - my "Launchpad Pro is behaving strangely..."). Instead, we wanted to create a clear boundary between "normal" usage with Ableton, and custom firmware. As such, Ableton integration has been removed from this firmware, as has the setup / navigation functionality. 15- If we shipped the application firmware as-is, we'd have a support nightmare on our hands (imagine the phonecalls - my "Launchpad Pro is behaving strangely..."). Instead, we wanted to create a clear boundary between "normal" usage with Ableton, and custom firmware. As such, Ableton integration has been removed from this firmware, as has the setup / navigation functionality.
16- If we left the Ableton integration and menu structure in place, open firmware developers would have to work around it. They would also potentially consume precious RAM/CPU resources. I've a feeling this isn't what you'd want, but again, we're interested to hear your feedback. 16- If we left the Ableton integration and menu structure in place, open firmware developers would have to work around it. They would also potentially consume precious RAM/CPU resources. I've a feeling this isn't what you'd want, but we're interested to hear your feedback.
17- Licensing requirements for the CMSIS library version we use are ambiguous. Yes, we could port to the public version, but why bother, given the above reasoning - I'd prefer to spend my time on good documentation and examples. As such, all the CMSIS code is compiled into launchpad_pro.a, and we do not need to distribute the headers. 17- Licensing requirements for the CMSIS library version we use are ambiguous. Yes, we could port to the public version, but why bother, given the above reasoning - I'd prefer to spend my time on good documentation and examples. As such, all the CMSIS code is compiled into launchpad_pro.a, and we do not need to distribute the headers.
18 18
19I'm sure you'll have feedback for us, so please do get in touch! I'm [blogging the process too](http://dvhdr.tumblr.com/) if you'd like to read my musings. 19I'm sure you'll have feedback for us, so please do get in touch! I'm [blogging the process too](http://dvhdr.tumblr.com/) if you'd like to read my musings.
@@ -21,29 +21,45 @@ I'm sure you'll have feedback for us, so please do get in touch! I'm [blogging
21# Installation 21# Installation
22This project uses [Vagrant](https://www.vagrantup.com/) to manage the build environment. As such, you need to: 22This project uses [Vagrant](https://www.vagrantup.com/) to manage the build environment. As such, you need to:
23 23
241. Install [Vagrant](https://www.vagrantup.com/) 241. Clone this repository
252. Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)(or another virtualisation platform of your choice) 252. Install [Vagrant](https://www.vagrantup.com/)
263. `vagrant up` 263. Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
274. `vagrant up` to create a brand new development virtual machine, all configured and ready to build the firmware!
27 28
28# Building 29# Building
29SSH into the Vagrant "box" by doing `vagrant up` 30You can build the app in one of two ways. In the spirit of experimenation, I've created a full Eclipse development environment for you to use. However, you might prefer to do things on the command line. (if you do, you might also want to run your Vagrant box headless, which you can do by hacking the Vagrantfile).
30At the command prompt, simply type `make`
31 31
32This will generate the firmware launchpad_pro.syx file in the build directory. You can then upload this to your Launchpad Pro from the host! 32# To use the command line interface:
331. SSH into the Vagrant "box" by doing `vagrant ssh`
342. At the command prompt, simply type `make`
35
36# To build using the Eclipse GUI
37
381. Log in to the Ubuntu GUI (the password is, as is the convention, "vagrant").
392. Launch Eclipse from the doodah on the top left (it's a bit like Spotlight)
403. This is the annoying bit. I can't figure out how to store the project in source control, so you need to import it.
414. In Eclipse, choose "File->Import..."
425. Under "C/C++", choose "Makefile project with existing code"
436. Give the project any name you like (launchpad?)
447. Under "Existing code location" choose /vagrant
458. Hit Finish. You should now see your project on the left!
469. Click the build icon at the top, and wait while the project builds.
47
48Either of the above methods will generate the firmware launchpad_pro.syx file in the /build directory. You can then upload this to your Launchpad Pro from the host!
33 49
34# Uploading to a Launchpad Pro 50# Uploading to a Launchpad Pro
35Now 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 know better than I do! 51Now 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.
36 52
37I won't describe how to use these tools, I'm sure you already know - and if you don't, their documentation is better than mine! Here's what you need to do: 53I 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:
38 54
391. Unplug your Launchpad Pro 551. Unplug your Launchpad Pro
402. Hold the "setup" button down while connecting it to your host via USB (ensure it's connected to the host, and not to a virtual machine!) 562. Hold the "Setup" button down while connecting it to your host via USB (ensure it's connected to the host, and not to a virtual machine!)
413. The unit will start up in "bootloader" mode 573. The unit will start up in "bootloader" mode
424. "play" your launchpad_pro.syx file to the device - it should breifly scroll "updateing..." across the grid 584. Send your launchpad_pro.syx file to the device MIDI port - it should briefly scroll "updating..." across the grid.
435. Wait for the update to complete, and for the device to reboot! 595. Wait for the update to complete, and for the device to reboot!
44 60
45# Bricked it! 61# Bricked it!
46Don't worry - even if you upload toxic nonsense to the device, you cannot brick it - the bootloader is stored in a protected area of flash. If your new firmware doesn't boot, you'll get stuck at step (3) above. Simply repeat the process with the shipping firmware image (Launchpad Pro-1.0.154.syx) to restore your unit to the factory defaults. 62Don't worry - even if you upload toxic nonsense to the device, you cannot brick it - the bootloader is stored in a protected area of flash. If your new firmware doesn't boot, you'll get stuck at step (3) above, or with a crashed unit. Simply repeat the above process with the shipping firmware image (resources/Launchpad Pro-1.0.154.syx) to restore your unit to the factory defaults. Better yet, fix the bugs :)
47 63
48# API 64# API
49The most crucial parts of the API are: 65The most crucial parts of the API are:
@@ -51,18 +67,14 @@ The most crucial parts of the API are:
51- Recieving messages from the pads and buttons 67- Recieving messages from the pads and buttons
52- Writing colours to the LEDs 68- Writing colours to the LEDs
53- Sending and receiving messages from the MIDI ports 69- Sending and receiving messages from the MIDI ports
54- Receiving a tick message to drive timing based code 70- Receiving a tick message to drive timer based code
55
56Up for debate:
57 71
58- USB MIDI support (why not just implement on the host in programmer mode using the factory firmware?) 72The best way to learn about these is to read the documentation in app.h, and to study the example code!
59- Flash memory read / write access
60- Setup button behaviour
61 73
62# Debugging 74# Debugging
63We decided not to support or encourage using a JLink or similar for debugging, as opening a Launchpad Pro to fit a debugging header can easily damage the FSR (force sensitive resistor) sheet. 75We decided not to support or encourage using a hardware debugger, as opening a Launchpad Pro to fit a debugging header can easily damage the FSR (force sensitive resistor) sheet.
64 76
65Instead, you're going to have to do things the old fashioned way - by blinking LEDs or sending MIDI messages. FWIW, that's the way I've developed this version of the firmware - dogfooding all the way ;) 77Instead, you're going to have to do things the old fashioned way - by blinking LEDs or sending MIDI messages. FWIW, that's the way I've developed this version of the firmware - dogfooding all the way ;)
66 78
67If you want to test code in detail, we suggest developing it on a host (we'd love to release our simulator environment at a later stage, but there are currently no plans to do so). 79If you want to test code in detail, we suggest developing it on a host. I want to develop a host app which presents the same API to app.c, but which forwards all messages to and from the hardware Launchpad Pro via MIDI - that way you'll be able to debug most code on the host very nicely.
68 80