Skip to content

Commit d600130

Browse files
Joakim Langkildeclaude
andcommitted
usb: enumerate as "Spore" via a vendored descriptor override (no submodule edits)
The USB VID/PID/name live in libDaisy's src/usbd/usbd_desc.c as unguarded #defines, so they can't be overridden with -D. Instead vendor a copy as src/usb_identity.c with Product="Spore", Manufacturer="rainybit" and add it to C_SOURCES. Because the ELF is linked as $(CXX) <our objects> ... -ldaisy, our descriptor symbols satisfy all refs and libDaisy's usbd_desc.o is never pulled from the archive — the submodule stays pristine and reproducible. Verified: ELF contains "Spore", not "Daisy Seed Built In". VID/PID kept at stock Daisy/STM values (documented one-line edit for productization). Also add the USB include paths to .vscode for IntelliSense. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b8066da commit d600130

4 files changed

Lines changed: 651 additions & 1 deletion

File tree

.vscode/c_cpp_properties.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"${workspaceFolder}/lib/libDaisy/Drivers/CMSIS/Include",
1010
"${workspaceFolder}/lib/libDaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include",
1111
"${workspaceFolder}/lib/libDaisy/Drivers/STM32H7xx_HAL_Driver/Inc",
12+
"${workspaceFolder}/lib/libDaisy/src/usbd",
13+
"${workspaceFolder}/lib/libDaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
1214
"${workspaceFolder}/lib/DaisySP/Source"
1315
],
1416
"defines": ["STM32H750xx", "CORE_CM7", "USE_HAL_DRIVER", "ARM_MATH_CM7"],

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this pr
55
uses [Semantic Versioning](https://semver.org/) (`vMAJOR.MINOR.PATCH`).
66

77
## [Unreleased]
8-
- Custom USB vendor/product ID and device name.
8+
- USB device name: the pedal now enumerates as **"Spore"** (manufacturer "rainybit")
9+
instead of "Daisy Seed Built In", via a vendored `src/usb_identity.c` descriptor
10+
override. VID/PID kept at the stock Daisy/STM values (a real custom VID/PID is a
11+
one-line edit there, deferred until productization).
912

1013
<!--
1114
Releasing:

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ USE_DAISYSP_LGPL = 1
1313
# (All mode/io/mod code is header-only and pulled in via main.cpp.)
1414
CPP_SOURCES = src/main.cpp src/hothouse.cpp
1515

16+
# USB identity override (enumerate as "Spore"): a copy of libDaisy's usbd_desc.c.
17+
# Linked before -ldaisy so its descriptor symbols win over the archive's copy. See
18+
# the header note in the file for how to set a real VID/PID before shipping a product.
19+
C_SOURCES += src/usb_identity.c
20+
1621
# Header search root so "config/...", "io/...", "modes/...", "hothouse.h" resolve.
1722
C_INCLUDES = -Isrc
1823

0 commit comments

Comments
 (0)