tonarino / panel-firmware

Firmware for the volume control hardware, targeting an STM32F4 board
MIT License
75 stars 10 forks source link

Include the git SHA1 short hash as part of the USB device serial number #22

Closed bschwind closed 3 years ago

bschwind commented 3 years ago

From #20

bschwind commented 3 years ago

As an alternative for doing it ad-hoc, we might have used vergen or built, but probably you didn't want to introduce a dependency?

Yep, I specifically didn't want to add any dependencies as it's somewhat annoying in a no_std context.

It would also be a bit more natural for me to pass just the git hash from the build script

I would have done the same, but I wanted to avoid dynamic allocation in the firmware. I suppose since I know the slice length I could make it work but I'm not 100% sure how straightforward the code would be with that.

bschwind commented 3 years ago

(Sorry I'm just merging these without reviews, I'm testing these directly on the hardware currently)

strohel commented 3 years ago

Ad. questions: I see, got it.

Merging quickly is cool, the comments wouldn't have resulted in any changes.