From bd455c9e46d37145ed11c5b5236f4048ad1b37e3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 7 May 2018 10:13:20 -0600 Subject: [PATCH] arch/arm/src: All ARM architctures now support CONFIG_ARCH_IDLE_CUSTOM --- arch/Kconfig | 8 ++++---- arch/arm/src/a1x/Make.defs | 14 +++++++++----- arch/arm/src/bcm2708/Make.defs | 8 ++++++-- arch/arm/src/c5471/Make.defs | 16 ++++++++++------ arch/arm/src/dm320/Make.defs | 8 ++++++-- arch/arm/src/imx1/Make.defs | 8 ++++++-- arch/arm/src/imx6/Make.defs | 14 +++++++++----- arch/arm/src/imxrt/Make.defs | 10 +++++++--- arch/arm/src/kinetis/Make.defs | 13 ++++++++----- arch/arm/src/kl/Make.defs | 10 ++++++++-- arch/arm/src/lc823450/Make.defs | 15 ++++++++++----- arch/arm/src/lpc11xx/Make.defs | 12 ++++++++---- arch/arm/src/lpc17xx/Make.defs | 8 ++++++-- arch/arm/src/lpc214x/Make.defs | 9 +++++++-- arch/arm/src/lpc2378/Make.defs | 6 +++++- arch/arm/src/lpc31xx/Make.defs | 8 ++++++-- arch/arm/src/moxart/Make.defs | 12 +++++++++--- arch/arm/src/nuc1xx/Make.defs | 10 ++++++++-- arch/arm/src/sam34/Make.defs | 11 +++++++++-- arch/arm/src/sama5/Make.defs | 14 +++++++++----- arch/arm/src/samdl/Make.defs | 12 +++++++++--- arch/arm/src/samv7/Make.defs | 9 +++++++-- arch/arm/src/stm32f0/Make.defs | 11 +++++++---- arch/arm/src/str71x/Make.defs | 6 +++++- arch/arm/src/tiva/Make.defs | 6 +++++- arch/arm/src/tms570/Make.defs | 8 ++++++-- arch/arm/src/xmc4/Make.defs | 10 +++++++--- 27 files changed, 196 insertions(+), 80 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 1d8dab7e18..b667bdbf49 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -609,10 +609,10 @@ config ARCH_IDLE_CUSTOM a custom IDLE loop may do things like a continuous built-in test or perhaps or IDLE low power operations. - NOTE: As of this writing, this capability is only supported by the - STM32. However, the implementation is trivial: If CONFIG_ARCH_IDLE_CUSTOM, - then the default IDLE loop file is not included in the MCU-specific - Make.defs file. + NOTE: As of this writing, this capability is only supported by ARM + 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. config ARCH_CUSTOM_PMINIT bool "Custom PM initialization" diff --git a/arch/arm/src/a1x/Make.defs b/arch/arm/src/a1x/Make.defs index 2697e5363d..60c9502f1f 100644 --- a/arch/arm/src/a1x/Make.defs +++ b/arch/arm/src/a1x/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/a1x/Make.defs # -# Copyright (C) 2013-2014, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -61,10 +61,10 @@ CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all. # Common C source files -CMN_CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_exit.c -CMN_CSRCS += up_createstack.c up_releasestack.c up_usestack.c up_vfork.c -CMN_CSRCS += up_puts.c up_mdelay.c up_stackframe.c up_udelay.c -CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c +CMN_CSRCS = up_initialize.c up_interruptcontext.c up_exit.c up_createstack.c +CMN_CSRCS += up_releasestack.c up_usestack.c up_vfork.c up_puts.c up_mdelay.c +CMN_CSRCS += up_stackframe.c up_udelay.c up_modifyreg8.c up_modifyreg16.c +CMN_CSRCS += up_modifyreg32.c CMN_CSRCS += arm_assert.c arm_blocktask.c arm_copyfullstate.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_mmu.c arm_prefetchabort.c @@ -78,6 +78,10 @@ CMN_CSRCS += up_allocateheap.c # Configuration dependent C and assembly language files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_PAGING),y) CMN_CSRCS += arm_allocpage.c arm_checkmapping.c arm_pginitialize.c CMN_CSRCS += arm_va2pte.c diff --git a/arch/arm/src/bcm2708/Make.defs b/arch/arm/src/bcm2708/Make.defs index f1124f0297..0e9edcde9c 100644 --- a/arch/arm/src/bcm2708/Make.defs +++ b/arch/arm/src/bcm2708/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/bcm2708/Make.defs # -# Copyright (C) 2017 Gregory Nutt. All rights reserved. +# Copyright (C) 2017-2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ CMN_ASRCS += up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S # Common C source files CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c -CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c +CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c @@ -61,6 +61,10 @@ CMN_CSRCS += up_allocateheap.c # Configuration dependent C and assembly language files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_PAGING),y) CMN_CSRCS += up_pginitialize.c up_checkmapping.c up_allocpage.c up_va2pte.c endif diff --git a/arch/arm/src/c5471/Make.defs b/arch/arm/src/c5471/Make.defs index a0c3b9a5b3..b5322e2beb 100644 --- a/arch/arm/src/c5471/Make.defs +++ b/arch/arm/src/c5471/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # c5471/Make.defs # -# Copyright (C) 2007, 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007, 2013-2014, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,11 +39,15 @@ CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S vfork.S CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c up_doirq.c -CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c -CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c -CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c -CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c -CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c +CMN_CSRCS += up_exit.c up_initialize.c up_initialstate.c up_interruptcontext.c +CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c +CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c +CMN_CSRCS += up_stackframe.c up_syscall.c up_unblocktask.c up_undefinedinsn.c +CMN_CSRCS += up_usestack.c up_vfork.c + +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif ifeq ($(CONFIG_STACK_COLORATION),y) CMN_CSRCS += up_checkstack.c diff --git a/arch/arm/src/dm320/Make.defs b/arch/arm/src/dm320/Make.defs index 0c408f6624..0abcb9cccc 100644 --- a/arch/arm/src/dm320/Make.defs +++ b/arch/arm/src/dm320/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # dm320/Make.defs # -# Copyright (C) 2007, 2010, 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007, 2010, 2013-2014, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,13 +39,17 @@ CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S CMN_ASRCS += up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c -CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c +CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_STACK_COLORATION),y) CMN_CSRCS += up_checkstack.c endif diff --git a/arch/arm/src/imx1/Make.defs b/arch/arm/src/imx1/Make.defs index 3a3b245da4..ef9ef5cc4e 100644 --- a/arch/arm/src/imx1/Make.defs +++ b/arch/arm/src/imx1/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/imx1/Make.defs # -# Copyright (C) 2009, 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2009, 2013-2014, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -38,13 +38,17 @@ HEAD_ASRC = up_head.S CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S CMN_ASRCS += up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c -CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c +CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_STACK_COLORATION),y) CMN_CSRCS += up_checkstack.c endif diff --git a/arch/arm/src/imx6/Make.defs b/arch/arm/src/imx6/Make.defs index 3950f54a98..704c7f8dea 100644 --- a/arch/arm/src/imx6/Make.defs +++ b/arch/arm/src/imx6/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/imx6/Make.defs # -# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -64,10 +64,10 @@ CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all. # Common C source files -CMN_CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_exit.c -CMN_CSRCS += up_createstack.c up_releasestack.c up_usestack.c up_vfork.c -CMN_CSRCS += up_puts.c up_mdelay.c up_stackframe.c up_udelay.c -CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c +CMN_CSRCS = up_initialize.c up_interruptcontext.c up_exit.c up_createstack.c +CMN_CSRCS += up_releasestack.c up_usestack.c up_vfork.c up_puts.c up_mdelay.c +CMN_CSRCS += up_stackframe.c up_udelay.c up_modifyreg8.c up_modifyreg16.c +CMN_CSRCS += up_modifyreg32.c CMN_CSRCS += arm_assert.c arm_blocktask.c arm_copyfullstate.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_gicv2.c arm_initialstate.c arm_mmu.c @@ -75,6 +75,10 @@ CMN_CSRCS += arm_prefetchabort.c arm_releasepending.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_syscall.c CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_SMP),y) CMN_CSRCS += arm_cpuindex.c arm_cpustart.c arm_cpupause.c arm_cpuidlestack.c CMN_CSRCS += arm_scu.c diff --git a/arch/arm/src/imxrt/Make.defs b/arch/arm/src/imxrt/Make.defs index 72d3e0a9bd..f327576ece 100644 --- a/arch/arm/src/imxrt/Make.defs +++ b/arch/arm/src/imxrt/Make.defs @@ -86,12 +86,16 @@ endif # Required i.MX RT files CHIP_ASRCS = -CHIP_CSRCS = imxrt_allocateheap.c imxrt_start.c imxrt_clockconfig.c imxrt_idle.c -CHIP_CSRCS += imxrt_irq.c imxrt_clrpend.c imxrt_gpio.c imxrt_wdog.c imxrt_iomuxc.c -CHIP_CSRCS += imxrt_serial.c imxrt_lowputc.c +CHIP_CSRCS = imxrt_allocateheap.c imxrt_start.c imxrt_clockconfig.c +CHIP_CSRCS += imxrt_irq.c imxrt_clrpend.c imxrt_gpio.c imxrt_wdog.c +CHIP_CSRCS += imxrt_iomuxc.c imxrt_serial.c imxrt_lowputc.c # Configuration-dependent i.MX RT files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += imxrt_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += imxrt_timerisr.c endif diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs index 3588299921..12e34b6340 100644 --- a/arch/arm/src/kinetis/Make.defs +++ b/arch/arm/src/kinetis/Make.defs @@ -111,12 +111,15 @@ endif CHIP_ASRCS = CHIP_CSRCS = kinetis_allocateheap.c kinetis_clockconfig.c kinetis_clrpend.c -CHIP_CSRCS += kinetis_idle.c kinetis_irq.c kinetis_lowputc.c kinetis_pin.c -CHIP_CSRCS += kinetis_pingpio.c kinetis_serialinit.c kinetis_start.c -CHIP_CSRCS += kinetis_uid.c kinetis_wdog.c kinetis_cfmconfig.c -CHIP_CSRCS += kinetis_mpuinit.c +CHIP_CSRCS += kinetis_irq.c kinetis_lowputc.c kinetis_pin.c kinetis_pingpio.c +CHIP_CSRCS += kinetis_serialinit.c kinetis_start.c kinetis_uid.c kinetis_wdog.c +CHIP_CSRCS += kinetis_cfmconfig.c kinetis_mpuinit.c -# Configuration-dependent Kinetis files +# Configuration-dependent Kinetis K files + +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += kinetis_idle.c +endif ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += kinetis_timerisr.c diff --git a/arch/arm/src/kl/Make.defs b/arch/arm/src/kl/Make.defs index e2d0046208..2eee8cd602 100644 --- a/arch/arm/src/kl/Make.defs +++ b/arch/arm/src/kl/Make.defs @@ -64,8 +64,14 @@ CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c -CHIP_CSRCS += kl_lowputc.c kl_serial.c kl_start.c kl_cfmconfig.c +CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_irq.c kl_lowputc.c +CHIP_CSRCS += kl_serial.c kl_start.c kl_cfmconfig.c + +# Configuration-dependent Kinetis L files + +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += kl_idle.c +endif ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += kl_timerisr.c diff --git a/arch/arm/src/lc823450/Make.defs b/arch/arm/src/lc823450/Make.defs index cd31416252..e7af3b0ea2 100644 --- a/arch/arm/src/lc823450/Make.defs +++ b/arch/arm/src/lc823450/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/lc823450/Make.defs # -# Copyright 2014,2015,2016,2017 Sony Video & Sound Products Inc. +# Copyright 2014, 2015, 2016, 2017 Sony Video & Sound Products Inc. # Author: Masatoshi Tateishi # Author: Masayuki Ishikawa # Author: Yasuhiro Osaki @@ -83,10 +83,15 @@ endif CHIP_ASRCS = -CHIP_CSRCS = lc823450_start.c lc823450_irq.c lc823450_idle.c -CHIP_CSRCS += lc823450_timer.c lc823450_lowputc.c -CHIP_CSRCS += lc823450_serial.c lc823450_clockconfig.c lc823450_syscontrol.c -CHIP_CSRCS += lc823450_gpio.c +CHIP_CSRCS = lc823450_start.c lc823450_irq.c .c lc823450_timer.c +CHIP_CSRCS += lc823450_lowputc.c lc823450_serial.c lc823450_clockconfig.c +CHIP_CSRCS += lc823450_syscontrol.c lc823450_gpio.c + +# Configuration-dependent LC823450 files + +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += lc823450_idle.c +endif ifeq ($(CONFIG_WATCHDOG),y) CHIP_CSRCS += lc823450_wdt.c diff --git a/arch/arm/src/lpc11xx/Make.defs b/arch/arm/src/lpc11xx/Make.defs index e45cd3e1a0..dbe34a8788 100644 --- a/arch/arm/src/lpc11xx/Make.defs +++ b/arch/arm/src/lpc11xx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/lpc11xx/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -64,12 +64,16 @@ CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = lpc11_clockconfig.c lpc11_gpio.c lpc11_i2c.c lpc11_idle.c -CHIP_CSRCS += lpc11_irq.c lpc11_lowputc.c lpc11_serial.c -CHIP_CSRCS += lpc11_spi.c lpc11_ssp.c lpc11_start.c +CHIP_CSRCS = lpc11_clockconfig.c lpc11_gpio.c lpc11_i2c.c lpc11_irq.c +CHIP_CSRCS += lpc11_lowputc.c lpc11_serial.c lpc11_spi.c lpc11_ssp.c +CHIP_CSRCS += lpc11_start.c # Configuration-dependent LPC11xx files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += lpc11_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += lpc11_timerisr.c endif diff --git a/arch/arm/src/lpc17xx/Make.defs b/arch/arm/src/lpc17xx/Make.defs index e65b0a02dc..e64c6662ef 100644 --- a/arch/arm/src/lpc17xx/Make.defs +++ b/arch/arm/src/lpc17xx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/lpc17xx/Make.defs # -# Copyright (C) 2010-2011, 2013-2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2011, 2013-2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -106,11 +106,15 @@ endif CHIP_ASRCS = CHIP_CSRCS = lpc17_allocateheap.c lpc17_clockconfig.c lpc17_clrpend.c -CHIP_CSRCS += lpc17_gpio.c lpc17_i2c.c lpc17_idle.c lpc17_irq.c lpc17_lowputc.c +CHIP_CSRCS += lpc17_gpio.c lpc17_i2c.c lpc17_irq.c lpc17_lowputc.c CHIP_CSRCS += lpc17_serial.c lpc17_spi.c lpc17_ssp.c lpc17_start.c # Configuration-dependent LPC17xx files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += lpc17_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += lpc17_timerisr.c endif diff --git a/arch/arm/src/lpc214x/Make.defs b/arch/arm/src/lpc214x/Make.defs index d29207e927..ccf6c4c746 100644 --- a/arch/arm/src/lpc214x/Make.defs +++ b/arch/arm/src/lpc214x/Make.defs @@ -1,7 +1,8 @@ ############################################################################## # lpc214x/Make.defs # -# Copyright (C) 2007, 2008, 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007, 2008, 2013-2014, 2018 Gregory Nutt. All rights +# reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -40,12 +41,16 @@ CMN_ASRCS += vfork.S CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c -CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c +CMN_CSRCS += up_exit.c up_initialize.c up_initialstate.c CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_stackframe.c CMN_CSRCS += up_syscall.c up_unblocktask.c up_undefinedinsn.c up_usestack.c CMN_CSRCS += up_lowputs.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifneq ($(CONFIG_DISABLE_SIGNALS),y) CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c endif diff --git a/arch/arm/src/lpc2378/Make.defs b/arch/arm/src/lpc2378/Make.defs index 4926d02c74..b0f1f8b5c3 100644 --- a/arch/arm/src/lpc2378/Make.defs +++ b/arch/arm/src/lpc2378/Make.defs @@ -44,12 +44,16 @@ CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S CMN_ASRCS += vfork.S CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c -CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c +CMN_CSRCS += up_exit.c up_initialize.c up_initialstate.c CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_stackframe.c CMN_CSRCS += up_syscall.c up_unblocktask.c up_undefinedinsn.c CMN_CSRCS += up_usestack.c up_lowputs.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifneq ($(CONFIG_DISABLE_SIGNALS),y) CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c endif diff --git a/arch/arm/src/lpc31xx/Make.defs b/arch/arm/src/lpc31xx/Make.defs index 0077b22a35..cfea841b66 100644 --- a/arch/arm/src/lpc31xx/Make.defs +++ b/arch/arm/src/lpc31xx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/lpc31xx/Make.defs # -# Copyright (C) 2009-2011, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2009-2011, 2014, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,7 +39,7 @@ CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S CMN_ASRCS += up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c -CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c +CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c @@ -47,6 +47,10 @@ CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_PAGING),y) CMN_CSRCS += up_pginitialize.c up_checkmapping.c up_allocpage.c up_va2pte.c endif diff --git a/arch/arm/src/moxart/Make.defs b/arch/arm/src/moxart/Make.defs index f76a29cb0b..93830d8804 100644 --- a/arch/arm/src/moxart/Make.defs +++ b/arch/arm/src/moxart/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/moxart/Make.defs # -# Copyright (C) 2007, 2013-2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2007, 2013-2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Copyright (C) 2011 Stefan Richter. All rights reserved. @@ -50,5 +50,11 @@ CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c up_etherstub.c CHIP_ASRCS = moxart_lowputc.S -CHIP_CSRCS = moxart_16550.c moxart_irq.c moxart_timer.c moxart_idle.c -CHIP_CSRCS += moxart_systemreset.c +CHIP_CSRCS = moxart_16550.c moxart_irq.c moxart_timer.c moxart_systemreset.c + +# Configuration-dependent Kinetis K files + +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += moxart_idle.c +endif + diff --git a/arch/arm/src/nuc1xx/Make.defs b/arch/arm/src/nuc1xx/Make.defs index 4a2164a838..176743f97c 100644 --- a/arch/arm/src/nuc1xx/Make.defs +++ b/arch/arm/src/nuc1xx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/nuc1xx/Make.defs # -# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -64,9 +64,15 @@ CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = nuc_clockconfig.c nuc_gpio.c nuc_idle.c nuc_irq.c nuc_lowputc.c +CHIP_CSRCS = nuc_clockconfig.c nuc_gpio.c nuc_irq.c nuc_lowputc.c CHIP_CSRCS += nuc_serial.c nuc_start.c +# Configuration-dependent NUC1xxfiles + +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += nuc_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += nuc_timerisr.c endif diff --git a/arch/arm/src/sam34/Make.defs b/arch/arm/src/sam34/Make.defs index 12a35528fb..33b88f481e 100644 --- a/arch/arm/src/sam34/Make.defs +++ b/arch/arm/src/sam34/Make.defs @@ -1,7 +1,8 @@ ############################################################################ # arch/arm/src/sam34/Make.defs # -# Copyright (C) 2009-2011, 2013-2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2009-2011, 2013-2015, 2018 Gregory Nutt. All rights +# reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -58,8 +59,10 @@ CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_unblocktask.c up_usestack.c CMN_CSRCS += up_doirq.c up_hardfault.c up_svcall.c up_vfork.c ifneq ($(CONFIG_SMP),y) +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += up_idle.c endif +endif # Configuration-dependent common files @@ -208,6 +211,10 @@ endif # CONFIG_SAM34_TC ifeq ($(CONFIG_SMP),y) CHIP_CSRCS += sam4cm_cpuindex.c sam4cm_cpuidlestack.c -CHIP_CSRCS += sam4cm_cpupause.c sam4cm_cpustart.c sam4cm_idle.c +CHIP_CSRCS += sam4cm_cpupause.c sam4cm_cpustart.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += sam4cm_idle.c +endif endif # CONFIG_SMP + endif # CONFIG_ARCH_CHIP_SAM4CM diff --git a/arch/arm/src/sama5/Make.defs b/arch/arm/src/sama5/Make.defs index 3c447aae1f..23b50d85d1 100644 --- a/arch/arm/src/sama5/Make.defs +++ b/arch/arm/src/sama5/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/sama5/Make.defs # -# Copyright (C) 2013-2014, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -63,10 +63,10 @@ CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all. # Common C source files -CMN_CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_exit.c -CMN_CSRCS += up_createstack.c up_releasestack.c up_usestack.c up_vfork.c -CMN_CSRCS += up_puts.c up_mdelay.c up_stackframe.c up_udelay.c -CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c +CMN_CSRCS = up_initialize.c up_interruptcontext.c up_exit.c up_createstack.c +CMN_CSRCS += up_releasestack.c up_usestack.c up_vfork.c up_puts.c up_mdelay.c +CMN_CSRCS += up_stackframe.c up_udelay.c up_modifyreg8.c up_modifyreg16.c +CMN_CSRCS += up_modifyreg32.c CMN_CSRCS += arm_assert.c arm_blocktask.c arm_copyfullstate.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_mmu.c arm_prefetchabort.c @@ -76,6 +76,10 @@ CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c # Configuration dependent C files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_ARMV7A_L2CC_PL310),y) CMN_CSRCS += arm_l2cc_pl310.c endif diff --git a/arch/arm/src/samdl/Make.defs b/arch/arm/src/samdl/Make.defs index e62eba81f3..386ffa032b 100644 --- a/arch/arm/src/samdl/Make.defs +++ b/arch/arm/src/samdl/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/samdl/Make.defs # -# Copyright (C) 2014-2015, 2017 Gregory Nutt. All rights reserved. +# Copyright (C) 2014-2015, 2017-2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -64,8 +64,10 @@ CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = sam_idle.c sam_irq.c sam_lowputc.c sam_port.c sam_sercom.c -CHIP_CSRCS += sam_serial.c sam_start.c sam_usart.c +CHIP_CSRCS = sam_irq.c sam_lowputc.c sam_port.c sam_sercom.c sam_serial.c +CHIP_CSRCS += sam_start.c sam_usart.c + +# Configuration-dependent SAM D/L files ifeq ($(CONFIG_ARCH_FAMILY_SAMD20),y) CHIP_CSRCS += samd_clockconfig.c samd_gclk.c @@ -75,6 +77,10 @@ else ifeq ($(CONFIG_ARCH_FAMILY_SAML21),y) CHIP_CSRCS += saml_clockconfig.c saml_gclk.c endif +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += sam_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += sam_timerisr.c endif diff --git a/arch/arm/src/samv7/Make.defs b/arch/arm/src/samv7/Make.defs index f7d4f3fb6b..59992530d4 100644 --- a/arch/arm/src/samv7/Make.defs +++ b/arch/arm/src/samv7/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/samv7/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -45,8 +45,9 @@ CMN_UCSRCS = CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S CMN_ASRCS += up_testset.S up_fetchadd.S vfork.S + CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c -CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_idle.c up_initialize.c +CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_initialize.c CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_memfault.c up_modifyreg8.c CMN_CSRCS += up_modifyreg16.c up_modifyreg32.c up_releasepending.c CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c @@ -55,6 +56,10 @@ CMN_CSRCS += up_doirq.c up_hardfault.c up_svcall.c up_vfork.c # Configuration-dependent common files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) CMN_CSRCS += up_stackcheck.c endif diff --git a/arch/arm/src/stm32f0/Make.defs b/arch/arm/src/stm32f0/Make.defs index 408c7b77e8..53333b7bdc 100644 --- a/arch/arm/src/stm32f0/Make.defs +++ b/arch/arm/src/stm32f0/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/stm32f0/Make.defs # -# Copyright (C) 2017 Gregory Nutt. All rights reserved. +# Copyright (C) 2017-2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # Alan Carvalho de Assis # @@ -65,12 +65,15 @@ CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = stm32f0_clockconfig.c stm32f0_gpio.c stm32f0_idle.c -CHIP_CSRCS += stm32f0_irq.c stm32f0_lowputc.c stm32f0_serial.c -CHIP_CSRCS += stm32f0_start.c +CHIP_CSRCS = stm32f0_clockconfig.c stm32f0_gpio.c stm32f0_irq.c +CHIP_CSRCS += stm32f0_lowputc.c stm32f0_serial.c stm32f0_start.c # Configuration-dependent STM32F0xx files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += stm32f0_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += stm32f0_timerisr.c endif diff --git a/arch/arm/src/str71x/Make.defs b/arch/arm/src/str71x/Make.defs index c9d9fc0869..7c0ac47507 100644 --- a/arch/arm/src/str71x/Make.defs +++ b/arch/arm/src/str71x/Make.defs @@ -40,12 +40,16 @@ CMN_ASRCS += vfork.S CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c -CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c +CMN_CSRCS += up_exit.c up_initialize.c up_initialstate.c CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_stackframe.c CMN_CSRCS += up_syscall.c up_unblocktask.c up_undefinedinsn.c up_usestack.c CMN_CSRCS += up_lowputs.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifneq ($(CONFIG_DISABLE_SIGNALS),y) CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c endif diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs index 159d68e208..7db83306bb 100644 --- a/arch/arm/src/tiva/Make.defs +++ b/arch/arm/src/tiva/Make.defs @@ -40,7 +40,7 @@ CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S CMN_ASRCS += up_testset.S up_fetchadd.S vfork.S CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c -CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_idle.c up_initialize.c +CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_initialize.c CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_memfault.c CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c @@ -48,6 +48,10 @@ CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c CMN_CSRCS += up_svcall.c up_vfork.c +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += up_ramvec_initialize.c up_ramvec_attach.c endif diff --git a/arch/arm/src/tms570/Make.defs b/arch/arm/src/tms570/Make.defs index 9960c69146..e7a785084d 100644 --- a/arch/arm/src/tms570/Make.defs +++ b/arch/arm/src/tms570/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/tms570/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -55,7 +55,7 @@ endif # Common C source files -CMN_CSRCS = up_allocateheap.c up_initialize.c up_idle.c up_interruptcontext.c +CMN_CSRCS = up_allocateheap.c up_initialize.c up_interruptcontext.c CMN_CSRCS += up_exit.c up_createstack.c up_releasestack.c up_usestack.c CMN_CSRCS += up_vfork.c up_puts.c up_mdelay.c up_stackframe.c up_udelay.c CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c @@ -68,6 +68,10 @@ CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c # Configuration dependent C files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CMN_CSRCS += up_idle.c +endif + ifeq ($(CONFIG_BUILD_PROTECTED),y) CMN_CSRCS += arm_mpu.c up_task_start.c up_pthread_start.c ifneq ($(CONFIG_DISABLE_SIGNALS),y) diff --git a/arch/arm/src/xmc4/Make.defs b/arch/arm/src/xmc4/Make.defs index 7abb14a9e8..06ca7d54f9 100644 --- a/arch/arm/src/xmc4/Make.defs +++ b/arch/arm/src/xmc4/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/kinetis/Make.defs # -# Copyright (C) 2017 Gregory Nutt. All rights reserved. +# Copyright (C) 2017-2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -111,11 +111,15 @@ endif CHIP_ASRCS = CHIP_CSRCS = xmc4_allocateheap.c xmc4_clockconfig.c xmc4_clockutils.c -CHIP_CSRCS += xmc4_clrpend.c xmc4_idle.c xmc4_irq.c xmc4_lowputc.c -CHIP_CSRCS += xmc4_gpio.c xmc4_serial.c xmc4_start.c xmc4_usic.c +CHIP_CSRCS += xmc4_clrpend.c xmc4_irq.c xmc4_lowputc.c xmc4_gpio.c +CHIP_CSRCS += xmc4_serial.c xmc4_start.c xmc4_usic.c # Configuration-dependent Kinetis files +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) +CHIP_CSRCS += xmc4_idle.c +endif + ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += xmc4_timerisr.c endif