galileo: Print elf sections sizes after build
This patch changes Galileo's buildsystem to print the elf sections sizes after a new image is built. This way we can easily track how these sections increase or decrease after any change. To achieve that, we define a custom linking rule which is pretty much the same as the default linking rule define in Makefile.include, but we run 'size' command after the image is built.
This commit is contained in:
parent
e820a8b03b
commit
7e13081776
@ -7,6 +7,7 @@ CC = gcc
|
||||
LD = gcc
|
||||
AS = as
|
||||
OBJCOPY = objcopy
|
||||
SIZE = size
|
||||
STRIP = strip
|
||||
CFLAGSNO = -Wall -g -I/usr/local/include
|
||||
CFLAGS += $(CFLAGSNO)
|
||||
|
@ -6,3 +6,10 @@ OPENOCD_SCRIPTS = $(CONTIKI)/platform/galileo/bsp/openocd-scripts
|
||||
debug: $(CONTIKI_PROJECT).$(TARGET)
|
||||
@openocd -s $(OPENOCD_SCRIPTS) -f debug.cfg &> $(shell pwd)/LOG_OPENOCD &
|
||||
@$(GDB) $< -ex "target remote :3333"
|
||||
|
||||
CUSTOM_RULE_LINK=1
|
||||
%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
|
||||
$(TRACE_LD)
|
||||
$(Q)$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} \
|
||||
${filter %.a,$^} $(TARGET_LIBFILES) -o $@
|
||||
@$(SIZE) $@
|
||||
|
Loading…
Reference in New Issue
Block a user