Re: How to reduce footprint and size of applications in Zephyr

Maciek Borzecki <maciek.borzecki@...>

On Thu, Sep 21, 2017 at 7:57 AM, Hui Yie Teh <hteh703@...> wrote:

Hi Thiago,

Thank you so much for the reply. I am running Zephyr on Linux and building the hello_world app on ARM using qemu_cortex_m3.

I've got the numbers from the following:

The 8MB of memory is measured using the system monitor

The 3.8MB is seen by clicking properties of the folder created after building the hello_world app. I am assuming that the folder in ../outdir/BOARD will be the folder that is going to be installed on the board itself. Am I understanding this correctly?

I'm not sure if those are the right numbers to get, sorry if this is a stupid question.

Also, may I know what these numbers from' make ram_report' and 'make rom_report' mean?



Any help would be really appreciated. Thanks!

qemu-system-arm is just a VM that can emulate, among others, Cortex-M
MCUs. `qemu_cortext_m3` board is in fact emulated by qemu. Memory
usage of a running Qemu process does not directly (or otherwise
easily) translate to the memory usage in the target system.

Haven't looked at the reports for some time, but `ram_report` is
likely a listing statically allocated data that would normally be
copied into RAM during system initialization. `rom_report` likely
lists the size of each symbol (i.e. non-inlined function in the code).
So, you're more realistically looking at ~4kB of RAM and ~7kB of


On 21 September 2017 at 06:15, Thiago Silveira <thiago@...> wrote:

Hi Yie,

That definitely isn't right. In which environment are you running Zephyr, and how are you measuring this?

Try 'make rom_report' and 'make ram_report' to get a nice report of how much each function is consuming.

Best regards,

2017-09-20 13:00 GMT-03:00 Hui Yie Teh <hteh703@...>:


I read that Zephyr allows small footprint of a few KBs. However, the sample hello world application already takes up 8MB of memory and has a size of 3.8MB. I am not sure if I am running this right.

I would appreciate if I can get any help on this or someone to point me at the right direction.


Zephyr-devel mailing list

Zephyr-devel mailing list

Maciek Borzecki

Join { to automatically receive all group messages.