diff options
| author | Nick Brassel <nick@tzarc.org> | 2022-06-08 09:42:35 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-08 09:42:35 +1000 |
| commit | 1085500e894d9d31c4e97e7f1b74091bb9043a91 (patch) | |
| tree | 83b8b73f034503c97238e6c65a0dc81e6bc78639 | |
| parent | 6df5fce0732df5cf15f7c388040e6dadbaa476b0 (diff) | |
Rework paths for eeprom locations. (#17326)
* Rework paths for eeprom locations.
* File relocation.
* Wrong file move.
* Fixup test paths.
| -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)),) | |||
| 160 | $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) | 160 | $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) |
| 161 | else | 161 | else |
| 162 | OPT_DEFS += -DEEPROM_ENABLE | 162 | OPT_DEFS += -DEEPROM_ENABLE |
| 163 | COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom | ||
| 164 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | ||
| 165 | COMMON_VPATH += $(PLATFORM_COMMON_DIR) | ||
| 163 | ifeq ($(strip $(EEPROM_DRIVER)), custom) | 166 | ifeq ($(strip $(EEPROM_DRIVER)), custom) |
| 164 | # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block | 167 | # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block |
| 165 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM | 168 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM |
| 166 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | ||
| 167 | SRC += eeprom_driver.c | 169 | SRC += eeprom_driver.c |
| 168 | else ifeq ($(strip $(EEPROM_DRIVER)), i2c) | 170 | else ifeq ($(strip $(EEPROM_DRIVER)), i2c) |
| 169 | # External I2C EEPROM implementation | 171 | # External I2C EEPROM implementation |
| 170 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C | 172 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C |
| 171 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | ||
| 172 | QUANTUM_LIB_SRC += i2c_master.c | 173 | QUANTUM_LIB_SRC += i2c_master.c |
| 173 | SRC += eeprom_driver.c eeprom_i2c.c | 174 | SRC += eeprom_driver.c eeprom_i2c.c |
| 174 | else ifeq ($(strip $(EEPROM_DRIVER)), spi) | 175 | else ifeq ($(strip $(EEPROM_DRIVER)), spi) |
| 175 | # External SPI EEPROM implementation | 176 | # External SPI EEPROM implementation |
| 176 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI | 177 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI |
| 177 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | ||
| 178 | QUANTUM_LIB_SRC += spi_master.c | 178 | QUANTUM_LIB_SRC += spi_master.c |
| 179 | SRC += eeprom_driver.c eeprom_spi.c | 179 | SRC += eeprom_driver.c eeprom_spi.c |
| 180 | else ifeq ($(strip $(EEPROM_DRIVER)), transient) | 180 | else ifeq ($(strip $(EEPROM_DRIVER)), transient) |
| 181 | # Transient EEPROM implementation -- no data storage but provides runtime area for it | 181 | # Transient EEPROM implementation -- no data storage but provides runtime area for it |
| 182 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT | 182 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT |
| 183 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | ||
| 184 | SRC += eeprom_driver.c eeprom_transient.c | 183 | SRC += eeprom_driver.c eeprom_transient.c |
| 185 | else ifeq ($(strip $(EEPROM_DRIVER)), vendor) | 184 | else ifeq ($(strip $(EEPROM_DRIVER)), vendor) |
| 186 | # Vendor-implemented EEPROM | 185 | # Vendor-implemented EEPROM |
| @@ -191,17 +190,13 @@ else | |||
| 191 | ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) | 190 | ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) |
| 192 | # Emulated EEPROM | 191 | # Emulated EEPROM |
| 193 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED | 192 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED |
| 194 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | 193 | COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash |
| 195 | SRC += eeprom_driver.c | 194 | COMMON_VPATH += $(DRIVER_PATH)/flash |
| 196 | SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c | 195 | SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c |
| 197 | SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c | ||
| 198 | else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) | 196 | else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) |
| 199 | # True EEPROM on STM32L0xx, L1xx | 197 | # True EEPROM on STM32L0xx, L1xx |
| 200 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 | 198 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 |
| 201 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | 199 | SRC += eeprom_driver.c eeprom_stm32_L0_L1.c |
| 202 | COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom | ||
| 203 | SRC += eeprom_driver.c | ||
| 204 | SRC += eeprom_stm32_L0_L1.c | ||
| 205 | else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) | 200 | else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) |
| 206 | # Teensy EEPROM implementations | 201 | # Teensy EEPROM implementations |
| 207 | OPT_DEFS += -DEEPROM_TEENSY | 202 | OPT_DEFS += -DEEPROM_TEENSY |
| @@ -209,17 +204,16 @@ else | |||
| 209 | else | 204 | else |
| 210 | # Fall back to transient, i.e. non-persistent | 205 | # Fall back to transient, i.e. non-persistent |
| 211 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT | 206 | OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT |
| 212 | COMMON_VPATH += $(DRIVER_PATH)/eeprom | ||
| 213 | SRC += eeprom_driver.c eeprom_transient.c | 207 | SRC += eeprom_driver.c eeprom_transient.c |
| 214 | endif | 208 | endif |
| 215 | else ifeq ($(PLATFORM),ARM_ATSAM) | 209 | else ifeq ($(PLATFORM),ARM_ATSAM) |
| 216 | # arm_atsam EEPROM | 210 | # arm_atsam EEPROM |
| 217 | OPT_DEFS += -DEEPROM_SAMD | 211 | OPT_DEFS += -DEEPROM_SAMD |
| 218 | SRC += $(PLATFORM_COMMON_DIR)/eeprom_samd.c | 212 | SRC += eeprom_samd.c |
| 219 | else ifeq ($(PLATFORM),TEST) | 213 | else ifeq ($(PLATFORM),TEST) |
| 220 | # Test harness "EEPROM" | 214 | # Test harness "EEPROM" |
| 221 | OPT_DEFS += -DEEPROM_TEST_HARNESS | 215 | OPT_DEFS += -DEEPROM_TEST_HARNESS |
| 222 | SRC += $(PLATFORM_COMMON_DIR)/eeprom.c | 216 | SRC += eeprom.c |
| 223 | endif | 217 | endif |
| 224 | endif | 218 | endif |
| 225 | endif | 219 | 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) \ | |||
| 11 | -DFEE_PAGE_COUNT=16 | 11 | -DFEE_PAGE_COUNT=16 |
| 12 | 12 | ||
| 13 | eeprom_stm32_INC := \ | 13 | eeprom_stm32_INC := \ |
| 14 | $(PLATFORM_PATH)/chibios/ | 14 | $(PLATFORM_PATH)/chibios/drivers/eeprom/ \ |
| 15 | $(PLATFORM_PATH)/chibios/drivers/flash/ | ||
| 15 | eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) | 16 | eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) |
| 16 | eeprom_stm32_large_INC := $(eeprom_stm32_INC) | 17 | eeprom_stm32_large_INC := $(eeprom_stm32_INC) |
| 17 | 18 | ||
| @@ -19,6 +20,6 @@ eeprom_stm32_SRC := \ | |||
| 19 | $(TOP_DIR)/drivers/eeprom/eeprom_driver.c \ | 20 | $(TOP_DIR)/drivers/eeprom/eeprom_driver.c \ |
| 20 | $(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \ | 21 | $(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \ |
| 21 | $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \ | 22 | $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \ |
| 22 | $(PLATFORM_PATH)/chibios/eeprom_stm32.c | 23 | $(PLATFORM_PATH)/chibios/drivers/eeprom/eeprom_stm32.c |
| 23 | eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) | 24 | eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) |
| 24 | eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) | 25 | eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) |
