cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate maximum application size from .bin/.hex/.elf?

Harsh_Shakya
Visitor

Hello,
I am using a custom bootloader for firmware updates on an STM32F7 series MCU.
For my process, I need to check the maximum possible application size.
Could you please guide me on how I can calculate the application size from the generated .bin, .hex, or .elf files?
Also, how can I choose the slots to store the firmware.

Thanks in advance!

1 REPLY 1
Andrew Neil
Super User

Welcome to the forum.

Please see How to write your question to maximize your chances to find a solution for best results.

 


@Harsh_Shakya wrote:

For my process, I need to check the maximum possible application size.


What, exactly, do you mean by that?

The size is fixed when the project is built.

You haven't said what tools you're using, but any decent IDE will tell you the memory usage when it's built the project.

 

STM32CubeIDE gives a summary at the end of every build, and you can get further details using the Build Analyser:

https://community.st.com/t5/stm32-mcus-motor-control/how-to-optimize-code-and-reduce-firmware-size-in-stm32-project/m-p/814005#M12885

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.