From d3dffe253213fd7fa75fe6ef1c14b32629ca30c6 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 27 Jun 2013 11:00:41 -0700 Subject: stm32: Add CHIP_FAMILY defines Previously, code which needed to work on all STM32F platforms needed to specify them by name (CHIP_VARIANT_stm32f100 || CHIP_VARIANT_stm32f10x), and we needed extra symlinks in the chip/stm32/ directory to allow the build system to find family-specific files. Add a CHIP_FAMILY level of abstraction, so that things which are common across all STM32F platforms don't need to specify every STM32F variant. Make the chip build look for family-specific filenames instead of variant-specific filenames (except for config*.h, which is actually variant specific). In the few places where things actually are variant-specific, keep using the existing CHIP_VARIANT defines. Code refactoring only; no functional changes. BUG=chrome-os-partner:20567 BRANCH=none TEST=build all platforms Change-Id: I1da831aadabf8b8dd9dfde423cac13c9f43eb953 Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/60247 Reviewed-by: David Hendricks Reviewed-by: Vic Yang Reviewed-by: Simon Glass --- Makefile.toolchain | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile.toolchain') diff --git a/Makefile.toolchain b/Makefile.toolchain index c9de7aaf78..9eaf2c4ceb 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -34,8 +34,9 @@ CFLAGS_COVERAGE=$(if $(TEST_COVERAGE),-fprofile-arcs -ftest-coverage \ -DTEST_COVERAGE,) CFLAGS_DEFINE=-DOUTDIR=$(out) -DCHIP=$(CHIP) -DBOARD_TASKFILE=ec.tasklist \ -DBOARD=$(BOARD) -DBOARD_$(BOARD) -DCORE=$(CORE) \ - -DCHIP_$(CHIP) -DCHIP_VARIANT=$(CHIP_VARIANT) \ - -DCHIP_VARIANT_$(CHIP_VARIANT) -DPROJECT=$(PROJECT) + -DPROJECT=$(PROJECT) -DCHIP_$(CHIP) \ + -DCHIP_VARIANT=$(CHIP_VARIANT) -DCHIP_VARIANT_$(CHIP_VARIANT) \ + -DCHIP_FAMILY=$(CHIP_FAMILY) -DCHIP_FAMILY_$(CHIP_FAMILY) CPPFLAGS=$(CFLAGS_DEFINE) $(CFLAGS_INCLUDE) $(CFLAGS_TEST) \ $(EXTRA_CFLAGS) $(CFLAGS_COVERAGE) CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(CFLAGS_WARN) $(CFLAGS_y) -- cgit v1.2.1