Remove dependency of DCT and Bootloader

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

cross mob
ErSt_4460741
Level 3
Level 3
First like received First like given

Dear Cypress support,

I am running WICED on a custom platform board and I noticed that the WICED application is dependent on a DCT.

In our project we don't want to use the WICED bootloader and also not the DCT. We have our own bootloader and our own standard mechanism of updating applications. We have our own linker scripts and WICED is already customized so it uses our own style of linking.


Currently we have our own bootloader, the wiced bootloader and the wiced application. I noticed that the wiced application creates a default DCT at 0x0800C000, equal to region FLASH_DCT1. Our memory map looks like this

MEMORY {

FLASH_DEVICE (rx) : o = 0x08000000 /* FLASH_ORIGIN */ , l = 1m /* FLASH_SIZE size of flash of device */

FLASH_BL (rx) : o = 0x08000000 /* FLASH_ORIGIN */ , l = 32K /* boot loader size, normal build */

FLASH_DCT1 (rx) : o = 0x08000000 + 32K /* FLASH_ORIGIN + OFFSET_BL */ , l = 16K /* DCT1 size */

FLASH_DCT2 (rx) : o = 0x08000000 + 32K + 16K /* FLASH_ORIGIN + OFFSET_BL + OFFSET_DCT1 */ , l = 16K /* DCT2 size */

FLASH_BL_WICED (rx) : o = 0x08000000 + 32K + 16K + 16K /* FLASH_ORIGIN + OFFSET_BL + OFFSET_DCTS1+2 */ , l = 16K /* WICED bootloader size, normal build */

FLASH_APL (rx) : o = 0x08000000 + 128K /* FLASH_ORIGIN + OFFSET_FW */ , l = 1m - 128K - 0 /* FLASH_SIZE - OFFSET_FW - NVM, normal build */

RAM_DEVICE (rwx) : o = 0x20000000 /* RAM_ORIGIN */ , l = 256K /* RAM_SIZE */

RAM_BL (rwx) : o = 0x20000000 + 256 /* RAM_ORIGIN + MAX_NO_INIT_FW*/ , l = 256K - 256 /* RAM_SIZE - MAX_NO_INIT_FW */

RAM_BL_WICED (rwx) : o = 0x20000000 /* RAM_ORIGIN */ , l = 256K /* 256 bytes reserved for no_init */

RAM_APL (rwx) : o = 0x20000000 /* RAM_ORIGIN */ , l = 256K /* 256 bytes reserved for no_init */

}

We don't use the DCT anywhere in our application.

My questions:

  • Is there a compile flag or define for our platform so a DCT is NOT build
  • Is there a compile flag to not build the bootloader?
  • How can we remove the dependency of the WICED bootloader
  • How can we remove the dependency of the DCT
    • If not possible, can you show how to put a DCT inside the wiced application. Perhaps statically allocated so at least the application starts?

Is it really necessary for our application to reserve 32K (two times 16K) of memory for around 405 bytes?

(sizeof(platform_dct_header_t) +  sizeof(platform_dct_version_t) + sizeof( zero_byte ))

0 Likes
1 Solution

I understand that your application is big. But unfortunately, there is no direct work around to remove the entire dependency on the DCT during the build procedure and the available option(under apps/wwd) which has a lesser memory footprint doesn't work readily out of the box with the chip under consideration and needs some modifications to be made to the SDK for the build to go through.

Please contact local sales with your query and they should be able to help you out.

For instructions on how to have a single binary image for download, please go through : WICED application framework and manufacturing image in CYW943907AEVAL1F

View solution in original post

0 Likes
12 Replies
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Could you specify what custom platform board are you using? Does your application involve WIFI association?

Thanks

0 Likes

A custom platform board is made with the following options:

  • wiced sdk 6.4
  • There is an external 25MHz crystal HSE_VALUE=25000000
  • There is an external 32.768kHz crystal on the STM32, and also one on the LPO_IN of the 1DX.
  • The PCB lay-out of the WiFi part is 100% Murata's recommendation

This involves also WiFi indeed.
It is the same platform as mentioned in this thread: SDIO communication with 4343W

0 Likes

Is there already who can help me further?

0 Likes
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hi ErSt_4460741

1. To not build the BOOTLOADER, you can add the lines

NO_BUILD_BOOTLOADER:=1

NO_BOOTLOADER_REQUIRED:=1

2. Adding no_dct in the makestring doesn't download the dct when you do a download run in the make file and the dct remains unmodified.

3. By removing dependency of the bootloader, do you imply that you don't not want to use waf/bootloader and want to have a custom bootloader?

4. As far as i am aware, the dct cannot be totally excluded as there are some device critical information which would be stored there. Regarding the size that the DCT occupies, i am not exactly sure if its possible to vary the size on the 4343. I will dig into this more internally and will get back to you ASAP.

