Repository navigation
Releases
Deluge SDK v0.2.0
The app-loader is rebuilt on deluge-sdk, and can run from the boot slots behind stage-0 as well as
from the stock bootloader.
Added
- The app-loader can run from a boot slot behind stage-0 as well as from the stock bootloader: one
binary for both. In a slot it confirms the slot it booted from, and offersUPDATE LOADERfor a
/BOOT/LOADER.SLTon the card, written into the other slot. Boot-region protection (provision
on first boot, lock-down before an app) is behind theflash-protectfeature, off by default. - stage-0 boots slot B too: it picks the newest valid slot, tries a pending one, and rolls back
to the other when the watchdog ended its last boot. firmwares/loader-shim: the slot image's shim, position-independent, so oneLOADER.SLTfits
either slot.tools/loader-image.shbuildsLOADER.SLTand a stage-0 install image, and checks
both.deluge-loader: the app-loader's logic, host-tested: the boot and protection sequence, the
menu and auto-boot decision, app staging and self-update.rza1_hal::wdt: the watchdog (its clock select, up to 125 ms), andspibsc::set_fast_read
(the SPI flash's 0Bh fast read at a given bit rate).deluge_bsp::flash::set_stock_read_mode
puts the flash's reads back on the stock bootloader's timing.deluge_bsp::flash::protect::reload,lift_volatileandrestore_volatile.deluge_image::app: a header for a flat image a loader copies into RAM and
runs (encode_app_header,validate_app), andmkslot app, which flattens an ELF's
PT_LOADsegments under it.deluge_image::slot::decode_boot_inforeads back the wordboot_infowrites (refusing
anything else), andplan_updatepicks a self-update's slot (the one not running) and sequence.deluge::Sd::listandSd::open_in: list a root-level directory, and open a file in one
(both names single, no paths), on the device and in the simulator.
Changed
- Breaking: the Deluge's boot-slot layout is
deluge_image::slot::DELUGE. deluge::Deluge::sdcan be called again once theSdit returned is dropped, and after a
mount that failed: oneSdat a time instead of one per boot.
Deluge SDK v0.1.1
Fixed
-
The app-loader boots from the stock Deluge bootloader again. In 0.1.0 it was linked at
0x20020000, where the stock bootloader runs while it copies the image into SRAM: the copy
overwrote its own loop about 11 KB in, and the half-copied app-loader died with a data abort
at every power-on. It now builds with deluge-bsp'szero-init-below-image, which starts the
image above the bootloader (about0x2004A000, as before 0.1.0), and its link fails if
_startis ever below0x20040000. -
usb_classes::midi: the MIDI 2.0 alternate setting works on Linux. The Group Terminal Block
descriptors now answer the standardGET_DESCRIPTOR(0x26 << 8 | alternate) the USB MIDI 2.0
spec defines, instead of a class request no host sends, so Linux no longer gives up with
"Failed to parse GTB"; and the block declares MIDI 2.0 (bMIDIProtocol0x11), not MIDI 1.0
with timestamps (0x02). -
The black encoders (the four with detents) start counting from the detent's resting state
instead of the pins as read at boot. A boot read that caught contact bounce put every click
out of step until the next reboot, and the first click after each reversal did nothing. The
gold encoders still start at the pins as read.
Added
deluge-image::slot: the boot-slot layout (SlotLayout; the Deluge's is a constant) and the variant
codes a stage-0 accepts are parameters (parse_with,validate_with,encode_header_with); the
Deluge's are unchanged.selectpicks the
slot to boot from both slots and the watchdog flag: the newest valid, a pending one tried, rolled
back to the other if the watchdog killed its last boot, or tried again when it is the only one.
mkslottakes--variant-code,--slot-len,--slot-b, the slot offsets and--corrupt-body-b.deluge-flash-protect: the status-register protection core (recipe,plan,apply,SrBus)
moved out ofdeluge-bspinto a chip-neutral crate, whichdeluge_bsp::flash::protect
re-exports. It adds the AT25QF641B (8 MB, bottom 1 MB),protected_range_forany capacity, and
lift_volatile/restore_volatile: open a protected region for one program through the
volatile status register, leaving the non-volatile protection alone (a failed write is undone
by a software reset).rza1-rt'szero-init-below-imagefeature (passed through bydeluge-bsp) places.bss
and the MMU translation table below the vector table instead of after the image, for an app
whose heap starts at the image's end and reclaims its boot-only tail. The default layout is
unchanged, andlink.xnow refuses a__sram_heap_basethat lies below the zero-init data.usb_classes::midiandusb_classes::midi_packetscan run more than one USB-MIDI device:
MidiStateandPacketQueueshold a device's queues and flags (onestaticeach per device),
withbuild_with, therun_*_withendpoint tasks andMidiState::end_sessionfor a session
dropped without a bus reset. The free functions,buildandrun_*keep working, on
DEFAULT_STATE.ClockOut::start,set_period,stopandis_running.set_periodandset_pulse_width
take effect at the next period boundary, so a tempo change never gives a short or doubled
pulse. Periods are clamped to 1 ms–2 s and the pulse width to under the period; the first
clamp of each is logged atwarn.
Changed
deluge_bsp::flash::protect'sWriteMethod,SrBus,Goal,planand the rest come from
the newdeluge-flash-protectcrate.WriteMethodis now that crate's type, not
rza1_hal::spibsc::WriteMethod: an outsideSrBusimplementation converts with
protect::hal_methodwhen it calls the HAL.- In bare-metal builds
ClockOut's edges come from the MTU2 channel 4 timer, so its timing no
longer depends on the executor; native Linux and the simulator use a software loop.
Dropping aClockOutstops the clock and leaves the gate low, andpulse()while the clock
runs returns at once. Deluge::clock_out(ch)panics up front for a gate channel of 4 or more; the Deluge has
gates 0–3.- The
clock_jacksexample free-runs a 24 ppqn clock and switches its tempo on PLAY. Its clock
in no longer echoes to the clock out: it only toggles the SYNC LED and shows its BPM.
Deluge SDK v0.1.0
Warning
This release's app-loader.bin does not boot on a Deluge with the stock bootloader (it data-aborts at every power-on). Use v0.1.1 instead.
The first developer preview of the Deluge SDK. The API is not stable yet: until 1.0, a minor
release may contain breaking changes.
The RZ/A1 chip crates and deluge-embedded-fatfs are released as 0.2.0, and
deluge-block-device-adapters as 0.3.0: earlier versions briefly published under those names
had a different API and were yanked.
Added
- The SDK (
deluge-sdk, imported asdeluge): write apps for the OLED Deluge in async Rust.
#[deluge::app]brings up heaps, clocks, interrupts, the Embassy executor and a panic handler;
theDelugecapability handle gives each peripheral to one owner: OLED, pads, buttons,
encoders, LEDs, stereo audio, CV/gate, clock in/out, DIN MIDI, jack detection, the SD card
(async FAT, streaming files with seek) and the SYNC LED. Optional features routelogto RTT
or a USB serial port, register the SRAM heap, drive audio from the DMA interrupt, and select
the simulator or Linux backend. cargo deluge:new,build,run(upload over USB and launch from RAM),deploy(copy
to the SD card's/APPS/),log,sim,linux,debugandtrace.- The app-loader: a second-stage bootloader with a boot menu, USB dev-mode upload, SD
/APPS/loading, storing an app to flash, and a recovery boot. Optional bootloader write
protection (flash-protect, off by default) locks the bootloader region at app hand-off. - Board support (
deluge-bsp): the PIC front panel, SSD1309 OLED, codec and SSI audio, the
MAX5136 CV DAC (max5136), SD card (with High-Speed mode where the card supports it), SPI
flash identification and write protection, the SRAM and SDRAM heaps, USB device classes, and
USB host with hubs. - USB (
deluge-usb-classes, imported asusb_classes): UAC2 audio, USB-MIDI (including raw packet mode), mass storage
(Bulk-Only Transport) device classes; host-side USB-MIDI and UAC2 audio; and
Elektron Overbridge 2 host and device classes. - RZ/A1 chip crates (
rza1-pac,rza1-rt,rza1-rt-macros,rza1-hal): a peripheral
access crate generated from the vendor SVD for the RZ/A1L and RZ/A1H, a runtime with
#[entry],#[irq]and#[fault], and an Embassy HAL including the SD card protocol. They
form their own workspace underrza1/with no dependency on anydeluge-*crate. - Async FAT (
deluge-embedded-fatfs,deluge-block-device-adapters): forks of MabezDev's
embedded-fatfsandblock-device-adapterswith upstream fixes applied. - DSP and UI libraries:
deluge-fixedpointandarm-dsp(MIT OR Apache-2.0);
deluge-ui-toolkit,deluge-grid-toolkitanddeluge-fonts(GPL-3.0-or-later, in the
repository but not published to crates.io yet). - A desktop simulator (
deluge-simulator, run bycargo deluge sim) with an on-screen front
panel, audio, MIDI and SD bridges, and headless golden-frame testing, plus a browser front panel
(tools/deluge-web-sim).deluge-panel-protocolis the front-panel wire protocol shared by
the simulator, the controller firmware and an external brain. - A native Linux backend for apps that run on the Deluge's Linux userland:
libdeluge-sys
andlibdeluge, bindings to its hardware library. - A from-scratch boot chain, in development:
stage0, an execute-in-place first stage that
validates and enters a CRC-checked boot slot, andmkslot, the host tool that builds slot
images. For development units only. - Examples under
examples/covering every capability, and hardware validation firmwares
underhw-tests/.