diff --git a/arch/arm/src/rp2040/boot2/Make.defs b/arch/arm/src/rp2040/boot2/Make.defs index 0ab127fcbc..eb5a207383 100644 --- a/arch/arm/src/rp2040/boot2/Make.defs +++ b/arch/arm/src/rp2040/boot2/Make.defs @@ -46,6 +46,6 @@ $(BOOT_STAGE2).bin: %.bin: %.elf $(OBJCOPY) -Obinary $< $@ $(BOOT_STAGE2).elf: $(BOOT2SRC) - $(CC) $(LDFLAGS) $(BOOT2CFLAGS) -o $@ $< + $(CC) -nostartfiles -nodefaultlibs $(ARCHSCRIPT) $(BOOT2CFLAGS) -o $@ $< EXTRADELFILE = $(BOOT_STAGE2).*