Thanks

0 Likes

1. Thank you for the compile flags to not build the bootloader.

2. Great.

3. Correct. We have our own custom bootloader and want to be able to write replace the WICED application in one go.

4. If the DCT is absolutely needed, is it possible to have it included in the application? Some kind of 'standard DCT' where the WICED application could find its information. I know that WICED creates a default DCT if it cannot find one. And as our own application does not rely on the DCT, perhaps this 'default DCT' can be in RAM on every start-up?

0 Likes

Is there someone who can answer my remarks 3 and 4 of my previous post?

0 Likes

Hi ErSt_4460741

3. If you want to have a custom bootloader, you can point the BOOTLOADER_TARGET in standard_platform_targets.mk at /43xxx_Wi-Fi/tools/makefiles/ to your bootloader and it should build instead of the default waf.bootloader. But please note, having a custom bootloader hasn't been tested by us and you would need to do it.

4. The dependency of the BUILD process on the DCT can't be totally removed. But adding the no_dct in the make target stops the DCT from getting downloaded. If I understand correctly, you want to include some of the components say the data which goes into DCT_WIFI_CONFIG_SECTION in your application itself? Do correct me if i am missing something.

Is it really necessary for our application to reserve 32K (two times 16K) of memory for around 405 bytes?

--> Again, this need not be 32K and can be reduced to 16K as a whole for the DCT if there is no application DCT required by changing the origin and the length of the DCT areas.

0 Likes

Thank for the reply.

You are correct. We want to configure everything in our own application.

The goal is that we don't have a DCT in FLASH memory.

I used the following flags in my build now.

NO_BUILD_BOOTLOADER:=1

NO_BOOTLOADER_REQUIRED:=1

Then I build my target with no_dct in the Make Targets view in eclipse.

However, when I run the WICED application, I get an assert at line 1000 of wiced_dct_internal_common.c:

_both_dcts_invalid:

    wiced_assert("BOTH DCTs ARE INVALID!", 0 != 0);

Why do I get this error? This should not happen, please solve this.

0 Likes

Having everything in the DCT moved to the application hasn't been tried out as far as I'm aware and would need sometime to figure out as there are plenty of information which goes into it including some critical info like the device boot details. Everything would need to be done using driver level API's as demonstrated in the apps under apps/wwd. For example you could start off by trying to move the WIFI_CONFIG data into the application as mentioned in apps/wwd/ping.

Also, is it possible to let me know as to why you are planning to move the entire DCT into the application? If the entire DCT is moved, it should ultimately take up the same space as it did with having a separate DCT in the flash.

Regarding the Assert that is being hit, this is the direct consequence of dct version being unknown. Please go through section 2.1 of /43xxx_Wi-Fi/doc/WICED-DCT.pdf and this would provide some insights on why this may have been hit.

0 Likes

Our main goal is to cancel the need for the DCT at all. Because our application does not need the DCT. It only takes unnecessary space and it leaves gaps in the flash.

Therefore is our wish to provide an option to cancel the dependency of DCT within the WICED system code.

Our application can be "big", so we need every byte available.

We have our own bootloader and want to update the application with just 1 binary (FLASH_APL region). So without any gaps within flash.

We want to have the following memory lay-out:

MEMORY { 

FLASH_DEVICE (rx)    : o = 0x08000000          , l = 1m /* FLASH_SIZE size of flash of device */ 

FLASH_BL (rx)        : o = 0x08000000          , l = 32K /* boot loader size, normal build */ 

FLASH_APL (rx)       : o = 0x08000000 + 32K    , l = 1m - 32K /* FLASH_SIZE - OFFSET_FW  */ 

 

RAM_DEVICE (rwx)     : o = 0x20000000          , l = 256K /* RAM_SIZE */ 

RAM_BL (rwx)         : o = 0x20000000 + 256    , l = 256K - 256 /* RAM_SIZE - MAX_NO_INIT_FW */ 

RAM_APL (rwx)        : o = 0x20000000          , l = 256K /* 256 bytes reserved for no_init */ 

Can you make sure we can use this memory lay-out with WICED.

0 Likes

Anyone that can answer on my reaction?

0 Likes

I understand that your application is big. But unfortunately, there is no direct work around to remove the entire dependency on the DCT during the build procedure and the available option(under apps/wwd) which has a lesser memory footprint doesn't work readily out of the box with the chip under consideration and needs some modifications to be made to the SDK for the build to go through.

Please contact local sales with your query and they should be able to help you out.

For instructions on how to have a single binary image for download, please go through : WICED application framework and manufacturing image in CYW943907AEVAL1F

0 Likes