queezythegreat / arduino-cmake

Arduino CMake Build system
645 stars 216 forks source link

Verbose size #58

Closed PIlin closed 11 years ago

PIlin commented 11 years ago

If option SIZE_VERBOSE will be enabled for target, cmake will print something like

AVR Memory Usage
----------------
Device: atmega32u4

Program:   19780 bytes (60.4% Full)
(.text + .data + .bootloader)

Data:       1949 bytes (76.1% Full)
(.data + .bss + .noinit)

This helps to understand, how much memory is left for code and how much RAM is available for stack.

queezythegreat commented 11 years ago

Hi, thanks for contributing!

I have merged in you changes into the develop branch. I have however made major, modification upon what you wrote. A condensed verbose output is now being displayed by default.

I have added support for a environment variable called VERBOSE_SIZE, which if set will show the full output of the avr-size comand. The documentation has been updated and I've added you to the list of contributors.

The main reason I chnaged your code, is I felt the VERBOSE_SIZE did not belong in the build configuration, it is better suited for the build system (ie during runtime and not generation of the build system).

I will close this issue for now, thanks again.

PIlin commented 11 years ago

OK, thanks. Your condensed output looks even better. Glad to contribute to such good project.