Compile with -Os as default. Change like "make OPT_FLAGS=..."

SWD/JTAG Bitbang is compiled with -O3 for good bitbang speed.
This commit is contained in:
Uwe Bonnes 2021-04-19 20:39:55 +02:00 committed by UweBonnes
parent f55ad67b1b
commit 21b80949ff
3 changed files with 1 additions and 3 deletions

View File

@ -62,7 +62,7 @@ SRC = \
include $(PLATFORM_DIR)/Makefile.inc include $(PLATFORM_DIR)/Makefile.inc
OPT_FLAGS ?= -Og OPT_FLAGS ?= -Os
CFLAGS += $(OPT_FLAGS) CFLAGS += $(OPT_FLAGS)
LDFLAGS += $(OPT_FLAGS) LDFLAGS += $(OPT_FLAGS)

View File

@ -3,7 +3,6 @@ ST_BOOTLOADER ?=
CC = $(CROSS_COMPILE)gcc CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
OPT_FLAGS = -Os
CFLAGS += -mcpu=cortex-m3 -mthumb \ CFLAGS += -mcpu=cortex-m3 -mthumb \
-DSTM32F1 -DDISCOVERY_STLINK -I../libopencm3/include \ -DSTM32F1 -DDISCOVERY_STLINK -I../libopencm3/include \
-I platforms/stm32 -I platforms/stm32

View File

@ -2,7 +2,6 @@ CROSS_COMPILE ?= arm-none-eabi-
CC = $(CROSS_COMPILE)gcc CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
OPT_FLAGS = -Os
CFLAGS += -mcpu=cortex-m3 -mthumb \ CFLAGS += -mcpu=cortex-m3 -mthumb \
-DSTM32F1 -DDISCOVERY_SWLINK -I../libopencm3/include \ -DSTM32F1 -DDISCOVERY_SWLINK -I../libopencm3/include \
-I platforms/stm32 -I platforms/stm32