Skip to content

Commit

Permalink
usb: product descriptor: encode version
Browse files Browse the repository at this point in the history
Encode the firmware version in the USB *Product* descriptor
string.

```console
$ lsusb
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x2fe3 NordicSemiconductor
  idProduct          0x000c
  bcdDevice            3.05
  iManufacturer           1 ZEPHYR
  iProduct                2 ly11-ble-fw-v1.2.4
  iSerial                 3 6E1531D1CB5B6DC6
  :
```
  • Loading branch information
IvoBCD committed Oct 26, 2023
1 parent 22e20b7 commit 9e53c54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ TARGETS += build.nrf52840dongle_nrf52840/hci_usb_h4/zephyr/zephyr-dfu.zip
build.%/hci_usb_h4/zephyr/zephyr.hex: check-zephyr
source $(ZEPHYR_ROOT)/zephyr-env.sh ; \
west build --build-dir build.$*/hci_usb_h4 --pristine auto \
--board $*
--board $* \
-- -DCONFIG_USB_DEVICE_PRODUCT=\"$(PRJTAG)-v$(VERSION_TAG)\"

%/zephyr-dfu.zip: %/zephyr.hex
nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
Expand Down

0 comments on commit 9e53c54

Please sign in to comment.