Page 1 of 2

Firmware upgrade between Factory App and OTA_0 only

Posted: Fri May 24, 2019 6:26 am
by Ritu21
Hi,

I was thinking, if I can use only Factory app and OTA_0 for firmware upgrade, since my esp 32 flash size is 4MB only and I need to include both spiffs and ota in my application. Currently my partition table is as below:

Name | Type | SubType | Offset | Size | Flags
nvs | data | nvs | 0x9000 | 16K |
otadata | data | ota | 0xd000 | 8K |
phy_init | data | phy | 0xf000 | 4K |
factory | app | factory | 0x10000 | 1M |
storage | data | spiffs | | 16K |
ota_0 | 0 | ota_0 | | 1200K |
ota_1 | 0 | ota_1 | | 1200K |


Using 16K for spiffs doesn't let me read the file I stored in spiffs.Increasing to 1Mb, solved the issue. Is there any size limitation for using spiff? Can I use only Factory app and OTA_0 for firmware upgrade? If yes, then how??

Waiting for your reply.

Thanks
Ritu.

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Fri May 24, 2019 7:21 am
by WiFive
You can use ota_0 and ota_1 without factory app

https://github.com/espressif/arduino-es ... efault.csv

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Fri May 24, 2019 7:43 am
by Ritu21
Thank you Wifive.

Do I have to take any precautionary meseasures if I opt for this option.

Thanks
Ritu.

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Sat May 25, 2019 12:35 pm
by Ritesh
Ritu21 wrote:
Fri May 24, 2019 6:26 am
Hi,

I was thinking, if I can use only Factory app and OTA_0 for firmware upgrade, since my esp 32 flash size is 4MB only and I need to include both spiffs and ota in my application. Currently my partition table is as below:

Name | Type | SubType | Offset | Size | Flags
nvs | data | nvs | 0x9000 | 16K |
otadata | data | ota | 0xd000 | 8K |
phy_init | data | phy | 0xf000 | 4K |
factory | app | factory | 0x10000 | 1M |
storage | data | spiffs | | 16K |
ota_0 | 0 | ota_0 | | 1200K |
ota_1 | 0 | ota_1 | | 1200K |


Using 16K for spiffs doesn't let me read the file I stored in spiffs.Increasing to 1Mb, solved the issue. Is there any size limitation for using spiff? Can I use only Factory app and OTA_0 for firmware upgrade? If yes, then how??

Waiting for your reply.

Thanks
Ritu.
Hi Ritu,

I believe there is no any limitation to use SPIFFS with 1 MB size partition. We have used less than 1 MB into 4 MB Flash Partition which works fine without any issue.

Please send debug logs for same and also IDF version which you are using.

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Sat May 25, 2019 12:43 pm
by Ritu21
Hi Ritesh,

This is my current partition table in which spiff size is 500Kb and I am able to read file with this size. Earlier the size was 16Kb, on which I was not able to run spiff.

# Name Type SubType Offset Size
nvs data nvs 0x9000 16K
otadata data ota 0xd000 8K
phy_init data phy 0xf000 4K
factory app factory 0x10000 1M
storage data spiffs 500K
ota_0 0 ota_0 1M
ota_1 0 ota_1 1M

For now I am able to write and read from spiff file.

Thank You
Ritu.

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Sat May 25, 2019 3:20 pm
by Ritesh
Ritu21 wrote:
Sat May 25, 2019 12:43 pm
Hi Ritesh,

This is my current partition table in which spiff size is 500Kb and I am able to read file with this size. Earlier the size was 16Kb, on which I was not able to run spiff.

# Name Type SubType Offset Size
nvs data nvs 0x9000 16K
otadata data ota 0xd000 8K
phy_init data phy 0xf000 4K
factory app factory 0x10000 1M
storage data spiffs 500K
ota_0 0 ota_0 1M
ota_1 0 ota_1 1M

For now I am able to write and read from spiff file.

Thank You
Ritu.
Hi Ritu,

Thanks for providing updates for same.

So, If with 500 KBytes SPIFFS is working fine then what is your low size requirements in which SPIFFS should be worked? There might be chances into SPIFFS with low size limitations in which it should be worked. That you need to confirm with ESP32 SDK developers.

Would you please confirm with WiFive regarding this limitation?

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Mon May 27, 2019 4:32 am
by Ritu21
Hi @WiFive,

Reference to the trailing query, is there any limitation of size to use spiffs in ESP-32??

Thanks.
Ritu

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Mon May 27, 2019 1:31 pm
by chegewara
I dont remember where, but there is few posts about spiffs size and block size correlation.

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Mon May 27, 2019 2:48 pm
by Ritesh
Hi WiFive ,

Please help to address out issue if you have any idea regarding that

Re: Firmware upgrade between Factory App and OTA_0 only

Posted: Thu May 30, 2019 5:56 am
by afanty2019
我这边用的Factory.bin有近2M 分区改为使用ota0 不要ota1 ,运行过程中会出现死机现象,堆栈溢出。