mdebug

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 04de6e65280060d929227f33f0526e2433807967
parent b078c7fe3ea33d4a06ca81d3c2e5db3ae2e98815
Author: Brian Swetland <swetland@frotz.net>
Date:   Tue,  2 Feb 2021 14:20:59 -0800

build: select correct libgcc.a for agent targets

Diffstat:
Mbuild/build.mk | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build/build.mk b/build/build.mk @@ -10,7 +10,10 @@ TARGET_OBJCOPY := $(TOOLCHAIN)objcopy TARGET_OBJDUMP := $(TOOLCHAIN)objdump ARCH_M3_CFLAGS := -mcpu=cortex-m3 -mthumb +ARCH_M3_LIBS := $(shell $(TARGET_CC) $(ARCH_M3_CFLAGS) -print-libgcc-file-name) + ARCH_M0_CFLAGS := -mcpu=cortex-m0 -mthumb +ARCH_M0_LIBS := $(shell $(TARGET_CC) $(ARCH_M0_CFLAGS) -print-libgcc-file-name) TARGET_CFLAGS := -g -Os -Wall TARGET_CFLAGS += -Wno-unused-but-set-variable @@ -57,7 +60,7 @@ out/agent-%.lst: out/agent-%.elf out/agent-%.elf: agents/%.c @mkdir -p $(dir $@) @echo compile $@ - $(QUIET)$(TARGET_CC) $(TARGET_CFLAGS) $(ARCH_$(ARCH)_CFLAGS) -Wl,--script=build/agent.ld -Wl,-Ttext=$(LOADADDR) -o $@ $< + $(QUIET)$(TARGET_CC) $(TARGET_CFLAGS) $(ARCH_$(ARCH)_CFLAGS) -Wl,--script=build/agent.ld -Wl,-Ttext=$(LOADADDR) -o $@ $< $(ARCH_$(ARCH)_LIBS) out/%.o: %.c @mkdir -p $(dir $@)