7e13081776
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.
15 lines
483 B
Text
15 lines
483 B
Text
GDB ?= gdb
|
|
OPENOCD_SCRIPTS = $(CONTIKI)/platform/galileo/bsp/openocd-scripts
|
|
|
|
.PHONY: debug
|
|
|
|
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) $@
|