kopia lustrzana https://github.com/espressif/esp-idf
add support for Flash 32MB..128MB (S2, S3)
ESP32-S2 and ESP32-S3 supports up to 1 GB of external flash and RAM add support for - 32MB - 64MB - 128MB ( example NOR spiFLASH 1G-BIT W25Q01JVZEIQ Winbond 0xEF 0x40 0x21 ) Merges https://github.com/espressif/esp-idf/pull/7688 Signed-off-by: Ivan Grokhotkov <ivan@espressif.com>pull/8934/head
rodzic
050d6977f0
commit
04959af635
|
@ -55,6 +55,9 @@ typedef enum {
|
|||
ESP_IMAGE_FLASH_SIZE_4MB, /*!< SPI flash size 4 MB */
|
||||
ESP_IMAGE_FLASH_SIZE_8MB, /*!< SPI flash size 8 MB */
|
||||
ESP_IMAGE_FLASH_SIZE_16MB, /*!< SPI flash size 16 MB */
|
||||
ESP_IMAGE_FLASH_SIZE_32MB, /*!< SPI flash size 32 MB */
|
||||
ESP_IMAGE_FLASH_SIZE_64MB, /*!< SPI flash size 64 MB */
|
||||
ESP_IMAGE_FLASH_SIZE_128MB, /*!< SPI flash size 128 MB */
|
||||
ESP_IMAGE_FLASH_SIZE_MAX /*!< SPI flash size MAX */
|
||||
} esp_image_flash_size_t;
|
||||
|
||||
|
|
|
@ -101,6 +101,15 @@ static void update_flash_config(const esp_image_header_t *bootloader_hdr)
|
|||
case ESP_IMAGE_FLASH_SIZE_16MB:
|
||||
size = 16;
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_32MB:
|
||||
size = 32;
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_64MB:
|
||||
size = 64;
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_128MB:
|
||||
size = 128;
|
||||
break;
|
||||
default:
|
||||
size = 2;
|
||||
}
|
||||
|
@ -174,6 +183,15 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
|
|||
case ESP_IMAGE_FLASH_SIZE_16MB:
|
||||
str = "16MB";
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_32MB:
|
||||
str = "32MB";
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_64MB:
|
||||
str = "64MB";
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_128MB:
|
||||
str = "128MB";
|
||||
break;
|
||||
default:
|
||||
str = "2MB";
|
||||
break;
|
||||
|
|
|
@ -103,6 +103,15 @@ static void update_flash_config(const esp_image_header_t *bootloader_hdr)
|
|||
case ESP_IMAGE_FLASH_SIZE_16MB:
|
||||
size = 16;
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_32MB:
|
||||
size = 32;
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_64MB:
|
||||
size = 64;
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_128MB:
|
||||
size = 128;
|
||||
break;
|
||||
default:
|
||||
size = 2;
|
||||
}
|
||||
|
@ -176,6 +185,15 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
|
|||
case ESP_IMAGE_FLASH_SIZE_16MB:
|
||||
str = "16MB";
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_32MB:
|
||||
str = "32MB";
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_64MB:
|
||||
str = "64MB";
|
||||
break;
|
||||
case ESP_IMAGE_FLASH_SIZE_128MB:
|
||||
str = "128MB";
|
||||
break;
|
||||
default:
|
||||
str = "2MB";
|
||||
break;
|
||||
|
|
|
@ -901,6 +901,12 @@ int esp_image_get_flash_size(esp_image_flash_size_t app_flash_size)
|
|||
return 8 * 1024 * 1024;
|
||||
case ESP_IMAGE_FLASH_SIZE_16MB:
|
||||
return 16 * 1024 * 1024;
|
||||
case ESP_IMAGE_FLASH_SIZE_32MB:
|
||||
return 32 * 1024 * 1024;
|
||||
case ESP_IMAGE_FLASH_SIZE_64MB:
|
||||
return 64 * 1024 * 1024;
|
||||
case ESP_IMAGE_FLASH_SIZE_128MB:
|
||||
return 128 * 1024 * 1024;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -170,6 +170,12 @@ menu "Serial flasher config"
|
|||
bool "8 MB"
|
||||
config ESPTOOLPY_FLASHSIZE_16MB
|
||||
bool "16 MB"
|
||||
config ESPTOOLPY_FLASHSIZE_32MB
|
||||
bool "32 MB"
|
||||
config ESPTOOLPY_FLASHSIZE_64MB
|
||||
bool "64 MB"
|
||||
config ESPTOOLPY_FLASHSIZE_128MB
|
||||
bool "128 MB"
|
||||
endchoice
|
||||
|
||||
config ESPTOOLPY_FLASHSIZE
|
||||
|
@ -179,6 +185,9 @@ menu "Serial flasher config"
|
|||
default "4MB" if ESPTOOLPY_FLASHSIZE_4MB
|
||||
default "8MB" if ESPTOOLPY_FLASHSIZE_8MB
|
||||
default "16MB" if ESPTOOLPY_FLASHSIZE_16MB
|
||||
default "32MB" if ESPTOOLPY_FLASHSIZE_32MB
|
||||
default "64MB" if ESPTOOLPY_FLASHSIZE_64MB
|
||||
default "128MB" if ESPTOOLPY_FLASHSIZE_128MB
|
||||
|
||||
config ESPTOOLPY_FLASHSIZE_DETECT
|
||||
bool "Detect flash size when flashing bootloader"
|
||||
|
|
|
@ -505,7 +505,7 @@ def main():
|
|||
parser = argparse.ArgumentParser(description='ESP32 partition table utility')
|
||||
|
||||
parser.add_argument('--flash-size', help='Optional flash size limit, checks partition table fits in flash',
|
||||
nargs='?', choices=['1MB', '2MB', '4MB', '8MB', '16MB'])
|
||||
nargs='?', choices=['1MB', '2MB', '4MB', '8MB', '16MB', '32MB', '64MB', '128MB'])
|
||||
parser.add_argument('--disable-md5sum', help='Disable md5 checksum for the partition table', default=False, action='store_true')
|
||||
parser.add_argument('--no-verify', help="Don't verify partition table fields", action='store_true')
|
||||
parser.add_argument('--verify', '-v', help='Verify partition table fields (deprecated, this behaviour is '
|
||||
|
|
Ładowanie…
Reference in New Issue