From 9e9f1ff508212f9e7837f84ed6e68547b41dc3e8 Mon Sep 17 00:00:00 2001 From: Kirill Kotyagin Date: Wed, 9 Feb 2022 16:57:15 +0300 Subject: [PATCH] ADD: FIRMWARE_ORIGIN option --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 62bce4e..c078973 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,10 @@ OBJS += $(SRCS:%.c=$(BUILD_DIR)/%.o) OBJS += $(STM32_SYSINIT:%.c=$(BUILD_DIR)/%.o) STARTUP += $(STM32_STARTUP:%.s=$(BUILD_DIR)/%.o) +ifneq ($(FIRMWARE_ORIGIN),) +LDFLAGS += -Wl,-section-start=.isr_vector=$(FIRMWARE_ORIGIN) +endif + .PHONY: all all: $(TARGET).hex $(TARGET).bin size