File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,23 +22,21 @@ DFU = ../tools/dfu.py
2222PYDFU = ../tools/pydfu.py
2323CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
2424CFLAGS = $(INC ) -Wall -Werror -std=c99 -nostdlib $(CFLAGS_CORTEX_M4 ) $(COPT )
25+ LDFLAGS = -nostdlib -T stm32f405.ld -Map=$@ .map --cref --gc-sections
2526else
27+ LD = gcc
2628CFLAGS = -m32 $(INC ) -Wall -Werror -std=c99 $(COPT )
29+ LDFLAGS = -m32 -Wl,-Map=$@ .map,--cref -Wl,--gc-sections
2730endif
2831
29- # Debugging/ Optimization
32+ # Tune for Debugging or Optimization
3033ifeq ($(DEBUG ) , 1)
3134CFLAGS += -O0 -ggdb
3235else
3336CFLAGS += -Os -DNDEBUG
37+ CFLAGS += -fdata-sections -ffunction-sections
3438endif
3539
36- ifeq ($(CROSS ) , 1)
37- LDFLAGS = -nostdlib -T stm32f405.ld -Map=$@ .map --cref
38- else
39- LD = gcc
40- LDFLAGS = -m32 -Wl,-Map=$@ .map,--cref
41- endif
4240LIBS =
4341
4442SRC_C = \
You can’t perform that action at this time.
0 commit comments