mirror of
https://github.com/AquaMorph/Droplets.git
synced 2026-07-21 08:58:39 +00:00
2.5 KiB
2.5 KiB
Repository Guide
Scope
- This is one bare-metal C++ firmware target for the Electrosmith Daisy Patch. Application code is under
src/;lib/libDaisyandlib/daisySPare recursive git submodules, not packages owned by this repository. - Root CI only builds the firmware. Tests, formatters, and workflows found below
lib/belong to the vendored submodules; there is no root application test or lint target.
Build And Flash
- Initialize all nested dependencies after a non-recursive clone with
git submodule update --init --recursive. - The build requires the
arm-none-eabi-*toolchain onPATH, or its binary directory passed asGCC_PATH=.... CI uses Arm GCC9-2019-q4. - From a clean checkout, run
make lib && make.make libbuilds both submodule libraries; subsequent application-only changes normally need onlymake. Artifacts arebuild/droplets.{elf,hex,bin}. make cleanremoves only the rootbuild/; it does not clean or rebuild either library.- Do not use the README's
make deploy:APP_TYPE = BOOT_SRAM, but that target invokes the incompatible OpenOCDprogramrecipe and fails. After building, enter Daisy bootloader mode and runmake program-dfu(requiresdfu-util); it writesbuild/droplets.binat0x90040000.
Source Wiring
src/main.cppowns startup and dispatch: the foreground loop handles controls, OLED drawing, and non-audio outputs, while the Daisy audio callback calls each active droplet'sProcessmethod.- Split mode runs left and right droplets against the same audio buffers. Use the
Dropletstate helpers andGetChannelMin()/GetChannelMax()plus screen bounds rather than hard-coded full-device ranges, or one side can overwrite the other. - The root Makefile discovers only
src/*.cppandsrc/*/*.cpp. Sources nested more deeply are silently excluded. Object names are flattened intobuild/, so C++ source basenames must be unique across those directories.
Adding A Droplet
- Run
./create-new-droplet.sh PascalCaseName; the script only copies and substitutes the template and does not register the result. - Complete all registration points: add a
MenuStateinsrc/menu_item.h, append its visible item inMenu::Menuinsrc/menu.cpp, include its header insrc/main.h, and add construction inGetDropletinsrc/main.cpp. - Implement all three
DropletStatelayouts.Droplet::UpdateStaterecalculates channel/display bounds, then callsSetControls()andUpdateStateCallback()when switching between full and split modes.