OTA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BiM_4640481
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Hi,

I am working on Murata 1LD board in Wiced_Studio. It has an on board external flash of 2MB. OTA update is implemented and the downloaded stripped.elf file is nearly 2MB. I came across 3 partitions in external flash DCT_APP0_INDEX, DCT_APP1_INDEX  and DCT_APP2_INDEX 

Can you tell me the size of each partition?

My new requirement is to download first OTA to DCT_APP0_INDEX. When next OTA happens it should be downloaded in DCT_APP1_INDEX  and so on. Can you give me a clue on how to proceed?

Thanks,

Binsy M S


 

0 Likes
1 Solution

Hi Binsy,

The sizes of each partitions are defined as below in the path 43xxx_Wi-Fi/WICED/internal/dct.c 

    .dct_header.apps_locations[ DCT_APP0_INDEX ].detail.external_fixed.location      = SFLASH_APPS_HEADER_LOC + sizeof(app_header_t) * DCT_APP0_INDEX,

    .dct_header.apps_locations[ DCT_APP1_INDEX ].detail.external_fixed.location      = SFLASH_APPS_HEADER_LOC + sizeof(app_header_t) * DCT_APP1_INDEX,

    .dct_header.apps_locations[ DCT_APP2_INDEX ].detail.external_fixed.location      = SFLASH_APPS_HEADER_LOC + sizeof(app_header_t) * DCT_APP2_INDEX,

In the 43xxx_Wi-Fi/tools/makefiles/wiced_config.mk file, SFLASH_APPS_HEADER_LOC=$(APPS_LUT_HEADER_LOC) is defined and by default for CYW43438 platform, APPS_LUT_HEADER_LOC is defined as APPS_LUT_HEADER_LOC := 0x0000.

Also, for your new requirement, if you want to download next OTA to DCT_APP1_INDEX and so on, in the 43xxx_Wi-Fi/libraries/daemons/ota_server/wiced_ota_server.c file, please change DCT_APP0_INDEX to DCT_APP1_INDEX in wiced_framework_app_open() & wiced_framework_set_boot() functions and similarly for DCT_APP2_INDEX,  do the change DCT_APP1_INDEX to DCT_APP2_INDEX in those functions.

Thanks.

View solution in original post

5 Replies
KotnaniK_71
Employee
Employee
50 likes received 25 likes received 10 likes received

Hi Binsy,

Can you please let us know the WICED version and the OS network combination which you're using.

Thanks.

0 Likes

Hi,

WICED version : 6.4

OS: ThreadX

Thanks,

Binsy M S

0 Likes

Please provide some information on this thread.

Thanks,

Binsy M S

0 Likes

Hi Binsy,

The sizes of each partitions are defined as below in the path 43xxx_Wi-Fi/WICED/internal/dct.c 

    .dct_header.apps_locations[ DCT_APP0_INDEX ].detail.external_fixed.location      = SFLASH_APPS_HEADER_LOC + sizeof(app_header_t) * DCT_APP0_INDEX,

    .dct_header.apps_locations[ DCT_APP1_INDEX ].detail.external_fixed.location      = SFLASH_APPS_HEADER_LOC + sizeof(app_header_t) * DCT_APP1_INDEX,

    .dct_header.apps_locations[ DCT_APP2_INDEX ].detail.external_fixed.location      = SFLASH_APPS_HEADER_LOC + sizeof(app_header_t) * DCT_APP2_INDEX,

In the 43xxx_Wi-Fi/tools/makefiles/wiced_config.mk file, SFLASH_APPS_HEADER_LOC=$(APPS_LUT_HEADER_LOC) is defined and by default for CYW43438 platform, APPS_LUT_HEADER_LOC is defined as APPS_LUT_HEADER_LOC := 0x0000.

Also, for your new requirement, if you want to download next OTA to DCT_APP1_INDEX and so on, in the 43xxx_Wi-Fi/libraries/daemons/ota_server/wiced_ota_server.c file, please change DCT_APP0_INDEX to DCT_APP1_INDEX in wiced_framework_app_open() & wiced_framework_set_boot() functions and similarly for DCT_APP2_INDEX,  do the change DCT_APP1_INDEX to DCT_APP2_INDEX in those functions.

Thanks.

Hello Kotnanik,

Thanks for your reply.

Is there any API's to read from which partition is current program loaded to RAM?

Editing in between OTA is not possible in our requirement. So based on current partition information , for next OTA the application can be placed in next app location.

Thanks,

Binsy M S

0 Likes