diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -33,10 +33,12 @@ USB_INCLUDES = -Imiddlewares/ST/STM32_US USB_INCLUDES += -Imiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc # USER_CFLAGS: user C flags (enable warnings, enable debug info) -USER_CFLAGS = -Wall -g -ffunction-sections -fno-exceptions -fdata-sections -Os +USER_CFLAGS = -Wall -g -ffunction-sections -fno-exceptions -fdata-sections -Os --function-sections -fno-common # USER_LDFLAGS: user LD flags USER_LDFLAGS = -fno-exceptions -ffunction-sections -fno-exceptions -fdata-sections -Wl,--gc-sections +USER_LDFLAGS += --static + # TARGET_DEVICE: device to compile for TARGET_DEVICE = STM32F042x6