Get a basic USB device working
It enumerates, takes its address, gets configured, and then Linux kind
of gives up because it has no endpoints.
Change-Id: I01f75acee419b585e455f428ee45bcd37f0ce189
diff --git a/motors/BUILD b/motors/BUILD
index ab9f239..e652069 100644
--- a/motors/BUILD
+++ b/motors/BUILD
@@ -1,3 +1,6 @@
+load('//motors:macros.bzl', 'hex_from_elf')
+load("//tools:environments.bzl", "mcu_cpus")
+
cc_binary(
name = 'medium_salsa.elf',
srcs = [
@@ -6,29 +9,21 @@
deps = [
':util',
'//motors/core',
- '//motors/usb',
+ '//motors/usb:legacy',
],
- restricted_to = ['//tools:cortex-m4f'],
+ restricted_to = mcu_cpus,
)
-genrule(
+hex_from_elf(
name = 'medium_salsa',
- srcs = [
- 'medium_salsa.elf',
- ],
- outs = [
- 'medium_salsa.hex',
- ],
- cmd = '$(OBJCOPY) -O ihex $< $@',
- executable = True,
- output_to_bindir = True,
- restricted_to = ['//tools:cortex-m4f'],
+ restricted_to = mcu_cpus,
)
cc_library(
name = 'util',
+ visibility = ['//visibility:public'],
hdrs = [
'util.h',
],
- restricted_to = ['//tools:cortex-m4f'],
+ restricted_to = mcu_cpus,
)