@@ -156,8 +156,6 @@ bool update_to_factory_partition(void) {
156
156
uint32_t bytes_read = 0 ;
157
157
158
158
while (updater_data .size != bytes_read ){
159
- //printf("update_to_factory_partition 4\n");
160
-
161
159
updater_spi_flash_read (IMG_UPDATE1_OFFSET_OLD + bytes_read , buf , SPI_FLASH_SEC_SIZE , false);
162
160
bytes_read += SPI_FLASH_SEC_SIZE ;
163
161
if (false == updater_write (buf , SPI_FLASH_SEC_SIZE )){
@@ -185,7 +183,6 @@ bool updater_start (void) {
185
183
uint32_t boot_info_offset_local ;
186
184
if (true != updater_read_boot_info (& boot_info_local , & boot_info_offset_local )) {
187
185
ESP_LOGE (TAG , "Reading boot info (otadata partition) failed!\n" );
188
- printf ("Reading boot info (otadata partition) failed!\n" );
189
186
return false;
190
187
}
191
188
@@ -196,15 +193,13 @@ bool updater_start (void) {
196
193
ret = spi_flash_erase_sector (OTA_DATA_ADDRESS / SPI_FLASH_SEC_SIZE );
197
194
if (ESP_OK != ret ) {
198
195
ESP_LOGE (TAG , "Erasing new sector of boot info failed, error code: %d!\n" , ret );
199
- printf ("Erasing new sector of boot info failed, error code: %d!\n" , ret );
200
196
// TODO: try again ???
201
197
return false;
202
198
}
203
199
204
200
// Updating the NEW otadata partition with the OLD information
205
201
if (true != updater_write_boot_info (& boot_info_local , OTA_DATA_ADDRESS )) {
206
202
ESP_LOGE (TAG , "Writing new sector of boot info failed!\n" );
207
- printf ("Writing new sector of boot info failed!\n" );
208
203
//TODO: try again ???
209
204
return false;
210
205
}
@@ -213,22 +208,19 @@ bool updater_start (void) {
213
208
ret = spi_flash_erase_sector (ESP_PARTITION_TABLE_ADDR / SPI_FLASH_SEC_SIZE );
214
209
if (ESP_OK != ret ) {
215
210
ESP_LOGE (TAG , "Erasing partition table partition failed, error code: %d!\n" , ret );
216
- printf ("Erasing partition table partition failed, error code: %d!\n" , ret );
217
211
//TODO: write back old one ??
218
212
return false;
219
213
}
220
214
// Writing the new partition table
221
215
ret = spi_flash_write (ESP_PARTITION_TABLE_ADDR , (void * )buf , vstr .len );
222
216
if (ESP_OK != ret ) {
223
217
ESP_LOGE (TAG , "Writing new partition table failed, error code: %d\n" , ret );
224
- printf ("Writing new partition table failed, error code: %d\n" , ret );
225
218
//TODO: try again ???
226
219
return false;
227
220
}
228
221
}
229
222
else {
230
223
ESP_LOGE (TAG , "Reading file (/flash/partitions.bin) containing the new partition table failed!\n" );
231
- printf ("Reading file (/flash/partitions.bin) containing the new partition table failed!\n" );
232
224
return false;
233
225
}
234
226
0 commit comments