configs/stm32f4discovery/pm: Configuration converted to use the kconfig-frontends tools
This commit is contained in:
parent
1c2806853a
commit
dd0a0258d9
@ -74,11 +74,11 @@ ifeq ($(CONFIG_NSH_ARCHINIT),y)
|
||||
CSRCS += up_nsh.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PM_CUSTOMINIT),y)
|
||||
ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y)
|
||||
CSRCS += up_pm.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IDLE_CUSTOM),y)
|
||||
ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||
CSRCS += up_idle.c
|
||||
endif
|
||||
|
||||
|
@ -93,7 +93,7 @@ void up_pminitialize(void)
|
||||
|
||||
pm_initialize();
|
||||
|
||||
#if defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
/* Initialize the buttons to wake up the system from low power modes */
|
||||
|
||||
up_pmbuttons();
|
||||
|
@ -943,23 +943,23 @@ Where <subdir> is one of the following:
|
||||
|
||||
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows
|
||||
|
||||
CONFIG_PM_CUSTOMINIT and CONFIG_IDLE_CUSTOM are necessary parts of the
|
||||
CONFIG_ARCH_CUSTOM_PMINIT and CONFIG_ARCH_IDLE_CUSTOM are necessary parts of the
|
||||
PM configuration:
|
||||
|
||||
CONFIG_PM_CUSTOMINIT=y
|
||||
CONFIG_ARCH_CUSTOM_PMINIT=y
|
||||
|
||||
CONFIG_PM_CUSTOMINIT moves the PM initialization from arch/arm/src/stm32/stm32_pminitialiaze.c
|
||||
CONFIG_ARCH_CUSTOM_PMINIT moves the PM initialization from arch/arm/src/stm32/stm32_pminitialiaze.c
|
||||
to configs/stm3210-eval/src/up_pm.c. This allows us to support board-
|
||||
specific PM initialization.
|
||||
|
||||
CONFIG_IDLE_CUSTOM=y
|
||||
CONFIG_ARCH_IDLE_CUSTOM=y
|
||||
|
||||
The bulk of the PM activities occur in the IDLE loop. The IDLE loop is
|
||||
special because it is what runs when there is no other task running. Therefore
|
||||
when the IDLE executes, we can be assure that nothing else is going on; this
|
||||
is the ideal condition for doing reduced power management.
|
||||
|
||||
The configuration CONFIG_IDLE_CUSTOM allows us to "steal" the normal STM32
|
||||
The configuration CONFIG_ARCH_IDLE_CUSTOM allows us to "steal" the normal STM32
|
||||
IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace this with our own
|
||||
custom IDLE loop (at configs/stm3210-eval/src/up_idle.c).
|
||||
|
||||
|
@ -273,8 +273,8 @@ CONFIG_SCHED_ATEXIT=n
|
||||
# (see include/nuttx/power/pm.h for many more standard configuration options)
|
||||
#
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CUSTOMINIT=y
|
||||
CONFIG_IDLE_CUSTOM=y
|
||||
CONFIG_ARCH_CUSTOM_PMINIT=y
|
||||
CONFIG_ARCH_IDLE_CUSTOM=y
|
||||
CONFIG_PM_SLEEP_WAKEUP=n
|
||||
|
||||
#
|
||||
|
@ -76,7 +76,7 @@ ifeq ($(CONFIG_WATCHDOG),y)
|
||||
CSRCS += up_watchdog.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PM_CUSTOMINIT),y)
|
||||
ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y)
|
||||
CSRCS += up_pm.c
|
||||
endif
|
||||
|
||||
@ -84,7 +84,7 @@ ifeq ($(CONFIG_PM_BUTTONS),y)
|
||||
CSRCS += up_pmbuttons.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IDLE_CUSTOM),y)
|
||||
ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||
CSRCS += up_idle.c
|
||||
endif
|
||||
|
||||
|
@ -313,7 +313,7 @@ void up_ledpminitialize(void);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
void up_pmbuttons(void);
|
||||
#endif
|
||||
|
||||
|
@ -93,7 +93,7 @@ void up_pminitialize(void)
|
||||
|
||||
pm_initialize();
|
||||
|
||||
#if defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
/* Initialize the buttons to wake up the system from low power modes */
|
||||
|
||||
up_pmbuttons();
|
||||
|
@ -53,7 +53,7 @@
|
||||
#include "stm32_pm.h"
|
||||
#include "stm3210e-internal.h"
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -316,4 +316,4 @@ void up_pmbuttons(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS) */
|
||||
#endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS) */
|
||||
|
@ -60,7 +60,7 @@ ifeq ($(CONFIG_NSH_LIBRARY),y)
|
||||
CSRCS += stm32_nsh.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IDLE_CUSTOM),y)
|
||||
ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||
CSRCS += stm32_idle.c
|
||||
endif
|
||||
|
||||
|
@ -211,7 +211,7 @@ void stm32_ledpminitialize(void);
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
void stm32_pmbuttons(void);
|
||||
#endif
|
||||
|
||||
|
@ -1485,46 +1485,63 @@ Where <subdir> is one of the following:
|
||||
to test that the board can go into lower and lower states of power usage
|
||||
as a result of inactivity. This configuration is based on the nsh2
|
||||
configuration with modifications for testing power management. This
|
||||
configuration should provide some guideline for power management in your
|
||||
configuration should provide some guidelines for power management in your
|
||||
STM32 application.
|
||||
|
||||
CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
|
||||
NOTES:
|
||||
|
||||
CONFIG_PM_CUSTOMINIT and CONFIG_IDLE_CUSTOM are necessary parts of the
|
||||
PM configuration:
|
||||
1. This configuration uses the mconf-based configuration tool. To
|
||||
change this configuration using that tool, you should:
|
||||
|
||||
CONFIG_PM_CUSTOMINIT=y
|
||||
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
||||
and misc/tools/
|
||||
|
||||
CONFIG_PM_CUSTOMINIT moves the PM initialization from arch/arm/src/stm32/stm32_pminitialiaze.c
|
||||
to configs/stm3210-eval/src/up_pm.c. This allows us to support board-
|
||||
specific PM initialization.
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
CONFIG_IDLE_CUSTOM=y
|
||||
2. Default configuration is Cygwin under windows using the CodeSourcery
|
||||
toolchain:
|
||||
|
||||
The bulk of the PM activities occur in the IDLE loop. The IDLE loop is
|
||||
special because it is what runs when there is no other task running. Therefore
|
||||
when the IDLE executes, we can be assure that nothing else is going on; this
|
||||
is the ideal condition for doing reduced power management.
|
||||
CONFIG_HOST_WINDOWS=y : Windows
|
||||
CONFIG_WINDOWS_CYGWIN=y : Cygwin
|
||||
CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
|
||||
|
||||
The configuration CONFIG_IDLE_CUSTOM allows us to "steal" the normal STM32
|
||||
IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace this with our own
|
||||
custom IDLE loop (at configs/stm3210-eval/src/up_idle.c).
|
||||
3. CONFIG_ARCH_CUSTOM_PMINIT and CONFIG_ARCH_IDLE_CUSTOM are necessary
|
||||
parts of the PM configuration:
|
||||
|
||||
Here are some additional things to note in the configuration:
|
||||
CONFIG_ARCH_CUSTOM_PMINIT=y
|
||||
|
||||
CONFIG_PM_BUTTONS=y
|
||||
CONFIG_ARCH_CUSTOM_PMINIT moves the PM initialization from
|
||||
arch/arm/src/stm32/stm32_pminitialiaze.c to configs/stm3210-eval/src/stm32_pm.c.
|
||||
This allows us to support board-specific PM initialization.
|
||||
|
||||
CONFIG_PM_BUTTONS enables button support for PM testing. Buttons can drive
|
||||
EXTI interrupts and EXTI interrrupts can be used to wakeup for certain reduced
|
||||
power modes (STOP mode). The use of the buttons here is for PM testing purposes
|
||||
only; buttons would normally be part the application code and CONFIG_PM_BUTTONS
|
||||
would not be defined.
|
||||
CONFIG_ARCH_IDLE_CUSTOM=y
|
||||
|
||||
CONFIG_RTC_ALARM=y
|
||||
The bulk of the PM activities occur in the IDLE loop. The IDLE loop
|
||||
is special because it is what runs when there is no other task running.
|
||||
Therefore when the IDLE executes, we can be assure that nothing else
|
||||
is going on; this is the ideal condition for doing reduced power
|
||||
management.
|
||||
|
||||
The RTC alarm is used to wake up from STOP mode and to transition to
|
||||
STANDBY mode. This used of the RTC alarm could conflict with other uses of
|
||||
the RTC alarm in your application.
|
||||
The configuration CONFIG_ARCH_IDLE_CUSTOM allows us to "steal" the
|
||||
normal STM32 IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace
|
||||
this with our own custom IDLE loop (at configs/stm3210-eval/src/up_idle.c).
|
||||
|
||||
4. Here are some additional things to note in the configuration:
|
||||
|
||||
CONFIG_PM_BUTTONS=y
|
||||
|
||||
CONFIG_PM_BUTTONS enables button support for PM testing. Buttons can
|
||||
drive EXTI interrupts and EXTI interrrupts can be used to wakeup for
|
||||
certain reduced power modes (STOP mode). The use of the buttons here
|
||||
is for PM testing purposes only; buttons would normally be part the
|
||||
application code and CONFIG_PM_BUTTONS would not be defined.
|
||||
|
||||
CONFIG_RTC_ALARM=y
|
||||
|
||||
The RTC alarm is used to wake up from STOP mode and to transition to
|
||||
STANDBY mode. This used of the RTC alarm could conflict with other
|
||||
uses of the RTC alarm in your application.
|
||||
|
||||
posix_spawn:
|
||||
------------
|
||||
|
@ -1,67 +0,0 @@
|
||||
############################################################################
|
||||
# configs/stm32f4discovery/pm/appconfig
|
||||
#
|
||||
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Path to example in apps/examples containing the user_start entry point
|
||||
|
||||
CONFIGURED_APPS += examples/nsh
|
||||
|
||||
# The NSH application library
|
||||
|
||||
CONFIGURED_APPS += system/readline
|
||||
CONFIGURED_APPS += nshlib
|
||||
|
||||
# Applications configured as an NX built-in commands
|
||||
|
||||
ifeq ($(CONFIG_ADC),y)
|
||||
CONFIGURED_APPS += examples/adc
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PWM),y)
|
||||
CONFIGURED_APPS += examples/pwm
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_QENCODER),y)
|
||||
CONFIGURED_APPS += examples/qencoder
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_USBDEV),y)
|
||||
ifeq ($(CONFIG_CDCACM),y)
|
||||
CONFIGURED_APPS += system/cdcacm
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WATCHDOG),y)
|
||||
CONFIGURED_APPS += examples/watchdog
|
||||
endif
|
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,7 @@ ifeq ($(CONFIG_NSH_LIBRARY),y)
|
||||
CSRCS += stm32_nsh.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PM_CUSTOMINIT),y)
|
||||
ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y)
|
||||
CSRCS += stm32_pm.c
|
||||
endif
|
||||
|
||||
@ -84,7 +84,7 @@ ifeq ($(CONFIG_PM_BUTTONS),y)
|
||||
CSRCS += stm32_pm_buttons.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IDLE_CUSTOM),y)
|
||||
ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||
CSRCS += stm32_idle.c
|
||||
endif
|
||||
|
||||
|
@ -86,13 +86,13 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void stm32_pminitialize(void)
|
||||
void up_pminitialize(void)
|
||||
{
|
||||
/* Then initialize the NuttX power management subsystem proper */
|
||||
|
||||
pm_initialize();
|
||||
|
||||
#if defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
/* Initialize the buttons to wake up the system from low power modes */
|
||||
|
||||
stm32_pm_buttons();
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "stm32_pm.h"
|
||||
#include "stm32f4discovery.h"
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -145,4 +145,4 @@ void stm32_pm_buttons(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PM && CONFIG_IDLE_CUSTOM && CONFIG_PM_BUTTONS)*/
|
||||
#endif /* CONFIG_PM && CONFIG_ARCH_IDLE_CUSTOM && CONFIG_PM_BUTTONS)*/
|
||||
|
@ -275,7 +275,7 @@ void stm32_led_pminitialize(void);
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
|
||||
void stm32_pm_buttons(void);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user