-->
Page 4 of 6

Re: OTA firmware updates

PostPosted: Tue Nov 21, 2017 1:04 am
by davydnorris
I think the location of the file system is set in the code somewhere as a define - you may need to change that setting when you build user2.

Re: OTA firmware updates

PostPosted: Tue Nov 21, 2017 4:59 pm
by Avoncliff
I was looking at that, but it looks to me as if that option is not used and the web pages are linked as a library. Which should work OK for user1 and user2. But when I tried to see if it was working I got some odd results including what looked like the running code aways being at the same address even when it had been started by the boot up at different addresses. Am I looking at the wrong things?

Re: OTA firmware updates

PostPosted: Wed Nov 22, 2017 7:30 pm
by davydnorris
Check the following code in user_main.c:
Code: Select all#ifdef ESPFS_POS
CgiUploadFlashDef uploadParams={
   .type=CGIFLASH_TYPE_ESPFS,
   .fw1Pos=ESPFS_POS,
   .fw2Pos=0,
   .fwSize=ESPFS_SIZE,
};
#define INCLUDE_FLASH_FNS
#endif
#ifdef OTA_FLASH_SIZE_K
CgiUploadFlashDef uploadParams={
   .type=CGIFLASH_TYPE_FW,
   .fw1Pos=0x1000,
   .fw2Pos=((OTA_FLASH_SIZE_K*1024)/2)+0x1000,
   .fwSize=((OTA_FLASH_SIZE_K*1024)/2)-0x1000,
   .tagName=OTA_TAGNAME
};
#define INCLUDE_FLASH_FNS
#endif


Re: OTA firmware updates

PostPosted: Sat Nov 25, 2017 4:48 pm
by Avoncliff
Thanks for pointing to that code, sorry for slow reply I only get to this project occasionally.
It does look wrong, 4096(1024+1024) is loading user2 at 0x101000 not 0x201000 as calculated.
But so far changing it has not helped.
The debug printout on the serial port says
size = 96mem addr = 1073682136, size = 96DataLen=1024

but that does not relate to any address I expect.
I will look further, but if anyone has this working .......