feat: presets in QSPI + run from SRAM via the bootloader - #6
Merged
Conversation
Three presets per mode, stored in QSPI (io/presets.h). Hold Footswitch 2 to enter preset
mode; the Toggle-2 position is the slot (== variant). Flip Toggle 2 to recall a slot; tap
Footswitch 1 (while holding FS2) to save the current sound. Recalled knob values reuse the
existing soft-takeover (ShiftKnobs::SetValue locks them), so the physical pots don't jump.
The LEDs show the active preset while FS2 is held: right = 1, left = 2, both = 3. The QSPI
write is deferred from the audio ISR to the main loop. FS2 gained a tap/hold split so the
tap action (freeze / re-seed) still works.
Presets pushed the firmware past the 128 KB internal flash, so switch APP_TYPE=BOOT_SRAM:
the app now runs from SRAM via the Daisy bootloader (hundreds of KB of headroom). Flashing
changed -- install the bootloader once with scripts/install-bootloader.{sh,ps1}, then flash
the app with scripts/flash.{sh,ps1}. The ~80 KB wavetables moved to SDRAM so they don't sit
in the SRAM build's small DTCMRAM .bss. The preset bank lives 4 MB into QSPI, clear of the
app, so it survives a reflash.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Make Propagator able to install the bootloader and flash the app end-to-end: - Publish the Daisy bootloader (unmodified, from libDaisy/Electrosmith, MIT) as a release asset `spore-vX.Y.Z-bootloader.bin`. A `print-boot-bin` Make target keeps CI publishing exactly the binary `make program-boot` installs. - CC 118 >= 64 reboots into the Daisy bootloader with an infinite DFU window (ResetToBootloader(DAISY_INFINITE_TIMEOUT)), so the editor can reflash the app over WebUSB with no button timing. CC 119 stays as the STM ROM DFU (update the bootloader itself). - Switch to the fast 10 ms internal-DFU bootloader: since flashing is software-triggered, the power-up DFU window can be short for near-instant boot. (wildcard BOOT_BIN, version-agnostic.) Docs updated: README (flashing + release assets + addresses), MIDI_PROTOCOL (CC 118/119). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Presets (3 per mode, QSPI) + run from SRAM via the bootloader
Hold FS2 + flip Toggle 2 to recall a slot (slot = variant position); hold FS2 + tap FS1
to save. LEDs show the active preset (right=1, left=2, both=3). Recall reuses soft-takeover.
Presets tipped the firmware past the 128 KB internal flash, so APP_TYPE=BOOT_SRAM — runs
from SRAM via the Daisy bootloader (DTCMRAM 64%, code-SRAM 27% of 480 KB). Wavetables moved
to SDRAM. Preset bank stored 4 MB into QSPI (survives reflash).
Install the bootloader once:
scripts/install-bootloader.{sh,ps1}, then flash withscripts/flash.{sh,ps1}. README updated.Checklist
src/config/params.hdocs/MIDI_PROTOCOL.mdand theparams::midimap