From 555aa9820dc1fe6a27fba8054307cb9986b0d86d Mon Sep 17 00:00:00 2001 From: logicog Date: Tue, 6 Oct 2026 17:42:29 +0200 Subject: [PATCH] Makefile: Lower limit of --xram-size to protect ChaCha20 space ChaCha20 uses 256 bytes starting from 0xbf00 for its calculations. Make sure the linker checks that this space is not overwritten. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a56ffc8..abbd3b64 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ $(BUILDDIR)/%.rel: %.asm $(CCFLAGS_STAMP) | create_build_dir # mv -f $(addprefix $(basename $^), .lst .rel .sym) . $(BUILDDIR)/rtlplayground.ihx: $(OBJS) $(BUILDDIR)/crtbank.rel $(BUILDDIR)/crc16.rel $(BUILDDIR)/crypto/chacha_8051.rel - $(CC) $(CC_FLAGS) --xram-size 49151 -Wl-bHOME=0x00000 -Wl-bBANK1=0x14000 -Wl-bBANK2=0x24000 -Wl-bBANK3=0x34000 -Wl-r -o $@ $^ + $(CC) $(CC_FLAGS) --xram-size 48896 -Wl-bHOME=0x00000 -Wl-bBANK1=0x14000 -Wl-bBANK2=0x24000 -Wl-bBANK3=0x34000 -Wl-r -o $@ $^ $(BUILDDIR)/rtlplayground.img: $(BUILDDIR)/rtlplayground.ihx objcopy --input-target=ihex -O binary $< $@