Merge pull request #616 from hexluthor/listing

CC2538: Add a Makefile rule to generate a final assembly listing.
This commit is contained in:
George Oikonomou 2014-04-17 22:13:52 +01:00
commit 49bf7cc241
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@ CPP = arm-none-eabi-cpp
LD = arm-none-eabi-gcc
AR = arm-none-eabi-ar
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
NM = arm-none-eabi-nm
ifndef SOURCE_LDSCRIPT
@ -19,6 +20,7 @@ LDFLAGS += -T $(LDSCRIPT)
LDFLAGS += -Wl,--gc-sections,--sort-section=alignment
LDFLAGS += -Wl,-Map=$(@:.elf=-$(TARGET).map),--cref,--no-warn-mismatch
OBJCOPY_FLAGS += -O binary --gap-fill 0xff
OBJDUMP_FLAGS += --disassemble --source --disassembler-options=force-thumb
### Are we building with code size optimisations?
ifeq ($(SMALL),1)
@ -82,6 +84,9 @@ CUSTOM_RULE_LINK=1
%.bin: %.elf
$(OBJCOPY) $(OBJCOPY_FLAGS) $< $@
%.lst: %.elf
$(OBJDUMP) $(OBJDUMP_FLAGS) $< > $@
### We don't really need the .hex and .bin for the .$(TARGET) but let's make
### sure they get built
%.$(TARGET): %.elf %.hex %.bin

View File

@ -246,6 +246,8 @@ If you want to upload the compiled firmware to a node via the serial boot loader
For the `cc2538-demo`, the comments at the top of `cc2538-demo.c` describe in detail what the example does.
To generate an assembly listing of the compiled firmware, run `make cc2538-demo.lst`. This may be useful for debugging or optimizing your application code. To intersperse the C source code within the assembly listing, you must instruct the compiler to include debugging information by adding `CFLAGS += -g` to the project Makefile and rebuild by running `make clean cc2538-demo.lst`.
Node IEEE/RIME/IPv6 Addresses
-----------------------------