Add -M to the LDFLAGS += will produce a (really huge) map.


grep -B1 main.c.o |\
grep -v 0x0000000000000000| sed "s/0x00000000//"|grep -v ' .debug_' |\
sed "s'_build/                  +ruuvi_firmware_main.c.o'';s/000//"|grep -v - \-\-| grep -v \.comment|grep -v LOAD|sed "s/.str1.4//"

to extract symbols related to the main

static Data items i.e. .data.

For example:

                2405c        0x4 
                24060        0x4 
                24064       0x88 
                240ec       0x1c 
                24108      0x26c 
                24374       0x20 
                24394       0x20 
                243b4        0x4 
                243b8       0x5c 
                24414      0x53c 
                24950      0x4f4 

                356b4       0x30 
                356e4       0x6b 
                35750       0x80 
                357d0      0x1e2 
                359b4       0xbe 

                22da0        0x1 
 .data.highres  22da1        0x1 
                22da4       0x12 

                245d4        0x2 
                245d6        0x2      245d8        0xe 
                245e8       0x18 
 .bss.debounce  24600        0x8 
 .bss.format    24608        0x1 
                2460a        0x2 
                2460c        0x4 
                24610       0x20 
                24630        0x1 
 .bss.resets    24631        0x1 
 .bss.vbat      24632        0x2 

                007b6       0x39 
                00970       0x70 
                                      0x6d8a1 (size before relaxing)