diff --git a/Software/VNA_embedded/.cproject b/Software/VNA_embedded/.cproject index 40b1540..ac3981a 100644 --- a/Software/VNA_embedded/.cproject +++ b/Software/VNA_embedded/.cproject @@ -38,6 +38,10 @@ + + + + diff --git a/Software/VNA_embedded/Makefile b/Software/VNA_embedded/Makefile index 36b2829..8ad1b4b 100644 --- a/Software/VNA_embedded/Makefile +++ b/Software/VNA_embedded/Makefile @@ -141,8 +141,8 @@ endif # compile gcc flags ASFLAGS = $(MCU) -g -CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -c -CXXFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -c -fno-exceptions -fno-rtti +CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -c --specs=nano.specs +CXXFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -c -fno-exceptions -fno-rtti --specs=nano.specs -fno-use-cxa-atexit @@ -159,9 +159,9 @@ CXXFLAGS += -MMD -MP LDSCRIPT = STM32G431CBUX_FLASH.ld # libraries -LIBS = -lm #-l:USBPDCORE_PD3_FULL_CM4_wc32.a +LIBS = -lc -lm -lstdc++ -lsupc++ #LIBDIR = -LMiddlewares/ST/STM32_USBPD_Library/Core/lib -LDFLAGS = $(MCU) -specs=nosys.specs -specs=nano.specs $(LIBDIR) -T$(LDSCRIPT) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map -Wl,--gc-sections -fno-exceptions -fno-rtti +LDFLAGS = $(MCU) -static -specs=nano.specs $(LIBDIR) -T$(LDSCRIPT) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map -Wl,--gc-sections -fno-exceptions -fno-rtti -Wl,--start-group -Wl,--end-group # default action: build all all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin