Move entrypoint into it's own variable

This commit is contained in:
trisz404 2018-05-02 16:03:15 +02:00
parent 3b3c579961
commit 620a89471f
2 changed files with 4 additions and 1 deletions

View File

@ -38,12 +38,15 @@ RELOCATION_TARGET := 0x40010000
LOAD_BLOCK_START := 0x40020000 LOAD_BLOCK_START := 0x40020000
LOAD_BLOCK_LENGTH := 0x20000 LOAD_BLOCK_LENGTH := 0x20000
ENTRY_POINT_ADDRESS := 0x40010000
# Provide the definitions used in the intermezzo stub. # Provide the definitions used in the intermezzo stub.
DEFINES := \ DEFINES := \
-DSTART_OF_IRAM=$(START_OF_IRAM) \ -DSTART_OF_IRAM=$(START_OF_IRAM) \
-DRELOCATION_TARGET=$(RELOCATION_TARGET) \ -DRELOCATION_TARGET=$(RELOCATION_TARGET) \
-DLOAD_BLOCK_START=$(LOAD_BLOCK_START) \ -DLOAD_BLOCK_START=$(LOAD_BLOCK_START) \
-DLOAD_BLOCK_LENGTH=$(LOAD_BLOCK_LENGTH) \ -DLOAD_BLOCK_LENGTH=$(LOAD_BLOCK_LENGTH) \
-DENTRY_POINT_ADDRESS=$(ENTRY_POINT_ADDRESS)
intermezzo.elf: intermezzo.o intermezzo.elf: intermezzo.o
$(LD) -T intermezzo.lds --defsym LOAD_ADDR=$(INTERMEZZO_ADDRESS) $(LDFLAGS) $^ -o $@ $(LD) -T intermezzo.lds --defsym LOAD_ADDR=$(INTERMEZZO_ADDRESS) $(LDFLAGS) $^ -o $@

View File

@ -30,7 +30,7 @@ post_relocation:
bl copy bl copy
// Finally, jump into the relocated target. // Finally, jump into the relocated target.
ldr r0, =RELOCATION_TARGET ldr r0, =ENTRY_POINT_ADDRESS
bx r0 bx r0