[K32W041] SDK2.6.16 library size is large and creates larger executable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[K32W041] SDK2.6.16 library size is large and creates larger executable

Jump to solution
1,578 Views
ckielstra
Contributor III

For the processor K32W041 we are upgrading the SDK to the latest v2.6.16 and we noticed that the resulting binary has become larger, from 68kb to 74kb. 

We noticed several library files to have grown in size:

SDK_2_6_16_K32W041\middleware\wireless\framework\XCVR\lib\libRadio.a 50kb -> 379kb
SDK_2_6_16_K32W041\middleware\wireless\ieee-802.15.4\lib\libMiniMac.a 116kb -> 630kb

These larger file sizes were introduced with SDK 2.6.14

When we copy these two library files back from an older SDK (before 2.6.14), then our deployed binary image is the smaller size again.

In the compiler settings we have the options set for:

- Link time optimization, optimize for size (-flto -Os), both in compiler and linker
- Omit all symbol information (-s)
- Not startup of default libs (-nostdlib)

Is there another compiler/linker option we should set? Or, can the SDK be released with the smaller library files again?

0 Kudos
Reply
1 Solution
1,001 Views
ckielstra
Contributor III

After consultation with an NXP engineer we learned the library files are larger because of debug info being present. This doesn't affect the size of the compiled binary.

In a new test we learned that the resulting binary files are almost equal for SDK v2.6.13 and v2.6.14. The earlier found size difference could not be repeated. Most likely the file size difference was caused by not performing a clean build.

View solution in original post

0 Kudos
Reply
5 Replies
1,002 Views
ckielstra
Contributor III

After consultation with an NXP engineer we learned the library files are larger because of debug info being present. This doesn't affect the size of the compiled binary.

In a new test we learned that the resulting binary files are almost equal for SDK v2.6.13 and v2.6.14. The earlier found size difference could not be repeated. Most likely the file size difference was caused by not performing a clean build.

0 Kudos
Reply
1,534 Views
sofiaurueta
NXP Employee
NXP Employee

Hello,

 

Hope you are doing well.

 

Most of the compiler optimization flags for size are already enabled by using the -Os option.

 

The changes introduced in the different SDK versions are mainly due to bug fixes and upgrades. If you would like to know more about the specific changes applied in each version, you can refer to the corresponding Release Notes included in the SDK files under this path: SDK\docs\Release Notes

 

Due to this, it is recommended to use components consistently from the same SDK version rather than combining elements from different releases, as this may lead to compatibility issues.

 

Best Regards,

Ana Sofia.

0 Kudos
Reply
1,511 Views
ckielstra
Contributor III

Hello @sofiaurueta ,
Thanks for your reply.

We studied the release notes documents and we see no reason why the mentioned library files should be six times larger in size.

 

Where can we request to have a ticket created for reverting the file sizes to the smaller sizes again?

0 Kudos
Reply
1,462 Views
sofiaurueta
NXP Employee
NXP Employee

Hello,

 

I apologize but the changes implemented in the SDK are part of regular maintenance and fixes, which is why it is recommended to use the current SDK version.

 

Regards,

Ana Sofia.

0 Kudos
Reply
1,438 Views
ckielstra
Contributor III

Hello @sofiaurueta,

I appreciate you taking the time to reply, but I'm not getting any benefit from this. The size of the two library files has increased by a factor of six; this is not the kind of drastic increase that would result from routine maintenance. Our product is impacted by the increased size. Could you forward a request to restore the previous sizes in the next SDK version?

0 Kudos
Reply