The DCT does include information about location of different applications in external flash. These include external firmware and the FR_APP and other binaries located in the external flash. To understand more have a look at the WICED/platform/included/platform.h. , mainly the apps_location entry in the dct header structure. When building your system and setting the what files goes to the external flash, those entries get filled with correct values by the build system.
So when looking at your DCT make sure that those parts are not changed between your temporary and unique DCT (as long as you didn't write in to any of those external files).
Is there any reason those entries could be different between your two versions of DCT?
I had overlooked that. The dct header portion of my unique DCT is missing some information. It only correctly contains the following:
unsigned long magic_number;
The fields full_size, used_size, boot_detail, and apps_locations are all empty, so that is surely the issue.
I'm using 3.1.2 and couldn't find a way to generate unique DCT's so I used the "patch" found at the bottom of Re: factory_reset_dct not working . The wiced_factory_reset.mk is modified from the version found in 2.4, so it must not be filling in the fields properly.
I can see now that wiced_dct_restore_factory_reset() copies my unique DCT from the external flash but maintains correctness in the dct_header, and that is how I was able to get it to work.
So I guess my questions now are, how can I modify my wiced_factory_reset make file to include this information in the unique generated DCT? Where in the make system is the correct app DCT being generated? Is the apps location info stored in the config.mk file?
Ok I understand a little better now. The dct_header fields are populated in the way they are because of my app's factory_reset_dct.c file. I used demo/temp_control/factory_reset_dct.c as a template for mine, so it currently looks like this:
/* DCT Header Section */
.platform.dct_header.write_incomplete = 0,
.platform.dct_header.is_current_dct = 1,
.platform.dct_header.app_valid = 1,
.platform.dct_header.mfg_info_programmed = 1,
.platform.dct_header.magic_number = BOOTLOADER_MAGIC_NUMBER,
.platform.dct_header.load_app_func = NULL,
The fields full_size, used_size, boot_detail, and apps_locations are not explicitly specified so they're being set to NULL.
I was able to achieve my goal by copying the dct_header.apps_locations part of WICED/internal/dct.c into my app's factory_reset_dct.c. The unique DCTs now appear to be correctly recognizing the filesystem.