DFU through USB

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

cross mob
KOK_4840576
Level 2
Level 2
First solution authored 10 questions asked 5 replies posted

I am using a Murata's 1LD(CYW43438 combo chipset + STM32F412 MCU) development board.  I am using WICED studio's IDE and built system for development and building. I am using ST micro's DfuSe (USB Device Firmware Upgrade host application) for programming, which is expecting a .DFU file to upload.  There is another application provided by ST micro (DfuFileMgr) which takes S19, BIN and HEX files as input and output DFU file. Multiple bin files can be used to create a single DFU file. The WICED built system has generated multiple bin files (Bootloader, 2 DCT,  Filesystem, APP LUT and sflash_write). I am not sure of the files and flash address for each of the files that has to be given as input to the DfuFileMgr for making a single DFU file. Request your help on the same. 

Bin file list 

1. 43xxx_Wi-Fi\build\waf.bootloader-NoOS-MurataType1LD\binary\waf.bootloader-NoOS-MurataType1LD.bin

2. 43xxx_Wi-Fi\build\waf.bootloader-NoOS-MurataType1LD\DCT.bin

3. 43xxx_Wi-Fi\build\snip.scan-MurataType1LD\binary\snip.scan-MurataType1LD.bin

4. 43xxx_Wi-Fi\build\snip.scan-MurataType1LD\APPS.bin

5. 43xxx_Wi-Fi\build\snip.scan-MurataType1LD\DCT.bin

6. 43xxx_Wi-Fi\build\waf.sflash_write-NoOS-MurataType1LD-SDIO\binary\waf.sflash_write-NoOS-MurataType1LD-SDIO.bin

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

You can go to the .map file or csv file to check the flash address of WLAN firmware and clm_blob. First, if we consider 4343W as an example, we can build a snip.scan application with internal flash download enabled. The 4343W bin file in C array form is defined as shown in /43xxx_Wi-Fi/build/snip.scan-BCM94343WWCD2/resources/4343WA1_bin.c:

const resource_hnd_t resources_firmware_DIR_4343W_DIR_4343WA1_bin = { RESOURCE_IN_MEMORY, 421899, {.mem = { (const char *) resources_firmware_DIR_4343W_DIR_4343WA1_bin_data }}}; where resources_firmware_DIR_4343W_DIR_4343WA1_bin_data contains the 4343WA1.bin file data.

The flash address for resources_firmware_DIR_4343W_DIR_4343WA1_bin_data can be found in /43xxx_Wi-Fi/build/snip.scan-BCM94343WWCD2/binary/snip.scan-BCM94343WWCD2_map.csv. Similarly, the flash address for clm_blob can be found from /43xxx_Wi-Fi/build/snip.scan-BCM94343WWCD2/resources/4343WA1_clm_blob.c.

View solution in original post

0 Likes
4 Replies
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

I will check the relevant addresses and let you know. This should be available in the .map file.

Thanks! 

I could find some memory configurations in the DCT.map file generated under build folder, which are as follows,

Memory Configuration

Name                           Origin                  Length          Attributes
DCT1_FLASH       0x08004000      0x00004000           xr
DCT2_FLASH       0x08008000      0x00004000           xr
APP_FLASH          0x0800c000      0x000f4000            xr
SRAM                       0x20000000     0x00040000           xrw

1. Could you also share some thoughts/documents on the purpose of each of the bins(Bootloader, 2 DCT,  Filesystem, APP LUT and sflash_write) that are generated by WICED built system?   

2. It seems like the DfuSe utility does not support flashing external memory, so would like to program everything(including Wi-Fi firmware) as part of the internal flash. How do I do that?  In that case would I still be requiring APP LUT , filesystem and sflash_write binaries?  At what address does the Wi-Fi firmware sit in internal flash?

0 Likes
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

1. Bootloader is used for loading application program from flash to target memory in CPU. Regarding 2 DCT, kindly check this thread https://community.cypress.com/t5/WICED-Studio-Wi-Fi-Combo/The-purpose-of-having-two-DCT-tables-DCT1-.... Regarding filesystem.bin, it has been explained in this thread https://community.cypress.com/t5/WICED-Studio-Wi-Fi-Combo/About-quot-filesystem-bin-quot/m-p/29212#M.... APPS LUT is essentially a look-up table containing the flash addresses of various apps indices as shown in /43xxx_Wi-Fi/WICED/platform/MCU/wiced_apps_lut.c. The waf.sflash_write is an application used by OpenOCD and WICED build system to write to serial flash during the programming process. More details have been provided in the description comment in the beginning of waf.sflash_write.c.

2. You can go to /43xxx_Wi-Fi/platforms/<platform>/<platform>.mk and assign RESOURCES_LOCATION ?= RESOURCES_IN_DIRECT_RESOURCES. This will allow the resources to be loaded into internal flash. For internal flash, you will not require APP LUT, filesystem.bin and sflash_write binaries. Regarding the internal flash address for WLAN firmware, i will check and let you know.

GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

You can go to the .map file or csv file to check the flash address of WLAN firmware and clm_blob. First, if we consider 4343W as an example, we can build a snip.scan application with internal flash download enabled. The 4343W bin file in C array form is defined as shown in /43xxx_Wi-Fi/build/snip.scan-BCM94343WWCD2/resources/4343WA1_bin.c:

const resource_hnd_t resources_firmware_DIR_4343W_DIR_4343WA1_bin = { RESOURCE_IN_MEMORY, 421899, {.mem = { (const char *) resources_firmware_DIR_4343W_DIR_4343WA1_bin_data }}}; where resources_firmware_DIR_4343W_DIR_4343WA1_bin_data contains the 4343WA1.bin file data.

The flash address for resources_firmware_DIR_4343W_DIR_4343WA1_bin_data can be found in /43xxx_Wi-Fi/build/snip.scan-BCM94343WWCD2/binary/snip.scan-BCM94343WWCD2_map.csv. Similarly, the flash address for clm_blob can be found from /43xxx_Wi-Fi/build/snip.scan-BCM94343WWCD2/resources/4343WA1_clm_blob.c.

0 Likes