cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

Anonymous
Not applicable

In WICED 5.2, in the file 43xxx_Wi-Fi/WICED/platform/MCU/wiced_dct_internal_common.c,

shouldn't lines 616 - 621 be inside the previous #if - #endif block?

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi,

Sorry for not giving the entire explanation earlier.

CRC is included in header(platform_dct_header_t) in SDK version prior to Wiced 3.6.3. After SDK 3.7.0, CRC is moved to version (platform_dct_version_t) section. So all the recent versions have CRC in version. Hence the macro DCT_BOOTLOADER_CRC_IS_IN_HEADER is not defined in the current version. Hence the variable curr_dct will always be declared. Consequently the other part of the code you are pointing will also work.

One more point, if we compare the function wiced_dct_finish_new_dct() in wiced_dct_internal_common.c and wiced_dct_external_common.c file, it appears that curr_dct should not be declared in the #if - #endif block. (I will discuss this internally and update you if we incorporate this change)

View solution in original post

5 Replies
Moderator
Moderator

I hope you are pointing to this piece of code:

    if (platform_write_flash_chunk(curr_dct + OFFSETOF(platform_dct_data_t, dct_version) + OFFSETOF(platform_dct_version_t, initial_write), &zero_byte, sizeof( zero_byte )) != 0)

    {

        return WICED_ERROR;

    }

It is not a bug.

0 Likes
Reply
Anonymous
Not applicable

Hello riya and thank you for your time!

My question is that in that particular function (wiced_dct_finish_new_dct) the variable curr_dct is only defined when the macro DCT_BOOTLOADER_CRC_IS_IN_HEADER is not defined.

Therefore, the code block you mentioned should be in the previous #if !defined(DCT_BOOTLOADER_CRC_IS_IN_HEADER) block (starts at line 609), since it uses that variable.

0 Likes
Reply
Moderator
Moderator

Hi,

Sorry for not giving the entire explanation earlier.

CRC is included in header(platform_dct_header_t) in SDK version prior to Wiced 3.6.3. After SDK 3.7.0, CRC is moved to version (platform_dct_version_t) section. So all the recent versions have CRC in version. Hence the macro DCT_BOOTLOADER_CRC_IS_IN_HEADER is not defined in the current version. Hence the variable curr_dct will always be declared. Consequently the other part of the code you are pointing will also work.

One more point, if we compare the function wiced_dct_finish_new_dct() in wiced_dct_internal_common.c and wiced_dct_external_common.c file, it appears that curr_dct should not be declared in the #if - #endif block. (I will discuss this internally and update you if we incorporate this change)

View solution in original post

Anonymous
Not applicable

Hello Riya and thank you,

This is very relevant to my situation, since we are upgrading our firmware from WICED version 3.5.2 (UPDATE_FROM_SDK=3_5_2) to the latest one!

0 Likes
Reply
Anonymous
Not applicable

I see that this is still an issue with version 6.1 of the SDK

0 Likes
Reply