STM32CubeMx size of generated code problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-12-21 5: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-size- Labels:
-
STM32CubeMX
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-22 7:23 AM
Hello Andrew
Thanks for your answer
I does't use floating point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-22 7: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-22 7:26 AM
Hello Bogdan,
Thanks for your suggestion
I will go in this way
Kinds regards
Serge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-22 7:28 AM
Thanks Syzmon,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-22 8: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 ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-22 9: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.
Up vote any posts that you find helpful, it shows what's working..

- « Previous
- Next »