Skip to content

Deluge SDK v0.1.1

Choose a tag to compare

@github-actions github-actions released this 08 Nov 14:56
· 101 commits to main since this release

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's zero-init-below-image, which starts the
    image above the bootloader (about 0x2004A000, as before 0.1.0), and its link fails if
    _start is ever below 0x20040000.

  • usb_classes::midi: the MIDI 2.0 alternate setting works on Linux. The Group Terminal Block
    descriptors now answer the standard GET_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 (bMIDIProtocol 0x11), 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. select picks 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.
    mkslot takes --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 of deluge-bsp into a chip-neutral crate, which deluge_bsp::flash::protect
    re-exports. It adds the AT25QF641B (8 MB, bottom 1 MB), protected_range_for any 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's zero-init-below-image feature (passed through by deluge-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, and link.x now refuses a __sram_heap_base that lies below the zero-init data.
  • usb_classes::midi and usb_classes::midi_packets can run more than one USB-MIDI device:
    MidiState and PacketQueues hold a device's queues and flags (one static each per device),
    with build_with, the run_*_with endpoint tasks and MidiState::end_session for a session
    dropped without a bus reset. The free functions, build and run_* keep working, on
    DEFAULT_STATE.
  • ClockOut::start, set_period, stop and is_running. set_period and set_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 at warn.

Changed

  • deluge_bsp::flash::protect's WriteMethod, SrBus, Goal, plan and the rest come from
    the new deluge-flash-protect crate. WriteMethod is now that crate's type, not
    rza1_hal::spibsc::WriteMethod: an outside SrBus implementation converts with
    protect::hal_method when 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 a ClockOut stops the clock and leaves the gate low, and pulse() 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_jacks example 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.