STM32F103-Minimum: Fix a compile error. CONFIG_STM32_TICKLESS_ONESHOT_TIMER is only defined in TICKLESS mode. Somebody has been hand editing .config files.

This commit is contained in:
Gregory Nutt 2017-01-31 12:35:05 -06:00
parent b7d29086e0
commit 97482c9cdc
2 changed files with 55 additions and 15 deletions

View File

@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y
#
# Build Configuration
#
CONFIG_APPS_DIR="../apps"
# CONFIG_APPS_DIR="../apps"
CONFIG_BUILD_FLAT=y
# CONFIG_BUILD_2PASS is not set
@ -61,9 +61,12 @@ CONFIG_ARCH_ARM=y
# CONFIG_ARCH_AVR is not set
# CONFIG_ARCH_HC is not set
# CONFIG_ARCH_MIPS is not set
# CONFIG_ARCH_MISOC is not set
# CONFIG_ARCH_RENESAS is not set
# CONFIG_ARCH_RISCV is not set
# CONFIG_ARCH_SIM is not set
# CONFIG_ARCH_X86 is not set
# CONFIG_ARCH_XTENSA is not set
# CONFIG_ARCH_Z16 is not set
# CONFIG_ARCH_Z80 is not set
CONFIG_ARCH="arm"
@ -103,7 +106,9 @@ CONFIG_ARCH_CHIP_STM32=y
# CONFIG_ARCH_ARM926EJS is not set
# CONFIG_ARCH_ARM920T is not set
# CONFIG_ARCH_CORTEXM0 is not set
# CONFIG_ARCH_CORTEXM23 is not set
CONFIG_ARCH_CORTEXM3=y
# CONFIG_ARCH_CORTEXM33 is not set
# CONFIG_ARCH_CORTEXM4 is not set
# CONFIG_ARCH_CORTEXM7 is not set
# CONFIG_ARCH_CORTEXA5 is not set
@ -347,6 +352,12 @@ CONFIG_STM32_HAVE_ADC3=y
# CONFIG_STM32_HAVE_ADC2_DMA is not set
# CONFIG_STM32_HAVE_ADC3_DMA is not set
# CONFIG_STM32_HAVE_ADC4_DMA is not set
# CONFIG_STM32_HAVE_SDADC1 is not set
# CONFIG_STM32_HAVE_SDADC2 is not set
# CONFIG_STM32_HAVE_SDADC3 is not set
# CONFIG_STM32_HAVE_SDADC1_DMA is not set
# CONFIG_STM32_HAVE_SDADC2_DMA is not set
# CONFIG_STM32_HAVE_SDADC3_DMA is not set
CONFIG_STM32_HAVE_CAN1=y
# CONFIG_STM32_HAVE_CAN2 is not set
# CONFIG_STM32_HAVE_DAC1 is not set
@ -419,7 +430,7 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
#
CONFIG_STM32_ONESHOT=y
# CONFIG_STM32_FREERUN is not set
CONFIG_STM32_TICKLESS_ONESHOT=3
CONFIG_STM32_ONESHOT_MAXTIMERS=1
CONFIG_STM32_TIM2_PWM=y
CONFIG_STM32_TIM2_MODE=0
CONFIG_STM32_TIM2_CHANNEL=2
@ -542,6 +553,9 @@ CONFIG_ARCH_BOARD="stm32f103-minimum"
#
CONFIG_ARCH_HAVE_LEDS=y
CONFIG_ARCH_LEDS=y
CONFIG_ARCH_HAVE_BUTTONS=y
# CONFIG_ARCH_BUTTONS is not set
CONFIG_ARCH_HAVE_IRQBUTTONS=y
#
# Board-Specific Options
@ -580,6 +594,7 @@ CONFIG_PREALLOC_TIMERS=4
#
# Tasks and Scheduling
#
# CONFIG_SPINLOCK is not set
# CONFIG_INIT_NONE is not set
CONFIG_INIT_ENTRYPOINT=y
# CONFIG_INIT_FILEPATH is not set
@ -596,6 +611,8 @@ CONFIG_SCHED_WAITPID=y
#
# CONFIG_MUTEX_TYPES is not set
CONFIG_NPTHREAD_KEYS=4
# CONFIG_PTHREAD_CLEANUP is not set
# CONFIG_CANCELLATION_POINTS is not set
#
# Performance Monitoring
@ -682,6 +699,8 @@ CONFIG_PWM=y
CONFIG_ARCH_HAVE_I2CRESET=y
# CONFIG_I2C is not set
# CONFIG_SPI is not set
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
CONFIG_ARCH_HAVE_SPI_BITORDER=y
# CONFIG_I2S is not set
@ -784,6 +803,7 @@ CONFIG_USART1_2STOP=0
# CONFIG_USBHOST is not set
# CONFIG_HAVE_USBTRACE is not set
# CONFIG_DRIVERS_WIRELESS is not set
# CONFIG_DRIVERS_CONTACTLESS is not set
#
# System Logging
@ -912,11 +932,29 @@ CONFIG_STDIO_BUFFER_SIZE=64
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
# CONFIG_LIBC_DLLFCN is not set
# CONFIG_LIBC_MODLIB is not set
# CONFIG_LIBM is not set
# CONFIG_LIBC_ARCH_MEMCPY is not set
# CONFIG_LIBC_ARCH_MEMCMP is not set
# CONFIG_LIBC_ARCH_MEMMOVE is not set
# CONFIG_LIBC_ARCH_MEMSET is not set
# CONFIG_LIBC_ARCH_STRCHR is not set
# CONFIG_LIBC_ARCH_STRCMP is not set
# CONFIG_LIBC_ARCH_STRCPY is not set
# CONFIG_LIBC_ARCH_STRNCPY is not set
# CONFIG_LIBC_ARCH_STRLEN is not set
# CONFIG_LIBC_ARCH_STRNLEN is not set
# CONFIG_LIBC_ARCH_BZERO is not set
# CONFIG_LIBC_ARCH_ELF is not set
# CONFIG_ARMV7M_MEMCPY is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_LIBC_LONG_LONG is not set
# CONFIG_LIBC_SCANSET is not set
# CONFIG_LIBC_IOCTL_VARIADIC is not set
# CONFIG_LIBC_WCHAR is not set
# CONFIG_LIBC_LOCALE is not set
CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_CR is not set
# CONFIG_EOL_IS_LF is not set
@ -932,8 +970,12 @@ CONFIG_ARCH_LOWPUTC=y
# CONFIG_TIME_EXTENDED is not set
CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_ROMGETC is not set
# CONFIG_MEMCPY_VIK is not set
# CONFIG_MEMSET_OPTSPEED is not set
CONFIG_ARCH_HAVE_TLS=y
# CONFIG_TLS is not set
# CONFIG_LIBC_IPv4_ADDRCONV is not set
# CONFIG_LIBC_IPv6_ADDRCONV is not set
# CONFIG_LIBC_NETDB is not set
#
@ -966,6 +1008,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
#
# Examples
#
# CONFIG_EXAMPLES_BUTTONS is not set
# CONFIG_EXAMPLES_CCTYPE is not set
# CONFIG_EXAMPLES_CHAT is not set
# CONFIG_EXAMPLES_CONFIGDATA is not set
# CONFIG_EXAMPLES_DHCPD is not set
@ -1108,6 +1152,7 @@ CONFIG_NSH_DISABLE_LOSMART=y
# CONFIG_NSH_DISABLE_MOUNT is not set
# CONFIG_NSH_DISABLE_MV is not set
# CONFIG_NSH_DISABLE_MW is not set
CONFIG_NSH_DISABLE_PRINTF=y
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_NSH_DISABLE_PUT is not set
# CONFIG_NSH_DISABLE_PWD is not set
@ -1129,6 +1174,7 @@ CONFIG_NSH_MMCSDMINOR=0
#
# Configure Command Options
#
# CONFIG_NSH_CMDOPT_DD_STATS is not set
CONFIG_NSH_CODECS_BUFSIZE=128
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_NSH_FILEIOSIZE=1024
@ -1158,11 +1204,6 @@ CONFIG_NSH_ARCHINIT=y
#
# CONFIG_PLATFORM_CONFIGDATA is not set
#
# RFID Utilities
#
# CONFIG_RFIDUTILS_PICCTOMXT is not set
#
# System Libraries and NSH Add-Ons
#
@ -1180,6 +1221,7 @@ CONFIG_READLINE_ECHO=y
# CONFIG_READLINE_TABCOMPLETION is not set
# CONFIG_READLINE_CMD_HISTORY is not set
# CONFIG_SYSTEM_SUDOKU is not set
# CONFIG_SYSTEM_SYSTEM is not set
# CONFIG_SYSTEM_TEE is not set
# CONFIG_SYSTEM_UBLOXMODEM is not set
# CONFIG_SYSTEM_VI is not set

View File

@ -63,6 +63,10 @@
#define TONE_PWM_TIMER 2
/* TIMx used to generate oneshot */
#define ONESHOT_TIMER 3
/* Oneshot timer resolution in microseconds */
#define OST_RES 10
@ -79,10 +83,6 @@
# undef HAVE_TONE
#endif
#ifndef CONFIG_STM32_TICKLESS_ONESHOT
# undef HAVE_TONE
#endif
#ifdef HAVE_TONE
/************************************************************************************
@ -123,9 +123,9 @@ int stm32_tone_setup(void)
tone->ops->setup(tone);
tone->ops->start(tone, &info);
/* Initialize ONESHOT Timer (i.e. STM32_TICKLESS_ONESHOT = TIM3) */
/* Initialize ONESHOT Timer */
oneshot = oneshot_initialize(CONFIG_STM32_TICKLESS_ONESHOT, OST_RES);
oneshot = oneshot_initialize(ONESHOT_TIMER, OST_RES);
if (!oneshot)
{
auderr("Failed to initialize ONESHOT Timer!\n");
@ -149,6 +149,4 @@ int stm32_tone_setup(void)
return OK;
}
#else
# error "HAVE_TONE is undefined"
#endif /* HAVE_TONE */