Add some debug assembly
This commit is contained in:
parent
b6aae3384e
commit
8985f3d3a3
7
Makefile
7
Makefile
@ -152,6 +152,7 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
# Generate dependency information
|
# Generate dependency information
|
||||||
|
CFLAGS_ASM := $(CFLAGS)
|
||||||
CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)"
|
CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)"
|
||||||
|
|
||||||
|
|
||||||
@ -175,6 +176,7 @@ all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET
|
|||||||
#######################################
|
#######################################
|
||||||
# list of objects
|
# list of objects
|
||||||
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
|
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
|
||||||
|
OBJECTS_ASM = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.s)))
|
||||||
vpath %.c $(sort $(dir $(C_SOURCES)))
|
vpath %.c $(sort $(dir $(C_SOURCES)))
|
||||||
# list of ASM program objects
|
# list of ASM program objects
|
||||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
||||||
@ -185,12 +187,15 @@ vpath %.S $(sort $(dir $(ASMM_SOURCES)))
|
|||||||
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
|
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
|
||||||
$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
|
$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
|
||||||
|
|
||||||
|
$(BUILD_DIR)/%.s: %.c Makefile | $(BUILD_DIR)
|
||||||
|
$(CC) $(CFLAGS_ASM) -fverbose-asm -S $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
|
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
|
||||||
$(AS) -c $(CFLAGS) $< -o $@
|
$(AS) -c $(CFLAGS) $< -o $@
|
||||||
$(BUILD_DIR)/%.o: %.S Makefile | $(BUILD_DIR)
|
$(BUILD_DIR)/%.o: %.S Makefile | $(BUILD_DIR)
|
||||||
$(AS) -c $(CFLAGS) $< -o $@
|
$(AS) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) $(OBJECTS_ASM) Makefile
|
||||||
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
||||||
$(SZ) $@
|
$(SZ) $@
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user