【CYW43362 STM32F411】:Download application from Flash memory to RAM

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

cross mob
YoJa_3107936
Level 5
Level 5
Distributor - Macnica (Japan)
100 sign-ins 50 sign-ins First like given

STM32F411 has 128KB RAM and 512KB serial Flash, and we added EXT.2MB on the module.

We will download application from serial Flash to RAM when boot.

I think that the part data in serial Flash downloaded to RAM, is it right?
If right, could you tell me that what part of the data will be downloaded?

If the downloaded size is larger than RAM(128KB), how can we solve this problem?

Thanks

Y.Jiang

0 Likes
1 Solution

Unfortunately xip support is not available for ST MCUs in WICED SDK. It is only available for CYW43907. To add XIP support, you have rightly pointed out that you need to add a platform_xip.mk file in the corresponding platform folder. You also have to add the linker scripts in the GCC folder (43xxx_Wi-Fi/WICED/platform/MCU/STM32F4xx/GCC). You can also check the makefiles (wiced_apps.mk, wiced_config.mk, wiced_elf.mk, wiced_toolchain_ARM_GNU.mk)   for the way XIP is already implemented in SDK.

View solution in original post

17 Replies
YoJa_3107936
Level 5
Level 5
Distributor - Macnica (Japan)
100 sign-ins 50 sign-ins First like given

Add the question:

Could you tell me the Maximum Programing size?

Thanks

Y.Jiang

0 Likes

As you rightly pointed out that the SRAM for F411 is limited to 128K, but that is good enough for most of the applications supported in SDK (specified here 43xxx_Wi-Fi/WICED/platform/MCU/STM32F4xx/GCC/STM32F411/memory_ram.ld). But as you have added external flash memory, with safe coding practices, you can program almost all the snippets in this platform. You can check what goes into RAM by checking the .bss, .data section as specified in 43xxx_Wi-Fi/WICED/platform/MCU/STM32F4xx/GCC/app_with_bootloader.ld.  Based on your use case, you can do a worst case stack analysis and write the application code accordingly.

YoJa_3107936
Level 5
Level 5
Distributor - Macnica (Japan)
100 sign-ins 50 sign-ins First like given

Thank you for your reply.

As one question,

when downloading from Flash to RAM,

must we download the application to RAM once ?

Or, can it be possible to download the application to RAM several times?

Thanks

Y.Jiang

0 Likes

If you check the crto_gcc.c as located in 43xxx_Wi-Fi/WICED/platform/ARM_CM4/crt0_GCC.c, you will be able to find that it loads the necessary sections into the RAM during the startup process only. Currently, in the existing framework of SDK, it is not possible to download the application to RAM several times but that should not be an issue in most of the applications.

0 Likes
YoJa_3107936
Level 5
Level 5
Distributor - Macnica (Japan)
100 sign-ins 50 sign-ins First like given

If only 【CYW43362+STM32F411】, and no EXT.2MB Flash.

Could you tell me the Maximum Programing size?

Raktim Roy wrote:

464 KB

jiang-y_3107936

The wlan firmware will take more than 200KB.

In additional, if you want to support OTA, the available space for firmware is very small without external flash.

0 Likes
YoJa_3107936
Level 5
Level 5
Distributor - Macnica (Japan)
100 sign-ins 50 sign-ins First like given

Hi axel.lin, rroy

Thanks for your advice.

We added EXT.2MB Flash on the module board, I think that has enough space for supporting OTA.
But I afraid RAM space is not enough to support Application.

>The wlan firmware will take more than 200KB.
I think application space is 464KB - more than 200KB, is it correct?

Thanks

Y.Jiang

0 Likes

The OTA works fine for the BCM943362WCD4 platform. I just ran a test with WICED SDK 6.2.1 and I upgraded to scan application which worked just fine. Could you tell me which application you are planning to upgrade, where the RAM is becoming a constraint?

Sorry for interrupt.

(I'm colleague of Jiang)

In case that we use "CYW43362+STM32F411" with EXT.2MB Flash,

the customer would like to maximize executing memory area for their own application.

In order to do that, we need to use external flash as executing area, not RAM.

Q1: Is it possible to use external flash as executing area in this situation ?

Q2: If yes, could you tell me how to set it in WICED Studio.

       I think, we need to modify "platform" file ?

Thank you.

--TAK

0 Likes

Unfortunately xip support is not available for ST MCUs in WICED SDK. It is only available for CYW43907. To add XIP support, you have rightly pointed out that you need to add a platform_xip.mk file in the corresponding platform folder. You also have to add the linker scripts in the GCC folder (43xxx_Wi-Fi/WICED/platform/MCU/STM32F4xx/GCC). You can also check the makefiles (wiced_apps.mk, wiced_config.mk, wiced_elf.mk, wiced_toolchain_ARM_GNU.mk)   for the way XIP is already implemented in SDK.

I'm not sure what "XIP" is...

0 Likes

My bad! You want to execute from external sflash, which is also called as execute in place (XIP), basics about which you can find here.

0 Likes

OK, understood.

You mean,

-XIP can change memory boot area, such as from sflash.

-STM can not support XIP

-as a result, STM can not boot only from sflash.

Is that right?

Thank you

--TAK

0 Likes

Correct.. .WICED SDK does not have support for XIP in STM.

0 Likes

OK Understood,

Could you tell me the Maximum Programing size in CYW43362+STM32F411 with EXT.2MB Flash?

0 Likes

Maximum programming size remains the same without XIP (464 KB)

0 Likes