Sam Doshi personal ramblings

AVR32 RAM and ROM usage

When developing for embedded devices it’s incredibly important to keep a track of your RAM and ROM usage. In order to do so, we can use the Unix utility size, in particular for the AVR32, we use the avr32-size command.

If you want the quick answer:

Run avr32-size -A <insert name>.elf

The .heap size is effectively your free RAM (malloc usage aside).

Your ROM size is approximately .data + .rodata + .text, to which you can add your .flash_nvram to get an approximation of total flash ROM use.

Read on for the gory details…


An introduction to Git submodules

Over on the Monome online community lines, we’ve been discussing breaking up the monolithic git repository used for the Eurorack modules’ firmware. This is just a brief overview of Git submodules to see if they are a good fit for us.

A submodule allows you to keep another Git repository in a subdirectory of your repository. The other repository has its own history, which does not interfere with the history of the current repository. This can be used to have external dependencies such as third party libraries for example.

The Git submodule man page (emphasis mine)

Let’s work through a simple example to see how it works…