Mutable-dev-env makefile/bootloader help


So I put together a little dev board that’s essentially a more generalized clouds hardware. Namely just the stm32F405 and the wm8731 codec with all the other stm32 pins available via pin headers.

I’ve been working on a project for a bit now using the clouds folder, but the project has nothing in common with clouds other than the same stm32 chip and the same codec chip. Having all the other clouds related files in there seems rather cluttered if I’m not using them.

What I would like to do is get a template project set up that only contains the necessary files to get audio in and out with the intention of being able to build up the rest of the files on a per project basis.

The issue I run into is that I can’t seem to write/rewrite the makefile and bootloader so that it doesn’t depend on files I don’t otherwise need (meter.h, leds.h, switches.h, etc) and I don’t keep getting error messages.

If anyone could shed some light or otherwise offer guidance on how I need to modify the makefiles and bootloader code so that I can get a bare bones template project set up, I would be extremely appreciative.


1 Like

Remove the unwanted files, and remove references to them in the code?

To start with, do you really need a bootloader?

I guess I don’t fully understand the mechanics or function of the bootloader, which is where I was running into issues before when I had tried removing the unneeded files and their references.

I’m assuming then that I could just create a new project with the files I need, alter paths for the files I need in the makefile to the new directory, and skip the bootloader all together?

Yes. Make sure that your project’s makefile does not contain APPLICATION_LARGE = TRUE since your project doesn’t use of a bootloader. Also, make sure the application argument to System::Init is set to false.

I’m actually in the middle of designing a dev board of my own using easyEDA and JLCPCB’s SMD prototyping services.

Interestingly, I was going to use the PCM5102 DAC, but this WM8731 chip looks like it does a lot more for the same price and JLCPCB does list it as one of the chips they offer for placement on a custom PCB.

Guess I need to rethink my gameplan and check into this chip…

noif, if you are making a dev board… are you including a simple MIDI interface, w24 or w25 eeproms or a LCD screen??
I am and trying to fit in anything else I can think of along the way, including a few tactile switches and a encoder with switch.

That totally did what I needed. Thank you so much!

Out of curiosity what is the purpose of the bootloader in this case?

I kept it pretty bare bones. Pretty much the only interface that’s hardwired is the audio in and out jacks/level controls. I’ve got a bank of 8 cv inputs on it, but they’re normalled to stm32 pins with a jumpered header and all the other pins that aren’t specifically connected to something (power, ground, crystal etc.) are available via headers to keep it flexible. I just use a breadboard and wires to hook up any controls are other things I need.

You need a bootloader if you want your device to allow field upgrades (as opposed to upgrades with a JTAG or SWD programmer) – for example firmware updates by audio (or MIDI for Yarns) as implemented on all Mutable Instruments modules.

Since the code runs from flash and updating the firmware means erasing large areas of flash memory, you need the code that will perform the update to be located on a separate sector/page of flash memory than the main application. That’s the purpose of a bootloader: a dedicated program, located on a “safe” sector/page of flash memory (the first one), that will be responsible for erasing and rewriting the main program located on the subsequent sectors/pages of flash memory.

1 Like

Gotcha, thanks for the explanation.