diff --git a/Appendix-C:-Firmware-programming.md b/Appendix-C:-Firmware-programming.md index 88317b1..c7c2a5d 100644 --- a/Appendix-C:-Firmware-programming.md +++ b/Appendix-C:-Firmware-programming.md @@ -1,12 +1,54 @@ -### If you only want to change the EQ of the DAC, you don't have to do any of this. +This guide is set up into three parts: + 1. Changing the EQ of the amplifier + 2. Uploading new firmwares to the amplifier + 3. Building your own firmwares -A much faster, easier way of changing the EQ is to use [George Norton's Headphones Toolbox](https://github.com/george-norton/headphones-toolbox). It's a powerful GUI tool that allows you to shape the EQ any way that you want to. And, it's completely free! Check it out. +Read on to find out more! -Otherwise: +## 1. Changing the EQ of the amplifier -Loading new firmware onto the amplifier board is a core feature of the Ploopy Headphones. In this section, you'll learn how to do it, from start to finish. Even if you have no programming experience whatsoever, this guide will make it possible for you. +If you only want to change the EQ of the amplifier, the fastest, easiest way of changing it is to use [George Norton's Headphones Toolbox](https://github.com/george-norton/headphones-toolbox). It's a powerful GUI tool that allows you to shape the EQ any way that you want to. And, it's completely free! Check it out. -## Set up your computer to build new firmwares +## 2. Uploading new firmwares to the amplifier + +Uploading [the latest firmware](https://github.com/ploopyco/headphones/releases) to your amplifieris very easy! All you need is a pair of tweezers, a screwdriver, and about five minutes. Read on to find out how. + +Start by using a screwdriver to open up that case. You won't break anything, probably. + +Now, a bit of a background lesson. The Ploopy Headphones amplifier operates in two modes. + +**The first mode is "normal operation"**. This mode is used when you plug the amplifier in normally. Pretty normal, really. That's why it's called "normal". + +**The second mode is "boot selection"**. This mode is used to load new firmwares onto the board. In order to activate boot selection mode, we need to toggle the BOOTSEL switch. + +*"But wait!"*, you may be saying. *"There's no switch on the board!"* And, you're correct. Sort of. Actually, no, you're wrong. + +Take a look at the board. + +![](https://lh3.googleusercontent.com/pw/AMWts8AsqJpv4Z-_AeDbjSMjyK-UbV1nVMO0w8796l3lqY3TrNW8k8H8RnKWoO_k7sRrxzNFnHPSg9ClJ_N5J-iBvtWs_OVIPDFXa26ACGreTc49G5VxxcsP4nmDZSVmglJ04VvuOQ6mhAYSEr4PF2HOshQG=w1434-h955-no?authuser=0) + +Do you see those two golden holes in the board? Those are called **vias**. They act exactly like a switch does. Right now, that switch is OFF. However, if you take a paperclip or a pair of metal tweezers and touch those two vias, the two vias will form an electrical connection. Effectively, that switch turns ON. + +Go ahead and connect the two vias, and then (while the vias are connected) plug in the amplifier board into your computer. + +The computer should recognise that a mass storage device was just plugged in. Once this is done, you should be able to drag and drop files onto the amplifier board, as if the board was a USB drive. Feel free to remove the tweezers or paperclip at this point. + +**Bingo, bongo, you're now in boot selector mode!** If you want to upload a new firmware file ([a ".uf2" file, like "ploopy_headphones_pm420" or something](https://github.com/ploopyco/headphones/releases)), just drag it into the folder, and it'll automatically install on the amplifier and restart itself, in normal operating mode. You're done! + +To summarise: if you want to upload new firmware, + +1. Put the amplifier into "BOOTSEL" or "boot selector" mode. +2. Wait for your computer to recognise the amplifier as a USB mass storage device. +3. Drag and drop [your new firmware](https://github.com/ploopyco/headphones/releases) onto the amplifier. +4. Wait a bit as it automatically resets itself. + +And boom, you've uploaded new firmware! + +## 3. Building your own firmwares + +Creating new firmware for the amplifier board is a core feature of the Ploopy Headphones. In this section, you'll learn how to do it, from start to finish. Even if you have no programming experience whatsoever, this guide will make it possible for you. + +### Set up your computer to build new firmwares The Ploopy Headphones amplifier board is powered with an RP2040, a chip that is designed by the Raspberry Pi Foundation. Programming it is fairly straightforward. @@ -25,7 +67,7 @@ To get started: For the remainder of this guide, it is assumed that you are using Visual Studio Code to write and build firmwares. If you're not, you're on your own. -## Add pico-extras to your build environment +### Add pico-extras to your build environment [Go to the pico-extras source page and download the source](https://github.com/raspberrypi/pico-extras). Put it in the same directory that you put the `pico-sdk` directory. @@ -39,46 +81,9 @@ And, congratulations! Your machine is now fully configured to create firmwares f That was probably a lot of work. Have a cookie and celebrate. -## Open up the amplifier board case - -Yup, you'll need access to your amplifier board, so grab a screwdriver and open up that case. You won't break anything, probably. - -## Toggle BOOTSEL vias on the amplifier board - -The Ploopy Headphones amplifier operates in two modes. - -**The first mode is "normal operation"**. This mode is used when you plug the amplifier in normally. Pretty normal, really. That's why it's called "normal". - -**The second mode is "boot selection"**. This mode is used to load new firmwares onto the board. In order to activate boot selection mode, we need to toggle the BOOTSEL switch. - -*"But wait!"*, you may be saying. *"There's no switch on the board!"* And, you're correct. Sort of. Actually, no, you're wrong. - -Take a look at the board. - -![](https://lh3.googleusercontent.com/pw/AMWts8AsqJpv4Z-_AeDbjSMjyK-UbV1nVMO0w8796l3lqY3TrNW8k8H8RnKWoO_k7sRrxzNFnHPSg9ClJ_N5J-iBvtWs_OVIPDFXa26ACGreTc49G5VxxcsP4nmDZSVmglJ04VvuOQ6mhAYSEr4PF2HOshQG=w1434-h955-no?authuser=0) - -Do you see those two golden holes in the board? Those are called **vias**. They act exactly like a switch does. Right now, that switch is OFF. However, if you take a paperclip or a pair of metal tweezers and touch those two vias, the two vias will form an electrical connection. Effectively, that switch turns ON. - -Go ahead and connect the two vias, and then (while the vias are connected) plug in the amplifier board into your computer. - -The computer should recognise that a mass storage device was just plugged in. Once this is done, you should be able to drag and drop files onto the amplifier board, as if the board was a USB drive. - -**Bingo, bongo, you're now in boot selector mode!** - -Now, unplug the board, disconnect the two vias, and plug it back in. You should be back in normal operating mode. - -To summarise: if you want to upload new firmware, - -1. Put the amplifier into "BOOTSEL" or "boot selector" mode. -2. Wait for your computer to recognise the amplifier as a USB mass storage device. -3. Drag and drop your new firmware (a ".uf2" file, such as "ploopy-headphones.uf2") onto the amplifier. -4. Wait a bit as it automatically resets itself. - -And boom, you've uploaded new firmware! - *"But wait!"*, you may be asking yourself. *"How do I create new firmware?"* Great question! -## Create your first Ploopy Headphones firmware +### Create your first Ploopy Headphones firmware Before you do anything else, there is one thing that you must, must, must do: