summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorCHLin <CHLIN56@nuvoton.com>2018-03-07 14:33:43 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-04-18 02:07:59 -0700
commitdcaf8edc47c1703a760eff4d9ea12f68f8af492c (patch)
tree45cd1ce7771fb3f3305da88d097cf7ae51e6174e /Makefile.rules
parentb21f335c40568060cbd0b671d138f0ff69a47a05 (diff)
downloadchrome-ec-dcaf8edc47c1703a760eff4d9ea12f68f8af492c.tar.gz
util: uartupdatetool (UUT): Add tool to flash firmware by UART
When the FLPRG# strap pin is set to active low, and npcx7 chip is reset, it will enter uut mode. This CL adds the host tool to communicate with npcx chip in uut mode to flash ec firmware via UART port. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST= ------------------------------------------------------------------------ 1. Connect the servo connector (J24) on npcx7 EVB to servo board v2 via flex cable. 2. Manually turn the switch SW1.6 to "ON" on npcx7 EVB. 3. Reset ec by issuing Power-Up or VCC1_RST reset. 4. Manually turn the switch SW1.6 to "OFF" on npcx7 EVB. 5. Move npcx7_evb from array BOARDS_NPCX_7M7X_JTAG to BOARDS_NPCX_UUT in flash_ec. 6. "./util/flash_ec --board=npcx7_evb." Change-Id: I2c588418e809e59f97ef4c3ad7ad13a3fef42f11 Signed-off-by: Dror Goldstein <dror.goldstein@nuvoton.com> Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/952037 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: Alexandru M Stan <amstan@chromium.org> Tested-by: CH Lin <chlin56@nuvoton.com> Tested-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 7cf6438b3c..7ae5761c24 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -14,7 +14,7 @@ build-utils := $(foreach u,$(build-util-bin),$(out)/util/$(u))
host-utils := $(foreach u,$(host-util-bin),$(out)/util/$(u))
build-art := $(foreach u,$(build-util-art),$(out)/$(u))
build-srcs := $(foreach u,$(build-util-bin),$(sort $($(u)-objs:%.o=util/%.c) $(wildcard util/$(u).c)))
-host-srcs := $(foreach u,$(host-util-bin),$(sort $($(u)-objs:%.o=util/%.c) util/$(u).c))
+host-srcs := $(foreach u,$(host-util-bin),$(sort $($(u)-objs:%.o=util/%.c) $(wildcard util/$(u).c)))
# Don't do a build test on the following boards:
skip_boards = OWNERS host
@@ -80,7 +80,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
cmd_c_to_vif = $(BUILDCC) $(BUILD_CFLAGS) $(STANDALONE_FLAGS) \
-MMD -MF $@.d -c $< -flto -o $@
cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF $@.d -o $@ \
- $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c)
+ $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $(wildcard $*.c))
cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
-I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
cmd_host_test = ./util/run_host_test $* $(silent)