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