mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
esp32s3: Limit MTD partition size according to the flash size
Whenever a MTD partition is set, this change limits its size according to the flash size, avoiding the MTD partition to be greater than the actual flash size.
This commit is contained in:
parent
bc4a020146
commit
8dca62f8f9
5 changed files with 20 additions and 0 deletions
|
@ -27,6 +27,10 @@ config ESP32S3_STORAGE_MTD_OFFSET
|
|||
config ESP32S3_STORAGE_MTD_SIZE
|
||||
hex "Storage MTD size in SPI Flash"
|
||||
default 0x100000
|
||||
range 0x0 0x400000 if ESP32S3_FLASH_4M
|
||||
range 0x0 0x800000 if ESP32S3_FLASH_8M
|
||||
range 0x0 0x1000000 if ESP32S3_FLASH_16M
|
||||
range 0x0 0x2000000 if ESP32S3_FLASH_32M
|
||||
depends on ESP32S3_MTD
|
||||
---help---
|
||||
MTD size in SPI Flash.
|
||||
|
|
|
@ -27,6 +27,10 @@ config ESP32S3_STORAGE_MTD_OFFSET
|
|||
config ESP32S3_STORAGE_MTD_SIZE
|
||||
hex "Storage MTD size in SPI Flash"
|
||||
default 0x100000
|
||||
range 0x0 0x400000 if ESP32S3_FLASH_4M
|
||||
range 0x0 0x800000 if ESP32S3_FLASH_8M
|
||||
range 0x0 0x1000000 if ESP32S3_FLASH_16M
|
||||
range 0x0 0x2000000 if ESP32S3_FLASH_32M
|
||||
depends on ESP32S3_MTD
|
||||
---help---
|
||||
MTD size in SPI Flash.
|
||||
|
|
|
@ -15,6 +15,10 @@ config ESP32S3_STORAGE_MTD_OFFSET
|
|||
config ESP32S3_STORAGE_MTD_SIZE
|
||||
hex "Storage MTD size in SPI Flash"
|
||||
default 0x100000
|
||||
range 0x0 0x400000 if ESP32S3_FLASH_4M
|
||||
range 0x0 0x800000 if ESP32S3_FLASH_8M
|
||||
range 0x0 0x1000000 if ESP32S3_FLASH_16M
|
||||
range 0x0 0x2000000 if ESP32S3_FLASH_32M
|
||||
depends on ESP32S3_MTD
|
||||
---help---
|
||||
MTD size in SPI Flash.
|
||||
|
|
|
@ -16,6 +16,10 @@ config ESP32S3_STORAGE_MTD_OFFSET
|
|||
config ESP32S3_STORAGE_MTD_SIZE
|
||||
hex "Storage MTD size in SPI Flash"
|
||||
default 0x100000
|
||||
range 0x0 0x400000 if ESP32S3_FLASH_4M
|
||||
range 0x0 0x800000 if ESP32S3_FLASH_8M
|
||||
range 0x0 0x1000000 if ESP32S3_FLASH_16M
|
||||
range 0x0 0x2000000 if ESP32S3_FLASH_32M
|
||||
depends on ESP32S3_MTD
|
||||
---help---
|
||||
MTD size in SPI Flash.
|
||||
|
|
|
@ -15,6 +15,10 @@ config ESP32S3_STORAGE_MTD_OFFSET
|
|||
config ESP32S3_STORAGE_MTD_SIZE
|
||||
hex "Storage MTD size in SPI Flash"
|
||||
default 0x100000
|
||||
range 0x0 0x400000 if ESP32S3_FLASH_4M
|
||||
range 0x0 0x800000 if ESP32S3_FLASH_8M
|
||||
range 0x0 0x1000000 if ESP32S3_FLASH_16M
|
||||
range 0x0 0x2000000 if ESP32S3_FLASH_32M
|
||||
depends on ESP32S3_MTD
|
||||
---help---
|
||||
MTD size in SPI Flash.
|
||||
|
|
Loading…
Reference in a new issue