mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
This provides a very simple console interface for talking to the discovery-stm32f072 board over its USB connection. It's a simpler way to check that the board is working than configuring udev and/or various drivers to recognize USB device 18d1:500f as a serial console. BUG=none BRANCH=none TEST=manual Connect a discovery-stm32f072, then cd extra/usb_console make ./usb_console Change-Id: Ib25baebe5b4f3a930cdc3a1367d6d20d05b70c56 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273570 Reviewed-by: Anton Staaf <robotboy@chromium.org>
35 lines
745 B
Makefile
35 lines
745 B
Makefile
# 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.
|
|
|
|
PROGRAM := usb_console
|
|
SOURCE := $(PROGRAM).c
|
|
LIBS :=
|
|
LFLAGS :=
|
|
CFLAGS := -std=gnu99 \
|
|
-g3 \
|
|
-O3 \
|
|
-Wall \
|
|
-Werror \
|
|
-Wpointer-arith \
|
|
-Wcast-align \
|
|
-Wcast-qual \
|
|
-Wundef \
|
|
-Wsign-compare \
|
|
-Wredundant-decls \
|
|
-Wmissing-declarations
|
|
|
|
#
|
|
# Add libusb-1.0 required flags
|
|
#
|
|
LIBS += $(shell pkg-config --libs libusb-1.0)
|
|
CFLAGS += $(shell pkg-config --cflags libusb-1.0)
|
|
|
|
$(PROGRAM): $(SOURCE) Makefile
|
|
gcc $(CFLAGS) $(SOURCE) $(LFLAGS) $(LIBS) -o $@
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -rf $(PROGRAM) *~
|