Closed master-q closed 7 years ago
Sorry. I'm confusing. The build has no problem with following patch:
--- a/Makefile
+++ b/Makefile
@@ -86,8 +86,8 @@ C_INCLUDES += -IDrivers/STM32F7xx_HAL_Driver/Inc
C_INCLUDES += -IDrivers/STM32F7xx_HAL_Driver/Inc/Legacy
C_INCLUDES += -IInc
# compile gcc flags
-ASFLAGS = -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=hard $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
-CFLAGS = -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=hard $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
+ASFLAGS = -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
+CFLAGS = -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2
endif
@@ -102,7 +102,7 @@ LDSCRIPT = STM32F746NGHx_FLASH.ld
# libraries
LIBS = -lc -lm -lnosys
LIBDIR =
-LDFLAGS = -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
+LDFLAGS = -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nano.specs -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
This project can't use hard float?
Sorry. I make sense. It's an error at GCC toolchain. This issue is not reproduced on following environment:
I get codes as following using STM32CubeMX and your CubeMX2Makefile for STM32F746G-DISCO board:
https://github.com/master-q/try_to_use_stm32cubemx
However above codes is not able to be compiled, because the build stops with following errors:
What's wrong? I'm using: