diff --git a/arch/Kconfig b/arch/Kconfig index b667bdbf49..da770d075f 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -610,7 +610,7 @@ config ARCH_IDLE_CUSTOM perhaps or IDLE low power operations. NOTE: As of this writing, this capability is only supported by ARM - architectures. However, the implementation is trivial: If + and MIPS architectures. However, the implementation is trivial: If CONFIG_ARCH_IDLE_CUSTOM is defined, then the default IDLE loop file is not included in the MCU-specific Make.defs file. diff --git a/arch/mips/src/pic32mx/Make.defs b/arch/mips/src/pic32mx/Make.defs index 0202583901..82d7bbcce0 100644 --- a/arch/mips/src/pic32mx/Make.defs +++ b/arch/mips/src/pic32mx/Make.defs @@ -1,7 +1,8 @@ ############################################################################ # arch/mips/src/pic32mx/Make.defs # -# Copyright (C) 2011-2012, 2014-2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012, 2014-2015, 2018 Gregory Nutt. All rights +# reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -41,7 +42,7 @@ HEAD_ASRC = pic32mx-head.S CMN_ASRCS = up_syscall0.S vfork.S CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c +CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_initialize.c CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c @@ -51,6 +52,10 @@ CMN_CSRCS += up_usestack.c up_vfork.c # Configuration dependent common files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + # Use of common/up_etherstub.c is deprecated. The preferred mechanism is to # use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in # up_initialize(). Then this stub would not be needed. diff --git a/arch/mips/src/pic32mz/Make.defs b/arch/mips/src/pic32mz/Make.defs index b9342179eb..878efb39d2 100644 --- a/arch/mips/src/pic32mz/Make.defs +++ b/arch/mips/src/pic32mz/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/mips/src/pic32mz/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ HEAD_ASRC = pic32mz-head.S CMN_ASRCS = up_syscall0.S vfork.S CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c +CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_initialize.c CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c @@ -51,6 +51,10 @@ CMN_CSRCS += up_usestack.c up_vfork.c # Configuration dependent common files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + # Use of common/up_etherstub.c is deprecated. The preferred mechanism is to # use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in # up_initialize(). Then this stub would not be needed.