mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-21 23:53:35 +08:00
put float printf flag in LDFLAGS
This commit is contained in:
+4
-6
@@ -13,9 +13,7 @@ TARGET = ODriveFirmware
|
||||
# debug build?
|
||||
DEBUG = 1
|
||||
# optimization
|
||||
# OPT = -O3 -ffast-math -flto
|
||||
# OPT = -O3 -ffast-math
|
||||
OPT = -O0 -ffast-math -u _printf_float -u _scanf_float
|
||||
OPT = -Og -ffast-math
|
||||
|
||||
#######################################
|
||||
# pathes
|
||||
@@ -78,7 +76,7 @@ C_SOURCES = \
|
||||
Src/usbd_cdc_if.c \
|
||||
Src/syscalls.c \
|
||||
MotorControl/utils.c \
|
||||
MotorControl/low_level.c
|
||||
MotorControl/low_level.c
|
||||
ASM_SOURCES = \
|
||||
startup/startup_stm32f405xx.s
|
||||
|
||||
@@ -134,7 +132,7 @@ LDSCRIPT = STM32F405RGTx_FLASH.ld
|
||||
# libraries
|
||||
LIBS = -lc -lm -lnosys -larm_cortexM4lf_math
|
||||
LIBDIR = -LDrivers/CMSIS/Lib
|
||||
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nosys.specs -specs=nano.specs $(OPT) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
|
||||
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nosys.specs -specs=nano.specs -u _printf_float -u _scanf_float $(OPT) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
|
||||
|
||||
# default action: build all
|
||||
all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
|
||||
@@ -152,7 +150,7 @@ vpath %.cpp $(sort $(dir $(CPP_SOURCES)))
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
||||
vpath %.s $(sort $(dir $(ASM_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 $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
|
||||
|
||||
Reference in New Issue
Block a user