Skip to content

feat: presets in QSPI + run from SRAM via the bootloader - #6

Merged
joak0068 merged 2 commits into
mainfrom
feat/presets
Jun 25, 2026
Merged

feat: presets in QSPI + run from SRAM via the bootloader#6
joak0068 merged 2 commits into
mainfrom
feat/presets

Conversation

@joak0068

@joak0068 joak0068 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

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).

⚠️ Flashing changed

Install the bootloader once: scripts/install-bootloader.{sh,ps1}, then flash with
scripts/flash.{sh,ps1}. README updated.

Checklist

  • New tunable values live in src/config/params.h
  • If a control changed, updated docs/MIDI_PROTOCOL.md and the params::midi map
  • Tested on hardware (Daisy Seed + Hothouse) — describe below, or note if untested

Joakim Langkilde and others added 2 commits June 25, 2026 13:12
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]>
@joak0068
joak0068 merged commit a112c16 into main Jun 25, 2026
3 checks passed
@joak0068
joak0068 deleted the feat/presets branch June 25, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant