6 years, 6 months ago.  This question has been closed. Reason: Too broad - no single answer

Larger Code Size When using updated Mbed Lib on STM32L031K6

Dear All,

I recently found that the complied program for my STM32L031K6 MCU became much larger (31.6KB) when using Mbed library revision 166, compared with that (29.0 KB) when using Mbed library revision 157.

Because the FLASH size for STEM32L031K6 is 32KB, such difference is significant and perhaps unacceptable.

May I know why would this happen and is it possible to solve it because I prefer up to date library.

Best regards,

After some digging. It looks like such issue really depends on the code.

I have two separated projects and both of them are using the STM32L031K6.

However, one of the project will have larger code size when switch to the updated mbed-lib and the other one is in contrast.

So I would like to close this question.

Thanks

posted by Tony YI 22 May 2018

I make a mistake. I think the question still valid.

posted by Tony YI 22 May 2018

I have try all the mbed-2 that support STM32L031K6 and the results are as follows:

Revision Code Size 152 26.9 KB 153 26.9 KB 154 26.9 KB 155 broken revison 156 26.9 KB 157 26.9 KB 155 26.9 KB 159 26.9 KB* 160 28.1 KB* 161 28.4 KB* 162 28.8 KB* 163 28.8 KB 164 28.8 KB* 165 29.6 KB* 166 29.6 KB

I try to access to the release notes but failed. Appreciate if anyone can let me know how to identify what have been changed between different revisions.

Currently, I could not identify the solution, so I will stick to the revision 159 which is released by mbed-official.

posted by Tony YI 22 May 2018

In general, the code size is increasing when using updated revision. However, the size increased is program-dependent.

My newest program is 0.5KB larger when using the most updated revision (revision 166).

I would like to close this question.

posted by Tony YI 27 May 2018