mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-16 18:11:22 +00:00
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>
79 lines
2.7 KiB
Makefile
79 lines
2.7 KiB
Makefile
# -*- makefile -*-
|
|
# Copyright (c) 2014 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.
|
|
#
|
|
# Host tools build
|
|
#
|
|
|
|
host-util-bin=ectool lbplay stm32mon ec_sb_firmware_update lbcc \
|
|
ec_parse_panicinfo cbi-util
|
|
build-util-bin=ec_uartd iteflash
|
|
build-util-art+=util/export_taskinfo.so
|
|
ifeq ($(CHIP),npcx)
|
|
build-util-bin+=ecst
|
|
endif
|
|
host-util-bin+=uartupdatetool
|
|
uartupdatetool-objs=uut/main.o uut/cmd.o uut/opr.o uut/l_com_port.o \
|
|
uut/lib_crc.o
|
|
$(out)/util/uartupdatetool: HOST_CFLAGS+=-Iutil/
|
|
# Build on a limited subset of boards to save build time
|
|
ifeq ($(BOARD),meowth_fp)
|
|
build-util-bin+=ectool_servo
|
|
endif
|
|
|
|
comm-objs=$(util-lock-objs:%=lock/%) comm-host.o comm-dev.o
|
|
comm-objs+=comm-lpc.o comm-i2c.o misc_util.o
|
|
|
|
ectool-objs=ectool.o ectool_keyscan.o ec_flash.o ec_panicinfo.o $(comm-objs)
|
|
ectool_servo-objs=$(ectool-objs) comm-servo-spi.o
|
|
ec_sb_firmware_update-objs=ec_sb_firmware_update.o $(comm-objs) misc_util.o
|
|
ec_sb_firmware_update-objs+=powerd_lock.o
|
|
lbplay-objs=lbplay.o $(comm-objs)
|
|
|
|
util/ectool.c: $(out)/ec_version.h
|
|
|
|
ec_parse_panicinfo-objs=ec_parse_panicinfo.o ec_panicinfo.o
|
|
|
|
# USB type-C Vendor Information File generation
|
|
ifeq ($(CONFIG_USB_POWER_DELIVERY),y)
|
|
build-util-bin+=genvif
|
|
build-util-art+=$(BOARD)_vif.txt
|
|
$(out)/util/genvif: $(out)/util/usb_pd_policy.o board/$(BOARD)/board.h \
|
|
include/usb_pd.h include/usb_pd_tcpm.h
|
|
$(out)/util/genvif: BUILD_LDFLAGS+=$(out)/util/usb_pd_policy.o -flto
|
|
|
|
STANDALONE_FLAGS=-ffreestanding -fno-builtin -nostdinc \
|
|
-Ibuiltin/ -D"__keep= " -DVIF_BUILD
|
|
$(out)/util/usb_pd_policy.o: board/$(BOARD)/usb_pd_policy.c
|
|
$(call quiet,c_to_vif,BUILDCC)
|
|
deps-$(CONFIG_USB_POWER_DELIVERY) += $(out)/util/usb_pd_policy.o.d
|
|
endif # CONFIG_USB_POWER_DELIVERY
|
|
|
|
ifneq ($(CONFIG_TOUCHPAD_HASH_FW),)
|
|
build-util-bin += gen_touchpad_hash
|
|
|
|
# Assume RW section (touchpad FW must be identical for both RO+RW)
|
|
$(out)/util/gen_touchpad_hash: BUILD_LDFLAGS += -DSECTION_IS_RW
|
|
|
|
OPENSSL_CFLAGS := $(shell $(PKG_CONFIG) --libs openssl)
|
|
OPENSSL_LDFLAGS := $(shell $(PKG_CONFIG) --libs openssl)
|
|
|
|
$(out)/util/gen_touchpad_hash: BUILD_CFLAGS += $(OPENSSL_CFLAGS)
|
|
$(out)/util/gen_touchpad_hash: BUILD_LDFLAGS += $(OPENSSL_LDFLAGS)
|
|
endif # CONFIG_TOUCHPAD_VIRTUAL_OFF
|
|
|
|
cbi-util-objs=../common/crc8.o ../common/cbi.o
|
|
|
|
$(out)/util/export_taskinfo.so: $(out)/util/export_taskinfo_ro.o \
|
|
$(out)/util/export_taskinfo_rw.o
|
|
$(call quiet,link_taskinfo,BUILDLD)
|
|
|
|
$(out)/util/export_taskinfo_ro.o: util/export_taskinfo.c
|
|
$(call quiet,c_to_taskinfo,BUILDCC,RO)
|
|
|
|
$(out)/util/export_taskinfo_rw.o: util/export_taskinfo.c
|
|
$(call quiet,c_to_taskinfo,BUILDCC,RW)
|
|
|
|
deps-y += $(out)/util/export_taskinfo_ro.o.d $(out)/util/export_taskinfo_rw.o.d
|