summaryrefslogtreecommitdiff
path: root/extra/ftdi_hostcmd/Makefile
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-07-07 16:39:42 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-09 12:30:38 +0000
commit0eb88ff59bd9a07ba23fa25e8e1b966782b6de73 (patch)
treeacda8862d565eafbe509b4854618bc4329b16f5b /extra/ftdi_hostcmd/Makefile
parent08593b8fe02244a976e2653d25cd433bc50ff396 (diff)
downloadchrome-ec-0eb88ff59bd9a07ba23fa25e8e1b966782b6de73.tar.gz
Cr50: Enable host commands over SPI bus
This enables the feature that lets the Cr50 receive host commands via the SPI (slave) interface. BUG=chrome-os-partner:40969 BRANCH=none TEST=make buildall CQ-DEPEND=CL:283998 This CL also adds a test example in the extra/ftdi_hostcmd/ directory. To use it, you need the Cr50 attached to the build host via an FTDI USB-to-SPI adapter. cd extra/ftdi_hostcmd make ./test_cmds Change-Id: Ia719b1c898afc45b3105a9cd573a8492178d9be2 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/284001
Diffstat (limited to 'extra/ftdi_hostcmd/Makefile')
-rw-r--r--extra/ftdi_hostcmd/Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/extra/ftdi_hostcmd/Makefile b/extra/ftdi_hostcmd/Makefile
new file mode 100644
index 0000000000..d46b4b1c72
--- /dev/null
+++ b/extra/ftdi_hostcmd/Makefile
@@ -0,0 +1,37 @@
+# Copyright 2015 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Use your own libmpsse if you want, but we're going to use the files
+# that are part of the Chromium OS trunks_client program.
+PLATFORM2 = ../../../../platform2
+MPSSE_DIR = $(PLATFORM2)/trunks/ftdi
+
+PROG = test_cmds
+SRCS = test_cmds.c $(MPSSE_DIR)/mpsse.c $(MPSSE_DIR)/support.c
+
+CFLAGS = \
+ -std=gnu99 \
+ -g3 \
+ -O3 \
+ -Wall \
+ -Werror \
+ -Wpointer-arith \
+ -Wcast-align \
+ -Wcast-qual \
+ -Wundef \
+ -Wsign-compare \
+ -Wredundant-decls \
+ -Wmissing-declarations
+
+CFLAGS += -I../../include -I${MPSSE_DIR} -I${PLATFORM2}
+
+CFLAGS += $(shell pkg-config --cflags libusb-1.0 libftdi1)
+LIBS += $(shell pkg-config --libs libusb-1.0 libftdi1)
+
+$(PROG): $(SRCS) Makefile
+ gcc $(CFLAGS) $(SRCS) $(LDFLAGS) $(LIBS) -o $@
+
+.PHONY: clean
+clean:
+ rm -rf $(PROG)