[package]
name = "pm-daisy"
version = "0.1.0"
edition = "2021"
description = "PM Daisy-Pod spike: plays the PolyMeter click engine (pm-synth Player) out the Daisy Pod's audio jack, flashing the Seed LED on each click. STM32H750 / Cortex-M7F. See docs/daisy-spike.md."

[dependencies]
cortex-m = "0.7"
cortex-m-rt = "0.7"
stm32h7xx-hal = { version = "0.16", features = ["stm32h750v", "rt", "revision_v"] }
# Daisy Seed board-support. The board REVISION is a feature (below) — it selects the right audio
# codec driver (AK4556 / WM8731 / PCM3060). Picking the wrong one = silence. See README.
daisy = { version = "0.10", default-features = false, features = ["defmt"] }
embedded-alloc = "0.6"        # pm-synth's Player parses into Vec/String + allocates voices → needs a heap
defmt = "0.3"
defmt-rtt = "0.4"             # logs over RTT, read by `probe-rs run` (a debug probe)
panic-probe = { version = "0.3", features = ["print-defmt"] }
pm-synth = { path = "../pm-synth" }       # the click engine + the shared Player (host-verified)
track-format = { path = "../track-format" } # parse the program string into a Track

# ----- Board revision: pick ONE to match the Daisy Seed on your Pod (check the sticker / silkscreen).
# Default targets the Daisy Seed 1.1 (WM8731), the common recent revision. Override on the CLI, e.g.
#   cargo build --release --no-default-features --features seed_1_2
[features]
default = ["seed_1_1"]
seed = ["daisy/seed"]         # original Daisy Seed (AK4556 codec)
seed_1_1 = ["daisy/seed_1_1"] # Daisy Seed 1.1 (WM8731 codec)
seed_1_2 = ["daisy/seed_1_2"] # Daisy Seed 1.2 / Seed2 DFM (PCM3060 codec)

[profile.release]
opt-level = "s"   # size — the STM32H750 has only 128 KB internal flash (see memory.x / README)
lto = true
codegen-units = 1
debug = 2
