refactor(spi_flash): move os layer to esp_mspi and chip configs to spi_flash

Also fixes the implicit dependency on esp_partition.
This commit is contained in:
armando
2026-06-02 11:12:03 +08:00
committed by Armando (Dou Yiwen)
parent c565262ded
commit 6e3abd12a1
197 changed files with 1227 additions and 1139 deletions

View File

@@ -92,7 +92,6 @@ components/bootloader_support/bootloader_flash/include/bootloader_flash.h
components/bootloader_support/bootloader_flash/include/bootloader_flash_priv.h
components/esp_hw_support/include/esp_private/regdma_link.h
components/lwip/include/lwip/netdb.h
components/spi_flash/include/esp_private/spi_flash_os.h
### To be fixed: files which don't compile for esp32s2 target:

View File

@@ -20,8 +20,8 @@ g1_g0_components_base = [
'esp_system',
'xtensa',
'riscv',
'spi_flash',
'esp_mm',
'esp_mspi',
]
@@ -54,8 +54,8 @@ g1_g0_components = g1_g0_components_base + get_all_esp_hal_components()
# Global expected dependency violations that apply to all targets
expected_dep_violations = {
'esp_system': ['esp_timer', 'bootloader_support', 'esp_pm'],
'spi_flash': ['bootloader_support', 'esp_blockdev', 'esp_driver_gpio'],
'esp_hw_support': ['efuse', 'bootloader_support', 'esp_driver_gpio', 'esp_timer', 'esp_pm'],
'esp_mspi': ['bootloader_support'],
'cxx': ['pthread'],
}
@@ -68,15 +68,11 @@ else:
expected_dep_violations['esp_system'].append('esp_usb_cdc_rom_console')
# Target-specific expected dependency violations
target_specific_expected_dep_violations = {
target_specific_expected_dep_violations: dict[str, dict[str, list[str]]] = {
# 'target': {
# Add target-specific violations for target here
# 'component_name': ['dependency1', 'dependency2'],
# },
'esp32s2': {
# ESP32-S2 uses the crypto DMA lock for encrypted writes, thus, spi_flash needs to depend on esp_security
'spi_flash': ['esp_security'],
},
}

View File

@@ -13,7 +13,7 @@ set(extra_components_which_shouldnt_be_included
bootloader
# bootloader_support is a dependency of the following G1 components:
# spi_flash, esp_system, esp_hw_support.
# esp_system, esp_hw_support, esp_mspi.
# as well as the following non G1 components:
# efuse, app_update, esp_partition
# Challenging to remove: IDF-8581 for more details
@@ -23,7 +23,7 @@ set(extra_components_which_shouldnt_be_included
cxx
# esp_driver_gpio is a dependency of esp_pm (should be removed from g1 builds),
# as well as spi_flash, esp_hw_support, IDF-10387
# as well as esp_hw_support, IDF-10387
esp_driver_gpio
# esp_app_format is dependency of bootloader_support, app_update, efuse.
@@ -76,6 +76,9 @@ set(extra_components_which_shouldnt_be_included
# esp_security is required by spi_flash
esp_security
# spi_flash is pulled in by bootloader_support (non-bootloader build).
spi_flash
)
if(NOT IDF_BUILD_V2)

View File

@@ -3,7 +3,7 @@
# project is configured, since cmakev1 uses COMPONENTS to restrict the build.
set(g0_components soc hal esp_common esp_rom) # also <arch>, i.e. xtensa or riscv, will be added below
set(g1_components spi_flash freertos log heap esp_libc esp_system esp_hw_support esp_mm esp_stdio)
set(g1_components freertos log heap esp_libc esp_system esp_hw_support esp_mm esp_stdio esp_mspi)
# The HAL components that required by G1 components
# Most of these HAL components are required by `clk.c` in `esp_system` for peripherals clock initialization.
set(esp_hal_components