diff options
Diffstat (limited to 'core/cortex-m0')
-rw-r--r-- | core/cortex-m0/build.mk | 11 | ||||
-rw-r--r-- | core/cortex-m0/init.S | 10 |
2 files changed, 9 insertions, 12 deletions
diff --git a/core/cortex-m0/build.mk b/core/cortex-m0/build.mk index 6777e8edda..eab2a1eb1c 100644 --- a/core/cortex-m0/build.mk +++ b/core/cortex-m0/build.mk @@ -6,10 +6,17 @@ # Cortex-M0 core OS files build # -# Use coreboot-sdk +ifeq ($(cc-name),gcc) +# coreboot sdk +CROSS_COMPILE_ARM_DEFAULT:=/opt/coreboot-sdk/bin/arm-eabi- +else +# llvm sdk +CROSS_COMPILE_ARM_DEFAULT:=arm-none-eabi- +endif + $(call set-option,CROSS_COMPILE,\ $(CROSS_COMPILE_arm),\ - /opt/coreboot-sdk/bin/arm-eabi-) + $(CROSS_COMPILE_ARM_DEFAULT)) # CPU specific compilation flags CFLAGS_CPU+=-mthumb diff --git a/core/cortex-m0/init.S b/core/cortex-m0/init.S index 5047d18380..6ccb75bbe8 100644 --- a/core/cortex-m0/init.S +++ b/core/cortex-m0/init.S @@ -111,19 +111,9 @@ _data_end: _data_lma_start: .long __data_lma_start -/* Mock functions to avoid linker complaints */ -.global __aeabi_unwind_cpp_pr0 -.global __aeabi_unwind_cpp_pr1 -.global __aeabi_unwind_cpp_pr2 -__aeabi_unwind_cpp_pr0: -__aeabi_unwind_cpp_pr1: -__aeabi_unwind_cpp_pr2: - bx lr - /* Reserve space for system stack */ .section .bss.system_stack stack_start: .space CONFIG_STACK_SIZE, 0 stack_end: .global stack_end - |