commit 00dc2d4901bd114fd412e6b491b349a979719379
parent 33e6393b0ff66938522869fa11d9f32422ff65d6
Author: Brian Swetland <swetland@frotz.net>
Date: Sat, 14 May 2022 20:59:04 -0700
build: move link scripts into make/...
Diffstat:
8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
@@ -37,7 +37,7 @@ ARCHFLAGS += -static -nostdlib -nostartfiles -ffreestanding
ARCHFLAGS += -ffunction-sections -fdata-sections
ARCHFLAGS += -fno-builtin -fno-strict-aliasing
-LDSCRIPT := hw/app.ram.ld
+LDSCRIPT := make/app.ram.ld
BUILD := out
diff --git a/hw/app.ram.ld b/hw/app.ram.ld
@@ -1,6 +0,0 @@
-
-MEMORY {
- RAM (rwx) : ORIGIN = 0x40008000, LENGTH = 0x7F8000
-}
-
-INCLUDE "hw/common.ram.ld"
diff --git a/hw/boot.ram.ld b/hw/boot.ram.ld
@@ -1,6 +0,0 @@
-
-MEMORY {
- RAM (rwx) : ORIGIN = 0x40000000, LENGTH = 0x8000
-}
-
-INCLUDE "hw/common.ram.ld"
diff --git a/make/app.mk b/make/app.mk
@@ -29,7 +29,7 @@ $(MOD_ELF): $(MOD_DIR)/build.opts $(patsubst %,$(BUILD)/lib%.a,$(MOD_LIB))
$(MOD_ELF): _OBJ := $(MOD_OBJ)
$(MOD_ELF): _LDFLAGS := $(MOD_LDFLAGS) -T $(MOD_LDSCRIPT)
$(MOD_ELF): _LIB := -L$(BUILD) $(patsubst %,-l%,$(MOD_LIB)) -lgcc
-$(MOD_ELF): $(MOD_OBJ) $(MOD_LDSCRIPT) hw/common.ram.ld
+$(MOD_ELF): $(MOD_OBJ) $(MOD_LDSCRIPT) make/common.ram.ld
@$(info linking $@)
$(V)$(XGCC) $(_LDFLAGS) -o $@ $(_OBJ) $(_LIB)
diff --git a/make/app.ram.ld b/make/app.ram.ld
@@ -0,0 +1,6 @@
+
+MEMORY {
+ RAM (rwx) : ORIGIN = 0x40008000, LENGTH = 0x7F8000
+}
+
+INCLUDE "make/common.ram.ld"
diff --git a/make/boot.ram.ld b/make/boot.ram.ld
@@ -0,0 +1,6 @@
+
+MEMORY {
+ RAM (rwx) : ORIGIN = 0x40000000, LENGTH = 0x8000
+}
+
+INCLUDE "make/common.ram.ld"
diff --git a/hw/common.ram.ld b/make/common.ram.ld
diff --git a/project/boot.app.mk b/project/boot.app.mk
@@ -4,5 +4,5 @@ MOD_SRC := hw/src/start.S boot/entry.S boot/boot.c
MOD_SRC += hw/src/print-exception.c
MOD_SRC += hw/src/debug-printf.c hw/src/debug-io.c
MOD_LIB := c
-MOD_LDSCRIPT := hw/boot.ram.ld
+MOD_LDSCRIPT := make/boot.ram.ld
include make/app.mk