OTA requires to erase flash

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: OTA requires to erase flash

Postby burkulesomesh43 » Thu Aug 30, 2018 9:05 am

fly135 wrote:
burkulesomesh43 wrote:actually problem is that when i want to update the firmware using ota example, i need to erase entire flash. if i cant erase it, the firmware will not update. and if i want to erase flash without connecting esp32 to my system then how can i erase the flash?
Seems like the post I made above was adequate to indicate to you that your notion of needing to erase the entire flash was wrong. In addition I indicated that the OTA example will erase the regions of flash needed to perform the update. The OTA example will download a new firmware build and reboot with your new firmware in flash. You don't need to erase the flash yourself.

John A
Heyy.. its now working..
actually no need to erase flash as you said.
I had written two ota codes(say A and B). so that code A updates the code B and code B updates code A. this process runs continuously.
thank you very much for your help.
and thank you all.
--
Somesh Burkule

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: OTA requires to erase flash

Postby fly135 » Thu Aug 30, 2018 3:22 pm

burkulesomesh43 wrote:see the post
viewtopic.php?t=1624#p7544
He obviously doesn't know what he's talking about. All you have to do is look in virtually any example partition table to see that there is a "factory" partition.

John A

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: OTA requires to erase flash

Postby burkulesomesh43 » Fri Aug 31, 2018 6:42 am

fly135 wrote:
burkulesomesh43 wrote:see the post
viewtopic.php?t=1624#p7544
He obviously doesn't know what he's talking about. All you have to do is look in virtually any example partition table to see that there is a "factory" partition.

John A
Ok.
I want to ask you that if many tasks are running in my esp32. and if I start my ota task in between them then is there a possibility to crash the firmware?? or esp32 gives only priority to ota update of firmware??
--
Somesh Burkule

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: OTA requires to erase flash

Postby fly135 » Fri Aug 31, 2018 2:32 pm

burkulesomesh43 wrote:I want to ask you that if many tasks are running in my esp32. and if I start my ota task in between them then is there a possibility to crash the firmware?? or esp32 gives only priority to ota update of firmware??
I answered this in the other thread. No worries... OTA will trip the WD warning while erasing the flash. Priority isn't the issue. My app gives this warning every time I OTA. I have probably 10 total user tasks running when I OTA. No problems at all. But I do get the WD warning.

John A

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: OTA requires to erase flash

Postby burkulesomesh43 » Sat Sep 01, 2018 5:50 am

fly135 wrote:
burkulesomesh43 wrote:I want to ask you that if many tasks are running in my esp32. and if I start my ota task in between them then is there a possibility to crash the firmware?? or esp32 gives only priority to ota update of firmware??
I answered this in the other thread. No worries... OTA will trip the WD warning while erasing the flash. Priority isn't the issue. My app gives this warning every time I OTA. I have probably 10 total user tasks running when I OTA. No problems at all. But I do get the WD warning.

John A
Ok. Thank you.
actually I stucked in FAT-FS. I combined partition table of wear level example and ota example. but as I run esp32 gives error.
>Failed to start FATFS.

# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild,,,,
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
storage, data, fat, , 0x19000,
ota_0,0, ota_0, 0x200000, 1M,
ota_1,0, ota_1, 0x300000, 1M,
--
Somesh Burkule

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: OTA requires to erase flash

Postby fly135 » Sat Sep 01, 2018 1:30 pm

I'm using "spiffs" instead of "fat" in my partition file.

https://docs.espressif.com/projects/esp ... piffs.html

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: OTA requires to erase flash

Postby burkulesomesh43 » Sat Sep 01, 2018 1:33 pm

fly135 wrote:I'm using "spiffs" instead of "fat" in my partition file.

https://docs.espressif.com/projects/esp ... piffs.html
Is there any problem to use fat?
--
Somesh Burkule

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: OTA requires to erase flash

Postby fly135 » Tue Sep 04, 2018 3:46 pm

burkulesomesh43 wrote:
fly135 wrote:I'm using "spiffs" instead of "fat" in my partition file.

https://docs.espressif.com/projects/esp ... piffs.html
Is there any problem to use fat?
I don't know, but spiffs worked the first time I tried it. I picked spiffs because of this...
SPIFFS is a file system intended for SPI NOR flash devices on embedded targets. It supports wear leveling, file system consistency checks and more.

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: OTA requires to erase flash

Postby burkulesomesh43 » Tue Sep 04, 2018 4:55 pm

Ok.
--
Somesh Burkule

Who is online

Users browsing this forum: No registered users and 96 guests