greatscottgadgets / luna

Amaranth HDL framework for monitoring, hacking, and developing USB devices
https://greatscottgadgets.com/cynthion/
BSD 3-Clause "New" or "Revised" License
993 stars 171 forks source link

gateware: add string descriptor for retrieving Flash UID at runtime #242

Closed mndza closed 7 months ago

mndza commented 7 months ago

This PR adds the ability to use runtime / dynamic string descriptors that adhere to the StreamSerializer interface.

The ECP5FlashUIDStringDescriptor module can be used to use the SPI Flash unique ID as a serial number for the device (hex-string):

d.iSerialNumber = ECP5FlashUIDStringDescriptor

This needs https://github.com/greatscottgadgets/python-usb-protocol/pull/31.