*partition = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_ANY, "ota_0"); assert(partition != NULL); // If ota_0 is the boot partition use ota_1 to write to otherwise keep ota_0 if (esp_ota_get_boot_partition() == partition) partition = esp_partition_fin...
intfs_write(constvoid*data,void*addr, u32 size){constesp_partition_t* part; part = esp_partition_find_first( ESP_PARTITION_TYPE_DATA,0x87,NULL);if(part !=NULL) {if(esp_partition_write(part, (size_t)addr, data, (size_t)size) == ESP_OK) { ... ...
I am trying to use a small factory partition to write a bin file to the ota0 partition. My goal is to use a small partition to facilitate updates via an SD card to a larger partition that hold the actual app. The issue that I am having is that while esp_partition_write gives my ...
esp_err_to_name(res)); res = esp_partition_erase_range( _ssbl,0x1000,0x1000); ESP_LOGW(TAG,"ERASE Res: %s", esp_err_to_name(res)); uint8 rubbish[64] = {0}; res = esp_partition_write( _ssbl,0x1000,&rubbish,64); ESP_LOGW(TAG,"WRITE Res: %s", esp_err_to_name(res))...
(It seems like this behavior was likely broken in d886d33, which updated the code to always write to the factory partition again.) I confirmed that using `espflash flash --target-app-partition ota_0` now causes espflash to write the image to the `ota_0` partition. Note that this ...
Using the Esp32S3 chip, I managed to define a "bootloader_component" "bootloader_components/my_boot_hooks/hooks.c" where a placed a void bootloader_before_init(void) {} definition. From that function, I would like to read and write some bytes of a flash partition. ...
When using esp_partition_write, it simply checks if partition->encrypted is true, and if so encrypts the write using spi_flash_write_encrypted() which is blindly calling spi_flash_write_encrypted() even when esp_flash_encryption_enabled == false...