partition erase and partition write DOES NOT WORK [SOLVED]
Posted: Wed May 06, 2020 11:44 pm
Im at a loss here...ive been messing around with this for 7 hours and I cant figure out why esp_partition_erase_range and esp_partition_write do not work.
All they do is return either "invalid size" or "invalid argument" errors.
ESP32-wroom32, 16MB flash.
My partition table is setup for a SPIFFS partition size 0xAF0000, starting address 0x510000, partition name is "spiffs".
esp_partition_erase_range("spiffs", 0, 0xAF0000); returns invalid argument.
0xAF0000 is divisible by 4096, so that should not be a problem.
esp_partition_write also always returns either "invalid argument" or "invalid size".
According to the IDF documentation, if invalid size is returned following a partition erase, it means "if erase would go out of bounds of the partition". Thats impossible! The partition is 0xAF0000 in length, im telling it to erase 0xAF0000.
For testing, I tried telling it to erase a shorter length (that was divisible by 4096), and it still says invalid size.
Is there some other magic involved in using esp_partition_write and esp_partition_erase_range that the IDF documents dont mention!!??
All they do is return either "invalid size" or "invalid argument" errors.
ESP32-wroom32, 16MB flash.
My partition table is setup for a SPIFFS partition size 0xAF0000, starting address 0x510000, partition name is "spiffs".
esp_partition_erase_range("spiffs", 0, 0xAF0000); returns invalid argument.
0xAF0000 is divisible by 4096, so that should not be a problem.
esp_partition_write also always returns either "invalid argument" or "invalid size".
According to the IDF documentation, if invalid size is returned following a partition erase, it means "if erase would go out of bounds of the partition". Thats impossible! The partition is 0xAF0000 in length, im telling it to erase 0xAF0000.
For testing, I tried telling it to erase a shorter length (that was divisible by 4096), and it still says invalid size.
Is there some other magic involved in using esp_partition_write and esp_partition_erase_range that the IDF documents dont mention!!??