From 620a89471fbbe6c4fac04d5fff23173c3eb6a668 Mon Sep 17 00:00:00 2001 From: trisz404 Date: Wed, 2 May 2018 16:03:15 +0200 Subject: [PATCH] Move entrypoint into it's own variable --- Makefile | 3 +++ intermezzo.S | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a44822f..6179ab8 100644 --- a/Makefile +++ b/Makefile @@ -38,12 +38,15 @@ RELOCATION_TARGET := 0x40010000 LOAD_BLOCK_START := 0x40020000 LOAD_BLOCK_LENGTH := 0x20000 +ENTRY_POINT_ADDRESS := 0x40010000 + # Provide the definitions used in the intermezzo stub. DEFINES := \ -DSTART_OF_IRAM=$(START_OF_IRAM) \ -DRELOCATION_TARGET=$(RELOCATION_TARGET) \ -DLOAD_BLOCK_START=$(LOAD_BLOCK_START) \ -DLOAD_BLOCK_LENGTH=$(LOAD_BLOCK_LENGTH) \ + -DENTRY_POINT_ADDRESS=$(ENTRY_POINT_ADDRESS) intermezzo.elf: intermezzo.o $(LD) -T intermezzo.lds --defsym LOAD_ADDR=$(INTERMEZZO_ADDRESS) $(LDFLAGS) $^ -o $@ diff --git a/intermezzo.S b/intermezzo.S index 30d01aa..2ab2371 100644 --- a/intermezzo.S +++ b/intermezzo.S @@ -30,7 +30,7 @@ post_relocation: bl copy // Finally, jump into the relocated target. - ldr r0, =RELOCATION_TARGET + ldr r0, =ENTRY_POINT_ADDRESS bx r0