diff options
-rw-r--r-- | builddefs/common_features.mk | 24 | ||||
-rw-r--r-- | platforms/chibios/drivers/eeprom/eeprom_stm32.c (renamed from platforms/chibios/eeprom_stm32.c) | 0 | ||||
-rw-r--r-- | platforms/chibios/drivers/eeprom/eeprom_stm32.h (renamed from platforms/chibios/eeprom_stm32.h) | 0 | ||||
-rw-r--r-- | platforms/chibios/drivers/eeprom/eeprom_stm32_defs.h (renamed from platforms/chibios/eeprom_stm32_defs.h) | 0 | ||||
-rw-r--r-- | platforms/chibios/drivers/eeprom/eeprom_teensy.c (renamed from platforms/chibios/eeprom_teensy.c) | 0 | ||||
-rwxr-xr-x | platforms/chibios/drivers/eeprom/eeprom_teensy.h (renamed from platforms/chibios/eeprom_teensy.h) | 0 | ||||
-rw-r--r-- | platforms/chibios/drivers/flash/flash_stm32.c (renamed from platforms/chibios/flash_stm32.c) | 0 | ||||
-rw-r--r-- | platforms/chibios/drivers/flash/flash_stm32.h (renamed from platforms/chibios/flash_stm32.h) | 0 | ||||
-rw-r--r-- | platforms/test/rules.mk | 5 |
9 files changed, 12 insertions, 17 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 631558ef27..ff0c6b0cc6 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -160,27 +160,26 @@ ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) else OPT_DEFS += -DEEPROM_ENABLE + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom + COMMON_VPATH += $(DRIVER_PATH)/eeprom + COMMON_VPATH += $(PLATFORM_COMMON_DIR) ifeq ($(strip $(EEPROM_DRIVER)), custom) # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM - COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c else ifeq ($(strip $(EEPROM_DRIVER)), i2c) # External I2C EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C - COMMON_VPATH += $(DRIVER_PATH)/eeprom QUANTUM_LIB_SRC += i2c_master.c SRC += eeprom_driver.c eeprom_i2c.c else ifeq ($(strip $(EEPROM_DRIVER)), spi) # External SPI EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI - COMMON_VPATH += $(DRIVER_PATH)/eeprom QUANTUM_LIB_SRC += spi_master.c SRC += eeprom_driver.c eeprom_spi.c else ifeq ($(strip $(EEPROM_DRIVER)), transient) # Transient EEPROM implementation -- no data storage but provides runtime area for it OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT - COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c eeprom_transient.c else ifeq ($(strip $(EEPROM_DRIVER)), vendor) # Vendor-implemented EEPROM @@ -191,17 +190,13 @@ else ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED - COMMON_VPATH += $(DRIVER_PATH)/eeprom - SRC += eeprom_driver.c - SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash + COMMON_VPATH += $(DRIVER_PATH)/flash + SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) # True EEPROM on STM32L0xx, L1xx OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 - COMMON_VPATH += $(DRIVER_PATH)/eeprom - COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom - SRC += eeprom_driver.c - SRC += eeprom_stm32_L0_L1.c + SRC += eeprom_driver.c eeprom_stm32_L0_L1.c else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations OPT_DEFS += -DEEPROM_TEENSY @@ -209,17 +204,16 @@ else else # Fall back to transient, i.e. non-persistent OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT - COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c eeprom_transient.c endif else ifeq ($(PLATFORM),ARM_ATSAM) # arm_atsam EEPROM OPT_DEFS += -DEEPROM_SAMD - SRC += $(PLATFORM_COMMON_DIR)/eeprom_samd.c + SRC += eeprom_samd.c else ifeq ($(PLATFORM),TEST) # Test harness "EEPROM" OPT_DEFS += -DEEPROM_TEST_HARNESS - SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + SRC += eeprom.c endif endif endif diff --git a/platforms/chibios/eeprom_stm32.c b/platforms/chibios/drivers/eeprom/eeprom_stm32.c index a15bfe09ed..a15bfe09ed 100644 --- a/platforms/chibios/eeprom_stm32.c +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32.c diff --git a/platforms/chibios/eeprom_stm32.h b/platforms/chibios/drivers/eeprom/eeprom_stm32.h index 8fcfb556b8..8fcfb556b8 100644 --- a/platforms/chibios/eeprom_stm32.h +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32.h diff --git a/platforms/chibios/eeprom_stm32_defs.h b/platforms/chibios/drivers/eeprom/eeprom_stm32_defs.h index 57d0440330..57d0440330 100644 --- a/platforms/chibios/eeprom_stm32_defs.h +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32_defs.h diff --git a/platforms/chibios/eeprom_teensy.c b/platforms/chibios/drivers/eeprom/eeprom_teensy.c index c8777febde..c8777febde 100644 --- a/platforms/chibios/eeprom_teensy.c +++ b/platforms/chibios/drivers/eeprom/eeprom_teensy.c diff --git a/platforms/chibios/eeprom_teensy.h b/platforms/chibios/drivers/eeprom/eeprom_teensy.h index 9a14a1fa79..9a14a1fa79 100755 --- a/platforms/chibios/eeprom_teensy.h +++ b/platforms/chibios/drivers/eeprom/eeprom_teensy.h diff --git a/platforms/chibios/flash_stm32.c b/platforms/chibios/drivers/flash/flash_stm32.c index 72c41b8b78..72c41b8b78 100644 --- a/platforms/chibios/flash_stm32.c +++ b/platforms/chibios/drivers/flash/flash_stm32.c diff --git a/platforms/chibios/flash_stm32.h b/platforms/chibios/drivers/flash/flash_stm32.h index 6c66642ec5..6c66642ec5 100644 --- a/platforms/chibios/flash_stm32.h +++ b/platforms/chibios/drivers/flash/flash_stm32.h diff --git a/platforms/test/rules.mk b/platforms/test/rules.mk index 55512c7392..a2baa283d0 100644 --- a/platforms/test/rules.mk +++ b/platforms/test/rules.mk @@ -11,7 +11,8 @@ eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \ -DFEE_PAGE_COUNT=16 eeprom_stm32_INC := \ - $(PLATFORM_PATH)/chibios/ + $(PLATFORM_PATH)/chibios/drivers/eeprom/ \ + $(PLATFORM_PATH)/chibios/drivers/flash/ eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) eeprom_stm32_large_INC := $(eeprom_stm32_INC) @@ -19,6 +20,6 @@ eeprom_stm32_SRC := \ $(TOP_DIR)/drivers/eeprom/eeprom_driver.c \ $(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \ $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \ - $(PLATFORM_PATH)/chibios/eeprom_stm32.c + $(PLATFORM_PATH)/chibios/drivers/eeprom/eeprom_stm32.c eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) |