Anonymous committed b3c85db

Don't link with the standard library
The standard library isn't needed and using it results in a memory overflow
(e.g. the linker section bss will become larger than the available RAM).

This fixes a problem with newer versions of gcc/newlibc.
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

  • Participants
  • Parent commits 4e377d8

Comments (0)

Files changed (1)

 CFLAGS += -ffunction-sections -fdata-sections
-LDFLAGS = $(CFLAGS) -Wl,-Map=$(PROG).map,--cref,--gc-sections
+LDFLAGS = $(CFLAGS) -Wl,-Map=$(PROG).map,--cref,--gc-sections -nostdlib
 ifeq ($(CLOAD), 1)
   LDFLAGS += -T scripts/STM32F103_32K_20K_FLASH_CLOAD.ld