diff --git a/arch/Kconfig b/arch/Kconfig index 2a63c61d77a..e369753554d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -170,6 +170,38 @@ config ENDIAN_BIG ---help--- Select if architecture operates using big-endian byte ordering. +config ARCH_IDLE_CUSTOM + bool "Custom IDLE loop" + default n + ---help--- + Each architecture provides a "default" IDLE loop that exits when the + MCU has nothing else to do. This default IDLE loop can be replaced + by a custom, board-specific IDLE loop by setting this option. Such + 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. + +config ARCH_CUSTOM_PMINIT + bool "Custom PM initialization" + default n + depends on PM + ---help--- + Each architecture provides default power management (PM) + initialization that is called automatically when the system is + started. This default PM initialization can be replaced by custom, + board-specific PM initialization by setting this option. Such a + custom initialization may do additional PM-related initialization + that is unique to the board power management requirements. + + NOTE: As of this writing, this capability is only supported by the + STM32. However, the implementation is trivial: If CONFIG_ARCH_CUSTOM_PMINIT, + then the default PM initialization is not included in the MCU-specific + Make.defs file. + config ARCH_HAVE_RAMFUNCS bool default n diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs index 7b7a7e8c493..e2d5ea0b14b 100644 --- a/arch/arm/src/lpc43xx/Make.defs +++ b/arch/arm/src/lpc43xx/Make.defs @@ -91,7 +91,7 @@ ifeq ($(CONFIG_NUTTX_KERNEL),y) CHIP_CSRCS += lpc43_userspace.c lpc43_mpuinit.c endif -ifneq ($(CONFIG_IDLE_CUSTOM),y) +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CHIP_CSRCS += lpc43_idle.c endif diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index 47e6a91ccb5..c65a227b5d9 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -132,13 +132,13 @@ CHIP_CSRCS += stm32_otgfshost.c endif endif -ifneq ($(CONFIG_IDLE_CUSTOM),y) +ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CHIP_CSRCS += stm32_idle.c endif CHIP_CSRCS += stm32_pmstop.c stm32_pmstandby.c stm32_pmsleep.c -ifneq ($(CONFIG_PM_CUSTOMINIT),y) +ifneq ($(CONFIG_ARCH_CUSTOM_PMINIT),y) CHIP_CSRCS += stm32_pminitialize.c endif