Zephyr and the Memory Footprint: Difference between revisions

From chriesibaum wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Do you want to use [https://zephyrproject.org/ Zephyr RTOS] on a Microcontroller with only a few bytes of Flash? Let's try it!
Do you want to use [https://zephyrproject.org/ Zephyr RTOS] on a Microcontroller with only a few bytes of Flash? Let's try it!


On the [https://docs.zephyrproject.org/latest/guides/optimizations/footprint.html Optimizing for Footprint] doc site you will find some hints how to reduce the memory footprint. With this I could reduce the kernel to 6872 bytes. Ok, this is just the kernel to have an idea how much flash it needs. You can analyze the memory usage from the rom/ram-report (for more details have a look at the Zephyr [https://docs.zephyrproject.org/latest/guides/optimizations/tools.html Optimization Tools]).  
On the [https://docs.zephyrproject.org/latest/guides/optimizations/footprint.html Optimizing for Footprint] doc site you will find some hints how to reduce the memory footprint. With this I could reduce the kernel to 6872 bytes. Ok, this is just the kernel to have an idea how much flash it needs. You can analyze the memory usage from the rom/ram-report (for more details have a look at the Zephyr [https://docs.zephyrproject.org/latest/guides/optimizations/tools.html Optimization Tools]).
 
<syntaxhighlight lang="sh">
Memory region        Used Size  Region Size  %age Used
          FLASH:        6872 B        16 KB    41.94%
            SRAM:        1232 B        2 KB    60.16%
        IDT_LIST:          56 B        2 KB      2.73%
</syntaxhighlight>


But how much does a small hello world application need, for example?
But how much does a small hello world application need, for example?

Revision as of 11:37, 26 January 2021

Do you want to use Zephyr RTOS on a Microcontroller with only a few bytes of Flash? Let's try it!

On the Optimizing for Footprint doc site you will find some hints how to reduce the memory footprint. With this I could reduce the kernel to 6872 bytes. Ok, this is just the kernel to have an idea how much flash it needs. You can analyze the memory usage from the rom/ram-report (for more details have a look at the Zephyr Optimization Tools).

Memory region         Used Size  Region Size  %age Used
           FLASH:        6872 B        16 KB     41.94%
            SRAM:        1232 B         2 KB     60.16%
        IDT_LIST:          56 B         2 KB      2.73%


But how much does a small hello world application need, for example?