MBEDTLS occupies lot of memory space after an upgrade

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

cross mob
Anonymous
Not applicable

Hello

I have upgraded the SDK from 5.0 to 6.1 and It adds ~100k bytes of data in the micro-controller without explanation.

Can some one help me out to understand the usage of MBEDTLS as it occupies lot of space on my hardware ?

Can I reduce it ?

Module WICED 5.0 :

pastedImage_0.png

Module 6.1

pastedImage_3.png

0 Likes
1 Solution
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

jerome_2594171 wrote:

Hello

I have upgraded the SDK from 5.0 to 6.1 and It adds ~100k bytes of data in the micro-controller without explanation.

Can some one help me out to understand the usage of MBEDTLS as it occupies lot of space on my hardware ?

Can I reduce it ?

To reduce the code size, you can add some of below setting in your application make file if you don't use these features:

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_SSL_SERVER

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_DTLS

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_ENTERPRISE_SECURITY

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_ADVANCED_SECURITY_CURVES

However, compare to the BESL library in sdk-5.1 the mbedTLS is still very huge.

View solution in original post

0 Likes
11 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hi:

got some info from the sdk.

# Prevents inclusion of mbedtls_open library saving at least 110KB of memory

# (but disables TLS/DTLS support along with Enterprise WiFi Security)

GLOBAL_DEFINES     += WICED_DISABLE_TLS CONSOLE_DISABLE_ENTERPRISE_COMMANDS

zhez wrote:

Hi:

got some info from the sdk.

# Prevents inclusion of mbedtls_open library saving at least 110KB of memory

# (but disables TLS/DTLS support along with Enterprise WiFi Security)

GLOBAL_DEFINES     += WICED_DISABLE_TLS CONSOLE_DISABLE_ENTERPRISE_COMMANDS

That does not help!

CONSOLE_DISABLE_ENTERPRISE_COMMANDS is only meaningful for apps/test/console.

And you should not set WICED_DISABLE_TLS at all if you want to build with mbedTLS.

0 Likes
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

jerome_2594171 wrote:

Hello

I have upgraded the SDK from 5.0 to 6.1 and It adds ~100k bytes of data in the micro-controller without explanation.

Can some one help me out to understand the usage of MBEDTLS as it occupies lot of space on my hardware ?

Can I reduce it ?

To reduce the code size, you can add some of below setting in your application make file if you don't use these features:

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_SSL_SERVER

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_DTLS

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_ENTERPRISE_SECURITY

GLOBAL_DEFINES += WICED_CONFIG_DISABLE_ADVANCED_SECURITY_CURVES

However, compare to the BESL library in sdk-5.1 the mbedTLS is still very huge.

0 Likes
Anonymous
Not applicable

Thank you for your answers.

I reduce the code size a little but it is not sufficient.

I will try to find an other mean to reduce it.

0 Likes

hi :

just have a look for mbedTLS info in the changelog:

This update is from wiced 5.2 .

* [all WiFi] Migrated BESL to use mbedTLS cipher suites and cryptographic algorithms. BESL inherits the advantages of mbedTLS such as fully features TLS extensions and standards compliant SSL library offering. The BESL API remains unchanged resulting in seamless integration with existing TCP/IP and UDP based protocols. The mbedTLS library has been integrated underneath the BESL interface. 

0 Likes

The point is after upgrade to new sdk, the firmware image size growth too much.

(It's nothing to do with the BESL interface)

0 Likes
Anonymous
Not applicable

I think I have a new problem :

I can't perform an OTA (new file size is too large).

Can you help me or not (do I need to open a new post )?

0 Likes
Anonymous
Not applicable

Can I reduce flash size of BTE_low_energy with another #GLOBAL_DEFINE ?

Or an other Module in FLASH ?

0 Likes

AFAICT, it's not easy to save ~100KB.

0 Likes
Anonymous
Not applicable

ok,

I have a last question : when I build my program I have two files (with similar size) as output ".bin" and ".stripped.elf"

but

with WICED V5.2 (and next version) this two same files have a completely different size.

for example :

WICED 5.1

prog.bin = 390ko

prog.stripped.elf = 400ko

with WICED 5.2

prog.bin = 130 000 ko

prog.stripped.elf = 400ko

Is it normal ?

0 Likes

You should compare prog.elf v.s. prog.stripped.elf.

0 Likes