Hello people!
I developed an application based on ESP-IDF v4.0 and I have the following question:
Is it possible to remove support for features like modbus, for example, to decrease the application's binary size?
How to do this?
Thank you in advance!
How to reduce the size of the generated binary? Is it possible to disable unused components?
How to reduce the size of the generated binary? Is it possible to disable unused components?
Atenciosamente / Best Regards,
Gustavo Costa
P&D - Projetista de Sistemas Embarcados
R&D - Embedded Systems Designer
M: +55 51 984 503 841
L: https://www.linkedin.com/in/gpcosta/
E: costaembedded@gmail.com
Gustavo Costa
P&D - Projetista de Sistemas Embarcados
R&D - Embedded Systems Designer
M: +55 51 984 503 841
L: https://www.linkedin.com/in/gpcosta/
E: costaembedded@gmail.com
Re: How to reduce the size of the generated binary? Is it possible to disable unused components?
Hi Gustavo,
First I would suggest to analyze what actually gets included into the application, by running 'idf.py size-components' (or 'make size-components', if you are using GNU Make). This will give you a list of per component sizes. Usually if you aren't explicitly using a component in your app, it will not get included into the final binary. Exception to this rule are some common system level components which are always included.
To reduce the binary size you can try decreasing the log level in menuconfig (to only log errors, for instance) and change compiler optimization level to "Optimize for size".
First I would suggest to analyze what actually gets included into the application, by running 'idf.py size-components' (or 'make size-components', if you are using GNU Make). This will give you a list of per component sizes. Usually if you aren't explicitly using a component in your app, it will not get included into the final binary. Exception to this rule are some common system level components which are always included.
To reduce the binary size you can try decreasing the log level in menuconfig (to only log errors, for instance) and change compiler optimization level to "Optimize for size".
Who is online
Users browsing this forum: hugerobber and 120 guests