summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDave Hodder <dave.hodder@focusrite.com>2017-11-20 13:54:16 +0000
committerDave Hodder <dave.hodder@focusrite.com>2017-11-20 13:54:16 +0000
commitd910a607b308c5ed02e476a5051fac184f61c86f (patch)
treeda05174d3c8c6846359e4d16f0cee06bb4703aba /README.md
parentaf0c758cceb310b69c9192d7cdc8133ba63a3f98 (diff)
parent7ff741e4206b75e941aa982360402bc8f8e58198 (diff)
downloadlaunchpad-polymaker-d910a607b308c5ed02e476a5051fac184f61c86f.tar.gz
launchpad-polymaker-d910a607b308c5ed02e476a5051fac184f61c86f.zip
Merge branch 'raw-adc' (bringing in ADC and flash access)
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 7 insertions, 10 deletions
diff --git a/README.md b/README.md
index cb9d039..b1c6b60 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,6 @@ Open source firmware for the Novation Launchpad Pro grid controller! By customi
9 9
10You'll definitely need *some* C programming experience, but we've deliberately kept much of the firmwarey nastiness tucked away, to make the process a little friendlier. 10You'll definitely need *some* C programming experience, but we've deliberately kept much of the firmwarey nastiness tucked away, to make the process a little friendlier.
11 11
12This project is still at an early stage, and no "interesting" example apps have yet been developed. You might want to hang on until there's something more detailed before you get stuck in. Or not!
13
14# Philosophy 12# Philosophy
15We 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 Pro, which comprises a build environment, application entry points / API, and a library of low level source code. Our reasoning is as follows: 13We 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 Pro, which comprises a build environment, application entry points / API, and a library of low level source code. Our reasoning is as follows:
16 14
@@ -71,9 +69,9 @@ Once your new "box" is up and running, you can build the app in one of two ways.
71 69
72Either 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!
73 71
74## Using OS X 72## Using macOS
75 73
76On OS X 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: 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:
77 75
78``` 76```
79brew tap PX4/homebrew-px4 77brew tap PX4/homebrew-px4
@@ -82,7 +80,7 @@ make
82``` 80```
83 81
84# Uploading to a Launchpad Pro 82# Uploading to a Launchpad Pro
85Now 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.
86 84
87I 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:
88 86
@@ -109,17 +107,16 @@ By calling into the HAL, your app can:
109 107
110- Write colours to the LEDs 108- Write colours to the LEDs
111- Send messages to the MIDI/USB ports 109- Send messages to the MIDI/USB ports
110- Store and recall a little bit of data on the Launchpad Pro's flash memory
112 111
113The best way to learn about these is to read the documentation in `app.h`, and to study the (very basic) example code! 112The best way to learn about these is to read the documentation in `app.h`, and to study the (very basic) example code!
114 113
115Currently the HAL/app interface does not support reading or writing the flash memory.
116
117# Debugging 114# Debugging
118We 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. 115We 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.
119 116
120Instead, 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 ;)
121 118
122If 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:
123 120
1241. Build the Xcode project located in `/tools/osx` 1211. Build the Xcode project located in `/tools/osx`
1252. Connect your Launchpad Pro 1222. Connect your Launchpad Pro
@@ -127,7 +124,7 @@ If do you want to debug interactively (and of course you do), you can use the in
1274. Put the Launchpad Pro into "Programmer" mode using the Setup button (you'll get odd behaviour otherwise) 1244. Put the Launchpad Pro into "Programmer" mode using the Setup button (you'll get odd behaviour otherwise)
1285. Start debugging in Xcode! 1255. Start debugging in Xcode!
129 126
130Currently it only supports button presses and LED messages - there's no virtual MIDI IO, setup button or aftertouch (yet). It has a really awful busywaiting timer for the 1kHz tick. However, it does allow you to debug your application logic using Xcode! 127Currently it only supports button presses and LED messages - there's no setup button, flash storage or aftertouch (yet). It has a really awful busywaiting timer for the 1kHz tick. However, it does allow you to debug your application logic using Xcode!
131 128
132You can also use the simple command-line simulator located in the `/tools` directory. It is compiled and ran as part of the build process, so it serves as a very basic test of your app before it is baked into a sysex dump - more of a test harness. 129You can also use the simple command-line simulator located in the `/tools` directory. It is compiled and ran as part of the build process, so it serves as a very basic test of your app before it is baked into a sysex dump - more of a test harness.
133 130
@@ -142,7 +139,7 @@ To debug the simulator interactively in Eclipse:
142# The Hardware 139# The Hardware
143The Launchpad Pro is based around an ARM Cortex M3 from STMicroelectronics. Specifically, an [STM32F103RBT6](http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1031/LN1565/PF164487). It's clocked at 72MHz, and has 20k RAM (I'm not sure how much of this we're using in the open build yet - should be a fair amount left but I haven't measured it). The low level LED multiplexing and pad/switch scanning consume a fair bit of CPU time in interrupt mode, but have changed a little in the open firmware library (so again, I don't have measurements for how many cycles they're using). 140The Launchpad Pro is based around an ARM Cortex M3 from STMicroelectronics. Specifically, an [STM32F103RBT6](http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1031/LN1565/PF164487). It's clocked at 72MHz, and has 20k RAM (I'm not sure how much of this we're using in the open build yet - should be a fair amount left but I haven't measured it). The low level LED multiplexing and pad/switch scanning consume a fair bit of CPU time in interrupt mode, but have changed a little in the open firmware library (so again, I don't have measurements for how many cycles they're using).
144 141
145It has 128k of flash memory, but I'm pretty sure we won't be exposing all of it as part of this API (dangerously easy to corrupt things!). Current thinking is to expose a few pages for use by apps, though this would still introduce risks (accidentally wearing out sectors, for example). To be continued... 142It has 128k of flash memory, but we won't be exposing all of it as part of this API (dangerously easy to corrupt things!).
146 143
147# Vagrant tips 144# Vagrant tips
148When you're done developing, simply type `vagrant suspend` to halt your VM without destroying it - this will make `vagrant up` a lot quicker next time. If you're really finished, `vagrant destroy` will completely remove the VM from your system (but not any of your code). 145When you're done developing, simply type `vagrant suspend` to halt your VM without destroying it - this will make `vagrant up` a lot quicker next time. If you're really finished, `vagrant destroy` will completely remove the VM from your system (but not any of your code).