diff --git a/cpu/cc2538/Makefile.cc2538 b/cpu/cc2538/Makefile.cc2538 index c13628b01..b172101d1 100644 --- a/cpu/cc2538/Makefile.cc2538 +++ b/cpu/cc2538/Makefile.cc2538 @@ -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 diff --git a/platform/cc2538dk/README.md b/platform/cc2538dk/README.md index 474f08f94..d5c50e378 100644 --- a/platform/cc2538dk/README.md +++ b/platform/cc2538dk/README.md @@ -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 -----------------------------