summaryrefslogtreecommitdiff
path: root/chip/npcx/build.mk
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /chip/npcx/build.mk
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-252457d4b21f46889eebad61d4c0a65331919cec.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'chip/npcx/build.mk')
-rw-r--r--chip/npcx/build.mk92
1 files changed, 0 insertions, 92 deletions
diff --git a/chip/npcx/build.mk b/chip/npcx/build.mk
deleted file mode 100644
index 4be1b2994f..0000000000
--- a/chip/npcx/build.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- makefile -*-
-# Copyright 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.
-#
-# NPCX chip specific files build
-#
-
-# NPCX SoC has a Cortex-M4F ARM core
-CORE:=cortex-m
-# Allow the full Cortex-M4 instruction set
-CFLAGS_CPU+=-march=armv7e-m -mcpu=cortex-m4
-
-# Assign default CHIP_FAMILY as npcx5 for old boards used npcx5 series
-ifeq ($(CHIP_FAMILY),)
-CHIP_FAMILY:=npcx5
-endif
-
-# Required chip modules
-chip-y=header.o clock.o gpio.o hwtimer.o system.o uart.o uartn.o sib.o
-chip-y+=system-$(CHIP_FAMILY).o
-chip-y+=gpio-$(CHIP_FAMILY).o
-
-# Optional chip modules
-chip-$(CONFIG_ADC)+=adc.o
-chip-$(CONFIG_AUDIO_CODEC)+=apm.o wov.o
-chip-$(CONFIG_AUDIO_CODEC_DMIC)+=audio_codec_dmic.o
-chip-$(CONFIG_AUDIO_CODEC_I2S_RX)+=audio_codec_i2s_rx.o
-chip-$(CONFIG_FANS)+=fan.o
-chip-$(CONFIG_FLASH_PHYSICAL)+=flash.o
-chip-$(CONFIG_I2C)+=i2c.o i2c-$(CHIP_FAMILY).o
-chip-$(CONFIG_HOSTCMD_X86)+=lpc.o
-chip-$(CONFIG_HOSTCMD_ESPI)+=espi.o
-chip-$(CONFIG_PECI)+=peci.o
-chip-$(CONFIG_HOSTCMD_SHI)+=shi.o
-chip-$(CONFIG_CEC)+=cec.o
-# pwm functions are implemented with the fan functions
-chip-$(CONFIG_PWM)+=pwm.o
-chip-$(CONFIG_SPI)+=spi.o
-chip-$(CONFIG_WATCHDOG)+=watchdog.o
-ifndef CONFIG_KEYBOARD_NOT_RAW
-chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
-endif
-
-chip-$(CONFIG_PS2)+=ps2.o
-# Only npcx9 or later chip family can support LCT module
-ifneq ($(CHIP_FAMILY),$(filter $(CHIP_FAMILY),npcx5 npcx7))
-chip-y+=lct.o
-endif
-
-chip-$(CONFIG_SHA256_HW_ACCELERATE)+=sha256_chip.o
-
-# spi monitor program fw for openocd and UUT(UART Update Tool)
-npcx-monitor-fw=chip/npcx/spiflashfw/npcx_monitor
-npcx-monitor-fw-bin=${out}/$(npcx-monitor-fw).bin
-PROJECT_EXTRA+=${npcx-monitor-fw-bin}
-# Monitor header is only used for UUT which is not supported on npcx5.
-ifneq "$(CHIP_FAMILY)" "npcx5"
-npcx-monitor-hdr=chip/npcx/spiflashfw/monitor_hdr
-npcx-monitor-hdr-ro-bin=${out}/$(npcx-monitor-hdr)_ro.bin
-npcx-monitor-hdr-rw-bin=${out}/$(npcx-monitor-hdr)_rw.bin
-PROJECT_EXTRA+=${npcx-monitor-hdr-ro-bin} ${npcx-monitor-hdr-rw-bin}
-endif
-
-# ECST tool is for filling the header used by booter of npcx EC
-show_esct_cmd=$(if $(V),,echo ' ECST ' $(subst $(out)/,,$@) ; )
-
-# Get the firmware length from the mapfile. This can differ from the file
-# size when the CONFIG_CHIP_INIT_ROM_REGION is used. Note that the -fwlen
-# parameter for the ecst utility must be in hex.
-cmd_fwlen=$(shell awk '\
- /__flash_used =/ {flash_used = strtonum($$1)} \
- END {printf ("%x", flash_used)}' $(1))
-
-# ECST options for header
-bld_ecst=${out}/util/ecst -chip $(CHIP_VARIANT) \
- -usearmrst -mode bt -ph -i $(1) -o $(2) -nohcrc -nofcrc -flashsize 8 \
- -fwlen $(call cmd_fwlen, $(patsubst %.flat,%.map,$(2))) \
- -spimaxclk 50 -spireadmode dual 1> /dev/null
-
-# Replace original one with the flat file including header
-moveflat=mv -f $(1) $(2)
-
-# Commands for ECST
-cmd_ecst=$(show_esct_cmd)$(call moveflat,$@,$@.tmp);$(call bld_ecst,$@.tmp,$@)
-
-# Commands to append npcx header in ec.RO.flat
-cmd_org_ec_elf_to_flat = $(OBJCOPY) --set-section-flags .roshared=share \
- -O binary $(patsubst %.flat,%.elf,$@) $@
-cmd_npcx_ro_elf_to_flat=$(cmd_org_ec_elf_to_flat);$(cmd_ecst)
-cmd_ec_elf_to_flat = $(if $(filter $(out)/RO/ec.RO.flat, $@), \
- $(cmd_npcx_ro_elf_to_flat), $(cmd_org_ec_elf_to_flat) )