mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
add support to gcc Makefile to make map file for debugging.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@385 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
01376de3e5
commit
659a8f537f
1 changed files with 3 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -142,7 +142,7 @@ LD_SCRIPT = $(ROOT)/stm32_flash.ld
|
|||
LDFLAGS = -lm \
|
||||
$(ARCH_FLAGS) \
|
||||
-static \
|
||||
-Wl,-gc-sections \
|
||||
-Wl,-gc-sections,-Map,$(TARGET_MAP) \
|
||||
-T$(LD_SCRIPT)
|
||||
|
||||
###############################################################################
|
||||
|
@ -169,6 +169,7 @@ endif
|
|||
TARGET_HEX = $(BIN_DIR)/baseflight_$(TARGET).hex
|
||||
TARGET_ELF = $(BIN_DIR)/baseflight_$(TARGET).elf
|
||||
TARGET_OBJS = $(addsuffix .o,$(addprefix $(OBJECT_DIR)/$(TARGET)/,$(basename $($(TARGET)_SRC))))
|
||||
TARGET_MAP = $(OBJECT_DIR)/baseflight_$(TARGET).map
|
||||
|
||||
# List of buildable ELF files and their object dependencies.
|
||||
# It would be nice to compute these lists, but that seems to be just beyond make.
|
||||
|
@ -196,7 +197,7 @@ $(OBJECT_DIR)/$(TARGET)/%.o): %.S
|
|||
@$(CC) -c -o $@ $(ASFLAGS) $<
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET_HEX) $(TARGET_ELF) $(TARGET_OBJS)
|
||||
rm -f $(TARGET_HEX) $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
|
||||
|
||||
flash_$(TARGET): $(TARGET_HEX)
|
||||
stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue