diff options
24 files changed, 90 insertions, 12 deletions
diff --git a/demos/PPC-SPC560B-GCC/Makefile b/demos/PPC-SPC560B-GCC/Makefile index 67a818a04..1a594e5e6 100644 --- a/demos/PPC-SPC560B-GCC/Makefile +++ b/demos/PPC-SPC560B-GCC/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/demos/PPC-SPC560P-GCC/Makefile b/demos/PPC-SPC560P-GCC/Makefile index 2f567c047..3949db752 100644 --- a/demos/PPC-SPC560P-GCC/Makefile +++ b/demos/PPC-SPC560P-GCC/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/demos/PPC-SPC563M-GCC/Makefile b/demos/PPC-SPC563M-GCC/Makefile index cb7e7760d..e6098bcab 100644 --- a/demos/PPC-SPC563M-GCC/Makefile +++ b/demos/PPC-SPC563M-GCC/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/demos/PPC-SPC564A-GCC/Makefile b/demos/PPC-SPC564A-GCC/Makefile index 9ae094063..93d437847 100644 --- a/demos/PPC-SPC564A-GCC/Makefile +++ b/demos/PPC-SPC564A-GCC/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/demos/PPC-SPC56EL-GCC/Makefile b/demos/PPC-SPC56EL-GCC/Makefile index 913d339d6..6ff36c810 100644 --- a/demos/PPC-SPC56EL-GCC/Makefile +++ b/demos/PPC-SPC56EL-GCC/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/os/ports/GCC/PPC/SPC560BCxx/bam.s b/os/ports/GCC/PPC/SPC560BCxx/bam.s index e37cfaa0c..f62c854dd 100644 --- a/os/ports/GCC/PPC/SPC560BCxx/bam.s +++ b/os/ports/GCC/PPC/SPC560BCxx/bam.s @@ -31,9 +31,12 @@ /* BAM record.*/
.section .bam, "ax"
.long 0x015A0000
- .long .init
+ .long _reset_address
-.init:
+ .align 2
+ .globl _reset_address
+ .type _reset_address, @function
+_reset_address:
bl _coreinit
bl _ivinit
diff --git a/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B44.ld b/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B44.ld index 73b25bb09..2b81984d1 100644 --- a/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B44.ld +++ b/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B44.ld @@ -31,6 +31,8 @@ MEMORY ram : org = 0x40000000, len = 28k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B50.ld b/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B50.ld index 56b83cfe1..7ccede017 100644 --- a/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B50.ld +++ b/os/ports/GCC/PPC/SPC560BCxx/ld/SPC560B50.ld @@ -31,6 +31,8 @@ MEMORY ram : org = 0x40000000, len = 32k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC560Pxx/bam.s b/os/ports/GCC/PPC/SPC560Pxx/bam.s index b5a2a6af0..d1feed8d3 100644 --- a/os/ports/GCC/PPC/SPC560Pxx/bam.s +++ b/os/ports/GCC/PPC/SPC560Pxx/bam.s @@ -31,9 +31,12 @@ /* BAM record.*/
.section .bam, "ax"
.long 0x015A0000
- .long .init
+ .long _reset_address
-.init:
+ .align 2
+ .globl _reset_address
+ .type _reset_address, @function
+_reset_address:
bl _coreinit
bl _ivinit
diff --git a/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P44.ld b/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P44.ld index b4db1d25b..de3e0bc37 100644 --- a/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P44.ld +++ b/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P44.ld @@ -31,6 +31,8 @@ MEMORY ram : org = 0x40000000, len = 36k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P50.ld b/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P50.ld index 37b737bc8..e02b092a5 100644 --- a/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P50.ld +++ b/os/ports/GCC/PPC/SPC560Pxx/ld/SPC560P50.ld @@ -31,6 +31,8 @@ MEMORY ram : org = 0x40000000, len = 40k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC563Mxx/bam.s b/os/ports/GCC/PPC/SPC563Mxx/bam.s index 6b3012a72..19ce1e014 100644 --- a/os/ports/GCC/PPC/SPC563Mxx/bam.s +++ b/os/ports/GCC/PPC/SPC563Mxx/bam.s @@ -35,9 +35,12 @@ #else
.long 0x005A0000
#endif
- .long .init
+ .long _reset_address
-.init:
+ .align 2
+ .globl _reset_address
+ .type _reset_address, @function
+_reset_address:
bl _coreinit
bl _ivinit
diff --git a/os/ports/GCC/PPC/SPC563Mxx/ld/SPC563M64.ld b/os/ports/GCC/PPC/SPC563Mxx/ld/SPC563M64.ld index d96dd9970..25fe1143b 100644 --- a/os/ports/GCC/PPC/SPC563Mxx/ld/SPC563M64.ld +++ b/os/ports/GCC/PPC/SPC563Mxx/ld/SPC563M64.ld @@ -30,6 +30,8 @@ MEMORY ram : org = 0x40000000, len = 94k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC564Axx/bam.s b/os/ports/GCC/PPC/SPC564Axx/bam.s index 1e5982423..2955cea2f 100644 --- a/os/ports/GCC/PPC/SPC564Axx/bam.s +++ b/os/ports/GCC/PPC/SPC564Axx/bam.s @@ -35,9 +35,12 @@ #else
.long 0x005A0000
#endif
- .long .init
+ .long _reset_address
-.init:
+ .align 2
+ .globl _reset_address
+ .type _reset_address, @function
+_reset_address:
bl _coreinit
bl _ivinit
diff --git a/os/ports/GCC/PPC/SPC564Axx/ld/SPC564A80.ld b/os/ports/GCC/PPC/SPC564Axx/ld/SPC564A80.ld index bdc559e6c..ab503114e 100644 --- a/os/ports/GCC/PPC/SPC564Axx/ld/SPC564A80.ld +++ b/os/ports/GCC/PPC/SPC564Axx/ld/SPC564A80.ld @@ -30,6 +30,8 @@ MEMORY ram : org = 0x40000000, len = 192k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC56ELxx/bam.s b/os/ports/GCC/PPC/SPC56ELxx/bam.s index 0760257a2..623428ce3 100644 --- a/os/ports/GCC/PPC/SPC56ELxx/bam.s +++ b/os/ports/GCC/PPC/SPC56ELxx/bam.s @@ -35,9 +35,12 @@ #else
.long 0x005A0000
#endif
- .long .init
+ .long _reset_address
-.init:
+ .align 2
+ .globl _reset_address
+ .type _reset_address, @function
+_reset_address:
bl _coreinit
bl _ivinit
diff --git a/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL54_LSM.ld b/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL54_LSM.ld index a714029b9..592c435f5 100644 --- a/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL54_LSM.ld +++ b/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL54_LSM.ld @@ -30,6 +30,8 @@ MEMORY ram : org = 0x40000000, len = 128k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL60_LSM.ld b/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL60_LSM.ld index 87bfe5ad1..193c21c05 100644 --- a/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL60_LSM.ld +++ b/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL60_LSM.ld @@ -30,6 +30,8 @@ MEMORY ram : org = 0x40000000, len = 128k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL70_LSM.ld b/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL70_LSM.ld index 0a905c499..7afb4bf78 100644 --- a/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL70_LSM.ld +++ b/os/ports/GCC/PPC/SPC56ELxx/ld/SPC56EL70_LSM.ld @@ -30,6 +30,8 @@ MEMORY ram : org = 0x40000000, len = 192k
}
+ENTRY(_reset_address)
+
/*
* Derived constants.
*/
diff --git a/os/ports/GCC/PPC/rules.mk b/os/ports/GCC/PPC/rules.mk index a78e0a376..443eee92c 100644 --- a/os/ports/GCC/PPC/rules.mk +++ b/os/ports/GCC/PPC/rules.mk @@ -62,9 +62,9 @@ ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS) CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
ifeq ($(USE_LINK_GC),yes)
- LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LLIBDIR)
+ LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections,$(USE_LDOPT) $(LLIBDIR)
else
- LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch $(LLIBDIR)
+ LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,$(USE_LDOPT) $(LLIBDIR)
endif
# Generate dependency information
diff --git a/testhal/SPC560Pxx/PWM-ICU/Makefile b/testhal/SPC560Pxx/PWM-ICU/Makefile index ed51f07b7..4d69bc950 100644 --- a/testhal/SPC560Pxx/PWM-ICU/Makefile +++ b/testhal/SPC560Pxx/PWM-ICU/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/testhal/SPC563Mxx/ADC/Makefile b/testhal/SPC563Mxx/ADC/Makefile index 932511e51..644898587 100644 --- a/testhal/SPC563Mxx/ADC/Makefile +++ b/testhal/SPC563Mxx/ADC/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/testhal/SPC563Mxx/SPI/Makefile b/testhal/SPC563Mxx/SPI/Makefile index c52b0f44a..911a39668 100644 --- a/testhal/SPC563Mxx/SPI/Makefile +++ b/testhal/SPC563Mxx/SPI/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
diff --git a/testhal/SPC56ELxx/PWM-ICU/Makefile b/testhal/SPC56ELxx/PWM-ICU/Makefile index 7de6c8b42..a6f7718ca 100644 --- a/testhal/SPC56ELxx/PWM-ICU/Makefile +++ b/testhal/SPC56ELxx/PWM-ICU/Makefile @@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes
endif
+# Linker options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# If enabled, this option allows to compile the application in VLE mode.
ifeq ($(USE_VLE),)
USE_VLE = yes
|