STM32 Cubeide Code Generator uses More Program Memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-25 4:37 AM
Hello Team,
We have been using the STM8 series for the low level Application projects. Due to Obsolete of the STM8, we have been moved to STM32C0 chips. But we are facing a problem with the program memory which the code generator occupies more space only for the Simple ADC, GPIO, Timer Initializations. We used 8KB chips in STM8 series for the same application. Now we changed to STM32C011F4P6 chip 16KB chip. This STM32 Cube IDE code generator itself takes the 75% of the memory for simple Initialization. Please help me out of this problem and provide a solution to it.
Kind Regards,
Nishanth M
Solved! Go to Solution.
- Labels:
-
STM32C0 Series
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-25 4:42 AM
What optimisation level are you using?
Try at least 'Optimise for Debug'
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
‎2024-09-25 4:42 AM
What optimisation level are you using?
Try at least 'Optimise for Debug'
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
‎2024-09-25 4:46 AM
HAL is not designed with small memory footprints in mind. The most you can do is increase your optimization settings for size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-25 7:43 AM
Hi,
Thanks for the support... :)
What are difference between the Optimization levels for the -O0, -Og, -O1, -O2, -O3, -Os, -Ofast. What is the pros and cons of these optimization levels. Is this will affect the any other part of the code. When are these levels used?
Kind Regards,
Nishanth M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-25 7:52 AM
See the GCC documentation:
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Another thing you can do is use the code generator to get you started and then, if you need to, go through the code manually to see what can be pruned out ...
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
‎2024-09-25 10:03 AM
A recent thread on the same subject:
A complex system designed from scratch never works and cannot be patched up to make it work.
