2017-12-21 05:44 AM
I am wroking on a project using two microcontrollers a STM32F412 and a STM32L011 (8K flash, 2k RAM) .The STM32L011 is used as RTC to manage the power comsumption of the STM32F412.
I used STM32CubeMx to generate the code to set the peripherics that I use within the L011 (I2C, RTC, RCC). The problem is the size of the generated code once compiled is bigger than the 8k available inside the flash of the L011.
I only compile the genretaded code without writting a line of code.!
How could be possible to get a bigger code than the place to stored it for a defined STM32?
I think I did something wrong but I can find what is wrong.
Someone could provide me any ideas to resolve this situation. (i can not change the micro)
You will find in attachment the .ioc file. The genrated code from STM32Cube Mx is trasnfered on a Eclipse platform
and is used GNU ARM tools.
.Thanks in advance for your help
Best regards
Serge LOPEZ
#stm32cubemx #stm32l0xx #program-size2018-01-22 07:23 AM
Hello Andrew
Thanks for your answer
I does't use floating point
2018-01-22 07:25 AM
Hello Rosiney,
I found this panel. I modified the value but not change.
I tried to modify the optimisation option of the compiler. I removed optimization about digned char. the code size has been reduced . It 's a start point.
Thanks for your help
kind regards
Serge
2018-01-22 07:26 AM
Hello Bogdan,
Thanks for your suggestion
I will go in this way
Kinds regards
Serge
2018-01-22 07:28 AM
Thanks Syzmon,
2018-01-22 08:59 AM
Even if you don't use it in your own code, note my parenthesis:
(and beware that Cube/HAL isn't sneaking it in through the back door)
a certain other manufacturer's equivalent of the ST HAL has been found guilty of doing this ...
2018-01-22 09:27 AM
Or that code isn't pulling in the floating point and assorted math library code on the Cortex-M0 side.
The consequence of using the CM0 is that your code will bulk up to carry the silicon you are saving in the core.