Brian Silverman | d44258e | 2018-05-14 10:01:18 -0700 | [diff] [blame] | 1 | load("//motors:macros.bzl", "hex_from_elf") |
| 2 | load("//tools:environments.bzl", "mcu_cpus") |
| 3 | |
| 4 | cc_binary( |
Brian Silverman | d956639 | 2018-06-10 15:02:03 -0700 | [diff] [blame] | 5 | name = "fet12.elf", |
| 6 | srcs = [ |
| 7 | "fet12.cc", |
| 8 | ], |
| 9 | restricted_to = mcu_cpus, |
| 10 | deps = [ |
| 11 | ":motor_controls", |
| 12 | "//motors:motor", |
| 13 | "//motors:util", |
| 14 | "//motors/core", |
| 15 | "//motors/peripheral:adc", |
| 16 | "//motors/peripheral:can", |
| 17 | "//motors/usb", |
| 18 | "//motors/usb:cdc", |
| 19 | ], |
| 20 | ) |
| 21 | |
| 22 | hex_from_elf( |
| 23 | name = "fet12", |
| 24 | restricted_to = mcu_cpus, |
| 25 | ) |
| 26 | |
| 27 | cc_binary( |
Brian Silverman | d44258e | 2018-05-14 10:01:18 -0700 | [diff] [blame] | 28 | name = "power_wheels.elf", |
| 29 | srcs = [ |
| 30 | "power_wheels.cc", |
| 31 | ], |
| 32 | restricted_to = mcu_cpus, |
| 33 | deps = [ |
| 34 | "//motors:util", |
| 35 | "//motors/core", |
| 36 | "//motors/peripheral:adc", |
| 37 | "//motors/usb", |
| 38 | "//motors/usb:cdc", |
| 39 | ], |
| 40 | ) |
| 41 | |
| 42 | hex_from_elf( |
| 43 | name = "power_wheels", |
| 44 | restricted_to = mcu_cpus, |
| 45 | ) |
Brian Silverman | d956639 | 2018-06-10 15:02:03 -0700 | [diff] [blame] | 46 | |
| 47 | cc_library( |
| 48 | name = "motor_controls", |
| 49 | srcs = [ |
| 50 | "motor_controls.cc", |
| 51 | ], |
| 52 | hdrs = [ |
| 53 | "motor_controls.h", |
| 54 | ], |
| 55 | restricted_to = mcu_cpus, |
| 56 | deps = [ |
| 57 | "//motors:math", |
| 58 | "//motors:motor", |
| 59 | "//motors/peripheral:configuration", |
| 60 | "//third_party/eigen", |
| 61 | ], |
| 62 | ) |