Unable to flash FAT FS on External Flash

tsctrl
Posts: 30
Joined: Tue Dec 08, 2020 1:37 pm

Unable to flash FAT FS on External Flash

Postby tsctrl » Sun Dec 27, 2020 1:28 am

I hook up Windbond 16MB flash and run the storage/ext_flash_fatfs example and got the expected result:

Code: Select all

I (334) example: Pin assignments:
I (334) example: MOSI: 23   MISO: 19   SCLK: 18   CS:  5
I (344) spi_flash: detected chip: winbond
I (344) spi_flash: flash io: dio
I (344) example: Initialized external Flash, size=16384 KB, ID=0xef4018
I (354) example: Adding external Flash as a partition, label="storage", size=16384 KB
I (364) example: Listing data partitions:
I (364) example: - partition 'nvs', subtype 2, offset 0x9000, size 24 kB
I (374) example: - partition 'phy_init', subtype 1, offset 0xf000, size 4 kB
I (384) example: - partition 'storage', subtype 129, offset 0x0, size 16384 kB
I (394) example: Mounting FAT filesystem
I (404) example: FAT FS: 16212 kB total, 16208 kB free
I (404) example: Opening file
I (584) example: File written
I (584) example: Reading file
I (584) example: Read from file: 'Written using ESP-IDF v4.3-dev-1901-g178b122c1-dirty'
Question:
1. How do i flash this external flash similar like internal flash using the mkspiffs and esptool?
2. Since its is fatfs, is there way to preload the flash content using other tools?
3. i have 'storage', spiffs at 0x180000 offset for internal storage. example: - partition 'storage', subtype 129, offset 0x0, size 16384 kB, what does this mean? is it overrides the internal storage?

Thank you in advance.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: Unable to flash FAT FS on External Flash

Postby ESP_igrr » Sun Dec 27, 2020 11:49 pm

Hi tsctrl,
tsctrl wrote: 1. How do i flash this external flash similar like internal flash using the mkspiffs and esptool?
2. Since its is fatfs, is there way to preload the flash content using other tools?
Currently we don't have such a tool, but we plan to develop it in Q1 2021.
tsctrl wrote: 3. i have 'storage', spiffs at 0x180000 offset for internal storage. example: - partition 'storage', subtype 129, offset 0x0, size 16384 kB, what does this mean? is it overrides the internal storage?
The additional partition for external flash shouldn't override internal partitions. You can choose different name to distinguish it, or distinguish it by subtype. For example, you can call the partition in the main flash "int_storage" and the partition in external flash "ext_storage".

tsctrl
Posts: 30
Joined: Tue Dec 08, 2020 1:37 pm

Re: Unable to flash FAT FS on External Flash

Postby tsctrl » Wed Dec 30, 2020 10:06 am

Hi @ESP_igrr,

Thank you for your reply. I have created future request for this enhancement as below:
https://github.com/espressif/esp-idf/issues/6337

Thank you,
tsctrl

Who is online

Users browsing this forum: Baidu [Spider] and 120 guests