summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Banks <kevin@firia.com>2021-02-03 11:16:19 -0600
committerKevin Banks <kevin@firia.com>2021-02-03 11:16:19 -0600
commit00926b687a619f18deb08c1f59f868a4e9b8514a (patch)
tree8afae622ee704c52b6270ec4a47a11a5e1655453
parente79283932ddaac4dd1cc663ff90f76080c18551f (diff)
Trying to keep two ARM builds from overflowing their FLASH
-rw-r--r--tools/gen_usb_descriptor.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py
index cf7400108..05d35ffc4 100644
--- a/tools/gen_usb_descriptor.py
+++ b/tools/gen_usb_descriptor.py
@@ -403,19 +403,21 @@ vendor_endpoint_out_descriptor = standard.EndpointDescriptor(
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
bInterval=16)
-vendor_interface = standard.InterfaceDescriptor(
- description="VENDOR",
- bInterfaceClass=0xff, # vendor.VENDOR_CLASS,
- bInterfaceSubClass=0x00, #vendor.VENDOR_SUBCLASS_???,,
- bInterfaceProtocol=0x00, #vendor.VENDOR_PROTOCOL_NONE,
- iInterface=StringIndex.index("{} VENDOR".format(args.interface_name)),
- subdescriptors=[
- vendor_endpoint_in_descriptor,
- vendor_endpoint_out_descriptor,
- ]
-)
+# We do the following conditionally to avoid adding unused entries to the StringIndex table
+if 'VENDOR' in args.devices:
+ vendor_interface = standard.InterfaceDescriptor(
+ description="VENDOR",
+ bInterfaceClass=0xff, # vendor.VENDOR_CLASS,
+ bInterfaceSubClass=0x00, #vendor.VENDOR_SUBCLASS_???,,
+ bInterfaceProtocol=0x00, #vendor.VENDOR_PROTOCOL_NONE,
+ iInterface=StringIndex.index("{} VENDOR".format(args.interface_name)),
+ subdescriptors=[
+ vendor_endpoint_in_descriptor,
+ vendor_endpoint_out_descriptor,
+ ]
+ )
-vendor_interfaces = [vendor_interface]
+ vendor_interfaces = [vendor_interface]
interfaces_to_join = []