diff --git a/arch/arm64/src/common/CMakeLists.txt b/arch/arm64/src/common/CMakeLists.txt index 0746b9994c..339a915007 100644 --- a/arch/arm64/src/common/CMakeLists.txt +++ b/arch/arm64/src/common/CMakeLists.txt @@ -31,8 +31,7 @@ endif() # Common C source files ( OS call up_xxx) list(APPEND SRCS arm64_initialize.c arm64_initialstate.c arm64_boot.c) -list(APPEND SRCS arm64_nputs.c arm64_idle.c arm64_copystate.c - arm64_createstack.c) +list(APPEND SRCS arm64_nputs.c arm64_copystate.c arm64_createstack.c) list(APPEND SRCS arm64_releasestack.c arm64_stackframe.c arm64_usestack.c) list(APPEND SRCS arm64_exit.c arm64_fork.c arm64_switchcontext.c) list(APPEND SRCS arm64_schedulesigaction.c arm64_sigdeliver.c) @@ -47,6 +46,10 @@ list(APPEND SRCS arm64_syscall.c) # Use common heap allocation for now (may need to be customized later) list(APPEND SRCS arm64_allocateheap.c) +if(NOT CONFIG_ARCH_IDLE_CUSTOM) + list(APPEND SRCS arm64_idle.c) +endif() + if(CONFIG_ARM64_GIC_VERSION EQUAL 3) list(APPEND SRCS arm64_gicv3.c) endif() diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs index d29014861e..316514de78 100644 --- a/arch/arm64/src/common/Make.defs +++ b/arch/arm64/src/common/Make.defs @@ -43,7 +43,7 @@ endif # Common C source files ( OS call up_xxx) CMN_CSRCS = arm64_initialize.c arm64_initialstate.c arm64_boot.c -CMN_CSRCS += arm64_nputs.c arm64_idle.c arm64_copystate.c arm64_createstack.c +CMN_CSRCS += arm64_nputs.c arm64_copystate.c arm64_createstack.c CMN_CSRCS += arm64_releasestack.c arm64_stackframe.c arm64_usestack.c CMN_CSRCS += arm64_exit.c arm64_fork.c arm64_switchcontext.c CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c @@ -59,6 +59,10 @@ CMN_CSRCS += arm64_modifyreg8.c arm64_modifyreg16.c arm64_modifyreg32.c # Use common heap allocation for now (may need to be customized later) CMN_CSRCS += arm64_allocateheap.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) + CMN_CSRCS += arm64_idle.c +endif + ifeq ($(CONFIG_ARM64_GIC_VERSION),3) CMN_CSRCS += arm64_gicv3.c endif