From 84648978fbdcd569e12ac43579d452941b78a3e1 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 20 Sep 2012 11:30:46 -0500 Subject: [PATCH] Provide symbol_sizes and generated_assembly targets. Also update existing auxiliary targets with help, and make the .PHONY list complete and in order. --- arduino-mk/Arduino.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index e564369..5179f9d 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -687,6 +687,13 @@ $(OBJDIR)/%.o: $(OBJDIR)/%.cpp $(OBJDIR)/%.d: $(OBJDIR)/%.cpp $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< -MF $@ -MT $(@:.d=.o) +# generated assembly +$(OBJDIR)/%.s: $(OBJDIR)/%.cpp + $(CXX) -S -fverbose-asm $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +#$(OBJDIR)/%.lst: $(OBJDIR)/%.s +# $(AS) -mmcu=$(MCU) -alhnd $< > $@ + # core files $(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ @@ -801,6 +808,12 @@ monitor: disasm: $(OBJDIR)/$(TARGET).lss @$(ECHO) The compiled ELF file has been disassembled to $(OBJDIR)/$(TARGET).lss -.PHONY: all clean depends upload raw_upload reset reset_stty size show_boards monitor +symbol_sizes: $(OBJDIR)/$(TARGET).sym + @$(ECHO) A symbol listing sorted by their size have been dumped to $(OBJDIR)/$(TARGET).sym + +generated_assembly: $(OBJDIR)/$(TARGET).s + @$(ECHO) Compiler-generated assembly for the main input source has been dumped to $(OBJDIR)/$(TARGET).s + +.PHONY: all upload raw_upload reset reset_stty ispload clean depends size show_boards monitor disasm symbol_sizes generated_assembly include $(DEP_FILE)