From 0029c04dad88a8e26d0be3cba2a75ce1b59371ec Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 07:33:23 -0600 Subject: [PATCH 01/35] task_restart: Make sure new task starts with pre-emption disabled and not in a critical section. --- sched/task/task_restart.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 068d0a47f7a..36251348ed6 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -164,6 +164,15 @@ int task_restart(pid_t pid) tcb->cmn.sched_priority = tcb->cmn.init_priority; + /* The task should restart with pre-emption disabled and not in a critical + * secton. + */ + + tcb->cmn.lockcount = 0; +#ifdef CONFIG_SMP + tcb->cmn.irqcount = 0; +#endif + /* Reset the base task priority and the number of pending reprioritizations */ #ifdef CONFIG_PRIORITY_INHERITANCE @@ -198,7 +207,9 @@ int task_restart(pid_t pid) } #endif /* CONFIG_SMP */ - /* Activate the task */ + leave_critical_section(flags); + + /* Activate the task. */ ret = task_activate((FAR struct tcb_s *)tcb); if (ret != OK) @@ -208,7 +219,6 @@ int task_restart(pid_t pid) goto errout_with_lock; } - leave_critical_section(flags); return OK; errout_with_lock: From 2d1765a01461b63470717cf1e8e9ddf41e3d4d27 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 07:34:27 -0600 Subject: [PATCH 02/35] Remove more of those annoying empty comment blocks. --- sched/sched/sched_cpuload.c | 12 ------------ sched/task/task_getgroup.c | 20 -------------------- sched/task/task_init.c | 24 ------------------------ sched/task/task_posixspawn.c | 12 ------------ sched/task/task_spawn.c | 16 ---------------- sched/task/task_start.c | 20 -------------------- sched/task/task_starthook.c | 24 ------------------------ 7 files changed, 128 deletions(-) diff --git a/sched/sched/sched_cpuload.c b/sched/sched/sched_cpuload.c index 6cfe027bedb..e78ccf2f087 100644 --- a/sched/sched/sched_cpuload.c +++ b/sched/sched/sched_cpuload.c @@ -65,14 +65,6 @@ # define CPULOAD_TICKSPERSEC CLOCKS_PER_SEC #endif -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Data ****************************************************************************/ @@ -83,10 +75,6 @@ volatile uint32_t g_cpuload_total; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/sched/task/task_getgroup.c b/sched/task/task_getgroup.c index 6b18aaac14a..34f52c2c9cc 100644 --- a/sched/task/task_getgroup.c +++ b/sched/task/task_getgroup.c @@ -47,26 +47,6 @@ #ifdef HAVE_TASK_GROUP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/sched/task/task_init.c b/sched/task/task_init.c index 8583c1ecc3d..42d4e31be45 100644 --- a/sched/task/task_init.c +++ b/sched/task/task_init.c @@ -50,30 +50,6 @@ #include "group/group.h" #include "task/task.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c index a185dd8ae17..9a91ab963b5 100644 --- a/sched/task/task_posixspawn.c +++ b/sched/task/task_posixspawn.c @@ -52,18 +52,6 @@ #include "task/spawn.h" #include "task/task.h" -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c index b2ae31c1f3a..af3051ac5c1 100644 --- a/sched/task/task_spawn.c +++ b/sched/task/task_spawn.c @@ -51,22 +51,6 @@ #ifndef CONFIG_BUILD_KERNEL -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/sched/task/task_start.c b/sched/task/task_start.c index acff33e66cd..262c8f0b729 100644 --- a/sched/task/task_start.c +++ b/sched/task/task_start.c @@ -58,26 +58,6 @@ #define MAX_START_ARGS 256 -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/sched/task/task_starthook.c b/sched/task/task_starthook.c index f102afc0a7c..cc021ca30b2 100644 --- a/sched/task/task_starthook.c +++ b/sched/task/task_starthook.c @@ -45,30 +45,6 @@ #ifdef CONFIG_SCHED_STARTHOOK -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ From 337d0f1050cfce9ff1f2fee9a818b71ad1148ac0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 08:27:51 -0600 Subject: [PATCH 03/35] Fix a typo in a spinlock macro --- include/nuttx/spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index c749d9e329d..65786a0c6d5 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -116,7 +116,7 @@ spinlock_t up_testset(volatile FAR spinlock_t *lock); ****************************************************************************/ /* void spin_initialize(FAR spinlock_t *lock); */ -#define spin_initialize(i) do { (l) = SPI_UNLOCKED; } while (0) +#define spin_initialize(i) do { (l) = SP_UNLOCKED; } while (0) /**************************************************************************** * Name: spin_initializer From 558784d06fbbe00ba695008e978e9596591e1f54 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 11:55:59 -0600 Subject: [PATCH 04/35] Spinlocks: Added capability to provide architecture-specific memory barriers. This was for i.MX6 but does not help with the SMP problems. It is still a good feature. --- arch/arm/include/spinlock.h | 22 +++++++++++++++++ include/nuttx/spinlock.h | 7 ++++-- sched/semaphore/spinlock.c | 47 ++++++++++++++++++++++++++++++++++--- 3 files changed, 71 insertions(+), 5 deletions(-) diff --git a/arch/arm/include/spinlock.h b/arch/arm/include/spinlock.h index 44e405e6303..84800fbf8dc 100644 --- a/arch/arm/include/spinlock.h +++ b/arch/arm/include/spinlock.h @@ -48,9 +48,31 @@ * Pre-processor Definitions ****************************************************************************/ +/* Spinlock states */ + #define SP_UNLOCKED 0 /* The Un-locked state */ #define SP_LOCKED 1 /* The Locked state */ +/* Memory barriers for use with NuttX spinlock logic */ + +#ifndef arm_isb +# define arm_isb(n) __asm__ __volatile__ ("isb " #n : : : "memory") +#endif + +#define SP_ISB() arm_isb(15) + +#ifndef arm_dsb +# define arm_dsb(n) __asm__ __volatile__ ("dsb " #n : : : "memory") +#endif + +#define SP_DSB() arm_dsb(15) + +#ifndef arm_dmb +# define arm_dmb(n) __asm__ __volatile__ ("dmb " #n : : : "memory") +#endif + +#define SP_DMB() arm_dmb(15) + /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 65786a0c6d5..0a9cc88a5ea 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -203,8 +203,11 @@ void spin_lockr(FAR struct spinlock_s *lock); * ****************************************************************************/ -/* void spin_unlock(FAR spinlock_t *lock); */ -#define spin_unlock(l) do { *(l) = SP_UNLOCKED; } while (0) +#ifdef SP_DMB +void spin_unlock(FAR volatile spinlock_t *lock); +#else +# define spin_unlock(l) do { *(l) = SP_UNLOCKED; } while (0) +#endif /**************************************************************************** * Name: spin_unlockr diff --git a/sched/semaphore/spinlock.c b/sched/semaphore/spinlock.c index 79d904e7efc..a3c5225adf4 100644 --- a/sched/semaphore/spinlock.c +++ b/sched/semaphore/spinlock.c @@ -65,6 +65,22 @@ #undef CONFIG_SPINLOCK_LOCKDOWN /* Feature not yet available */ +/* Memory barriers may be provided in arch/spinlock.h + * + * DMB - Data memory barrier. Assures writes are completed to memory. + * DSB - Data syncrhonization barrier. + */ + +#define HAVE_DMB 1 +#ifndef SP_DMB +# define SP_DMB() +# undef HAVE_DMB +#endif + +#ifndef SP_DSB +# define SP_DSB() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -121,12 +137,37 @@ void spin_lock(FAR volatile spinlock_t *lock) { while (up_testset(lock) == SP_LOCKED) { -#if 0 /* Would recurse */ - sched_yield(); -#endif + SP_DSB(); } + + SP_DMB(); } +/**************************************************************************** + * Name: spin_unlock + * + * Description: + * Release one count on a non-reentrant spinlock. + * + * Input Parameters: + * lock - A reference to the spinlock object to unlock. + * + * Returned Value: + * None. + * + * Assumptions: + * Not running at the interrupt level. + * + ****************************************************************************/ + +#ifdef HAVE_DMB +void spin_unlock(FAR volatile spinlock_t *lock) +{ + *lock = SP_UNLOCKED; + SP_DMB(); +} +#endif + /**************************************************************************** * Name: spin_lockr * From f53e48199f0539a891e0b84e0b53d4dfe52939f0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 13:12:43 -0600 Subject: [PATCH 05/35] Simplify and document some macros --- arch/arm/include/spinlock.h | 40 ++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/arch/arm/include/spinlock.h b/arch/arm/include/spinlock.h index 84800fbf8dc..45f26e00065 100644 --- a/arch/arm/include/spinlock.h +++ b/arch/arm/include/spinlock.h @@ -53,25 +53,29 @@ #define SP_UNLOCKED 0 /* The Un-locked state */ #define SP_LOCKED 1 /* The Locked state */ -/* Memory barriers for use with NuttX spinlock logic */ +/* Memory barriers for use with NuttX spinlock logic + * + * Data Memory Barrier (DMB) acts as a memory barrier. It ensures that all + * explicit memory accesses that appear in program order before the DMB + * instruction are observed before any explicit memory accesses that appear + * in program order after the DMB instruction. It does not affect the + * ordering of any other instructions executing on the processor + * + * dmb st - Data memory barrier. Wait for stores to complete. + * + * Data Synchronization Barrier (DSB) acts as a special kind of memory + * barrier. No instruction in program order after this instruction executes + * until this instruction completes. This instruction completes when: (1) All + * explicit memory accesses before this instruction complete, and (2) all + * Cache, Branch predictor and TLB maintenance operations before this + * instruction complete. + * + * dsb sy - Data syncrhonization barrier. Assures that the CPU waits until + * all memory accesses are complete + */ -#ifndef arm_isb -# define arm_isb(n) __asm__ __volatile__ ("isb " #n : : : "memory") -#endif - -#define SP_ISB() arm_isb(15) - -#ifndef arm_dsb -# define arm_dsb(n) __asm__ __volatile__ ("dsb " #n : : : "memory") -#endif - -#define SP_DSB() arm_dsb(15) - -#ifndef arm_dmb -# define arm_dmb(n) __asm__ __volatile__ ("dmb " #n : : : "memory") -#endif - -#define SP_DMB() arm_dmb(15) +#define SP_DSB(n) __asm__ __volatile__ ("dsb sy" : : : "memory") +#define SP_DMB(n) __asm__ __volatile__ ("dmb st" : : : "memory") /**************************************************************************** * Public Types From 130bfa3f6b92a9e219337db929c4860de7568059 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 14:43:56 -0600 Subject: [PATCH 06/35] Remove a assertion condition that appears to rarely cause false-alarm assertions. Teported by Petteri Aimonen --- arch/arm/src/armv7-a/mmu.h | 1 - sched/sched/sched_roundrobin.c | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/src/armv7-a/mmu.h b/arch/arm/src/armv7-a/mmu.h index 9ce8280b732..c84deda6194 100644 --- a/arch/arm/src/armv7-a/mmu.h +++ b/arch/arm/src/armv7-a/mmu.h @@ -513,7 +513,6 @@ * NMRR registers. For the simple case where TEX[2:0] = 0b000, the control * is as follows: * - * * MEMORY INNER OUTER OUTER SHAREABLE * C B TYPE CACHEABILITY CACHEABILITY ATTRIBUTE * - - ---------- ------------- ------------ ----------------- diff --git a/sched/sched/sched_roundrobin.c b/sched/sched/sched_roundrobin.c index bf856004d67..9aa5a6b8edf 100644 --- a/sched/sched/sched_roundrobin.c +++ b/sched/sched/sched_roundrobin.c @@ -105,23 +105,20 @@ uint32_t sched_roundrobin_process(FAR struct tcb_s *tcb, uint32_t ticks, /* How much can we decrement the timeslice delay? If 'ticks' is greater * than the timeslice value, then we ignore any excess amount. * - * 'ticks' should never be greater than the remaining timeslice. We try - * to handle that gracefully but it would be an error in the scheduling - * if there ever were the case. + * 'ticks' should not be greater than the remaining timeslice. But that + * event seems to be possible, perhaps in cases where pre-emption has been + * disabled or the noswitches flag is set. This might cause jitter of a + * few ticks in the slicing because the excess amount is not handled. */ - DEBUGASSERT(tcb != NULL && ticks <= tcb->timeslice); + DEBUGASSERT(tcb != NULL); decr = MIN(tcb->timeslice, ticks); /* Decrement the timeslice counter */ tcb->timeslice -= decr; - /* Did decrementing the timeslice counter cause the timeslice to expire? - * - * If the task has pre-emption disabled. Then we will let the timeslice - * count go negative as a indication of this situation. - */ + /* Did decrementing the timeslice counter cause the timeslice to expire? */ ret = tcb->timeslice; if (tcb->timeslice <= 0 && !sched_islocked(tcb)) From ef1fc550b7969daa8254b0888bf98601bcfd238d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Nov 2016 15:05:54 -0600 Subject: [PATCH 07/35] Refresh viewtool configurations --- configs/viewtool-stm32f107/highpri/defconfig | 19 +++++++++++++++++ configs/viewtool-stm32f107/nsh/defconfig | 22 ++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/configs/viewtool-stm32f107/highpri/defconfig b/configs/viewtool-stm32f107/highpri/defconfig index be27c3afcf9..81e2ca9c17b 100644 --- a/configs/viewtool-stm32f107/highpri/defconfig +++ b/configs/viewtool-stm32f107/highpri/defconfig @@ -65,10 +65,13 @@ 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_RGMP 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" @@ -357,6 +360,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=y @@ -685,6 +694,8 @@ CONFIG_DEV_NULL=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 @@ -692,6 +703,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # Timer Driver Support # # CONFIG_TIMER is not set +# CONFIG_ONESHOT is not set # CONFIG_RTC is not set # CONFIG_WATCHDOG is not set # CONFIG_ANALOG is not set @@ -783,6 +795,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 @@ -882,6 +895,8 @@ CONFIG_LIB_HOMEDIR="/" # CONFIG_LIBC_FLOATINGPOINT is not set CONFIG_LIBC_LONG_LONG=y # 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 @@ -927,7 +942,9 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # +# CONFIG_EXAMPLES_ARCHBUTTONS is not set # 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 @@ -996,6 +1013,7 @@ CONFIG_ARCH_HAVE_TLS=y # # CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_MINIBASIC is not set # CONFIG_INTERPRETERS_PCODE is not set # @@ -1040,6 +1058,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_TEE is not set # CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/viewtool-stm32f107/nsh/defconfig b/configs/viewtool-stm32f107/nsh/defconfig index 8de03f07146..1baa61b9fc9 100644 --- a/configs/viewtool-stm32f107/nsh/defconfig +++ b/configs/viewtool-stm32f107/nsh/defconfig @@ -65,10 +65,13 @@ 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_RGMP 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" @@ -357,6 +360,12 @@ CONFIG_STM32_HAVE_ADC2=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=y CONFIG_STM32_HAVE_DAC1=y @@ -389,6 +398,7 @@ CONFIG_STM32_PWR=y # CONFIG_STM32_SPI1 is not set # CONFIG_STM32_SPI2 is not set # CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y # CONFIG_STM32_TIM1 is not set # CONFIG_STM32_TIM2 is not set # CONFIG_STM32_TIM3 is not set @@ -530,6 +540,7 @@ CONFIG_RAM_SIZE=65536 # CONFIG_ARCH_BOARD_CLOUDCTRL is not set # CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set # CONFIG_ARCH_BOARD_SHENZHOU is not set +# CONFIG_ARCH_BOARD_STM32_BUTTERFLY2 is not set CONFIG_ARCH_BOARD_VIEWTOOL_STM32F107=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="viewtool-stm32f107" @@ -680,6 +691,8 @@ CONFIG_DEV_NULL=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 @@ -687,6 +700,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # Timer Driver Support # # CONFIG_TIMER is not set +# CONFIG_ONESHOT is not set # CONFIG_RTC is not set # CONFIG_WATCHDOG is not set # CONFIG_ANALOG is not set @@ -778,6 +792,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 @@ -878,6 +893,8 @@ CONFIG_LIB_HOMEDIR="/" # CONFIG_LIBC_FLOATINGPOINT is not set CONFIG_LIBC_LONG_LONG=y # 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 @@ -928,7 +945,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # +# CONFIG_EXAMPLES_ARCHBUTTONS is not set # 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 @@ -998,6 +1017,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_MINIBASIC is not set # CONFIG_INTERPRETERS_PCODE is not set # @@ -1069,6 +1089,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 @@ -1136,6 +1157,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_TEE is not set # CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set From dfa2d107b2863d3860cc1dc608cab037ecd4f822 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Tue, 22 Nov 2016 06:26:32 -0600 Subject: [PATCH 08/35] The examples/qencoder app was trying to init the encoder by a direct call into the board, cheating in a local header to declare the normally unavailable function prototype. --- configs/mikroe-stm32f4/src/mikroe-stm32f4.h | 14 ++- configs/mikroe-stm32f4/src/stm32_appinit.c | 29 +++--- configs/mikroe-stm32f4/src/stm32_qencoder.c | 98 ++----------------- configs/nucleo-f4x1re/src/nucleo-f4x1re.h | 14 ++- configs/nucleo-f4x1re/src/stm32_appinit.c | 31 +++--- configs/nucleo-f4x1re/src/stm32_qencoder.c | 94 ++---------------- configs/nucleo-l476rg/src/nucleo-l476rg.h | 12 +++ configs/nucleo-l476rg/src/stm32_appinit.c | 13 +++ configs/nucleo-l476rg/src/stm32_qencoder.c | 92 ++--------------- configs/stm32f3discovery/src/stm32_appinit.c | 19 +++- configs/stm32f3discovery/src/stm32_qencoder.c | 98 ++----------------- .../stm32f3discovery/src/stm32f3discovery.h | 14 ++- configs/stm32f4discovery/src/stm32_bringup.c | 13 +++ configs/stm32f4discovery/src/stm32_qencoder.c | 92 ++--------------- .../stm32f4discovery/src/stm32f4discovery.h | 14 ++- configs/stm32ldiscovery/src/stm32_appinit.c | 29 ++++-- configs/stm32ldiscovery/src/stm32_qencoder.c | 95 ++---------------- configs/stm32ldiscovery/src/stm32ldiscovery.h | 14 ++- 18 files changed, 225 insertions(+), 560 deletions(-) diff --git a/configs/mikroe-stm32f4/src/mikroe-stm32f4.h b/configs/mikroe-stm32f4/src/mikroe-stm32f4.h index 473d0a61fbc..20158043edd 100644 --- a/configs/mikroe-stm32f4/src/mikroe-stm32f4.h +++ b/configs/mikroe-stm32f4/src/mikroe-stm32f4.h @@ -1,7 +1,7 @@ /**************************************************************************************************** * configs/mikroe-stm32f4/src/mikroe-stm32f4.h * - * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -240,6 +240,18 @@ void weak_function stm32_usbinitialize(void); # error "The Mikroe-STM32F4 board does not support HOST OTG, only device!" #endif +/**************************************************************************** + * Name: stm32_qencoder_initialize + * + * Description: + * Initialize and register a qencoder + * + ****************************************************************************/ + +#ifdef CONFIG_QENCODER +int stm32_qencoder_initialize(FAR const char *devpath, int timer); +#endif + /**************************************************************************************************** * Name: stm32_lcdinitialize * diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index 5cb5d176651..cfc907dd03e 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -180,11 +180,7 @@ int board_app_initialize(uintptr_t arg) FAR struct spi_dev_s *spi; FAR struct mtd_dev_s *mtd; #endif -#if defined(NSH_HAVEMMCSD) || defined(HAVE_USBHOST) || \ - defined(HAVE_USBMONITOR) || defined(CONFIG_LCD_MIO283QT2) || \ - defined(CONFIG_LCD_MIO283QT9A) - int ret; -#endif + int ret = OK; /* Configure SPI-based devices */ @@ -367,13 +363,24 @@ int board_app_initialize(uintptr_t arg) #endif - /* Configure the Audio sub-system if enabled and bind it to SPI 3 */ - -#ifdef CONFIG_AUDIO - - up_vs1053initialize(spi); +#ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ + ret = stm32_qencoder_initialize("/dev/qe0", 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } #endif - return OK; +#ifdef CONFIG_AUDIO + /* Configure the Audio sub-system if enabled and bind it to SPI 3 */ + + up_vs1053initialize(spi); +#endif + + return ret; } diff --git a/configs/mikroe-stm32f4/src/stm32_qencoder.c b/configs/mikroe-stm32f4/src/stm32_qencoder.c index 33855fbaf5c..43b45729e8f 100644 --- a/configs/mikroe-stm32f4/src/stm32_qencoder.c +++ b/configs/mikroe-stm32f4/src/stm32_qencoder.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/mikroe_stm32f4/src/stm32_qencoder.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,83 +50,12 @@ #include "stm32_qencoder.h" #include "mikroe-stm32f4.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Check if we have a timer configured for quadrature encoder -- assume YES. */ - -#define HAVE_QENCODER 1 - -/* If TIMn is not enabled (via CONFIG_STM32_TIMn), then the configuration cannot - * specify TIMn as a quadrature encoder (via CONFIG_STM32_TIMn_QE). - */ - -#ifndef CONFIG_STM32_TIM1 -# undef CONFIG_STM32_TIM1_QE -#endif -#ifndef CONFIG_STM32_TIM2 -# undef CONFIG_STM32_TIM2_QE -#endif -#ifndef CONFIG_STM32_TIM3 -# undef CONFIG_STM32_TIM3_QE -#endif -#ifndef CONFIG_STM32_TIM4 -# undef CONFIG_STM32_TIM4_QE -#endif -#ifndef CONFIG_STM32_TIM5 -# undef CONFIG_STM32_TIM5_QE -#endif -#ifndef CONFIG_STM32_TIM8 -# undef CONFIG_STM32_TIM8_QE -#endif - -/* If the upper-half quadrature encoder driver is not enabled, then we cannot - * support the quadrature encoder. - */ - -#ifndef CONFIG_QENCODER -# undef HAVE_QENCODER -#endif - -/* Which Timer should we use, TIMID={1,2,3,4,5,8}. If multiple timers are - * configured as quadrature encoders, this logic will arbitrarily select - * the lowest numbered timer. - * - * At least one TIMn, n={1,2,3,4,5,8}, must be both enabled and configured - * as a quadrature encoder in order to support the lower half quadrature - * encoder driver. The above check assures that if CONFIG_STM32_TIMn_QE - * is defined, then the correspdonding TIMn is also enabled. - */ - -#if defined CONFIG_STM32_TIM1_QE -# define TIMID 1 -#elif defined CONFIG_STM32_TIM2_QE -# define TIMID 2 -#elif defined CONFIG_STM32_TIM3_QE -# define TIMID 3 -#elif defined CONFIG_STM32_TIM4_QE -# define TIMID 4 -#elif defined CONFIG_STM32_TIM5_QE -# define TIMID 5 -#elif defined CONFIG_STM32_TIM8_QE -# define TIMID 8 -#else -# undef HAVE_QENCODER -#endif - -#ifdef HAVE_QENCODER - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ /************************************************************************************ - * Name: qe_devinit + * Name: stm32_qencoder_initialize * * Description: * All STM32 architectures must provide the following interface to work with @@ -134,29 +63,20 @@ * ************************************************************************************/ -int qe_devinit(void) +int stm32_qencoder_initialize(FAR const char *devpath, int timer) { - static bool initialized = false; int ret; - /* Check if we are already initialized */ + /* Initialize a quadrature encoder interface. */ - if (!initialized) + sninfo("Initializing the quadrature encoder using TIM%d\n", timer); + ret = stm32_qeinitialize(devpath, timer); + if (ret < 0) { - /* Initialize a quadrature encoder interface. */ - - sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); - ret = stm32_qeinitialize("/dev/qe0", TIMID); - if (ret < 0) - { - snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); - return ret; - } - - initialized = true; + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); } - return OK; + return ret; } #endif /* HAVE_QENCODER */ diff --git a/configs/nucleo-f4x1re/src/nucleo-f4x1re.h b/configs/nucleo-f4x1re/src/nucleo-f4x1re.h index 21e5f7b09d2..14d1c042c62 100644 --- a/configs/nucleo-f4x1re/src/nucleo-f4x1re.h +++ b/configs/nucleo-f4x1re/src/nucleo-f4x1re.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/nucleo-f4x1re/src/nucleo-f4x1re.h * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Authors: Frank Bennett * Gregory Nutt * @@ -320,6 +320,18 @@ void stm32_usbinitialize(void); int board_adc_initialize(void); #endif +/**************************************************************************** + * Name: stm32_qencoder_initialize + * + * Description: + * Initialize and register a qencoder + * + ****************************************************************************/ + +#ifdef CONFIG_QENCODER +int stm32_qencoder_initialize(FAR const char *devpath, int timer); +#endif + /**************************************************************************** * Name: board_ajoy_initialize * diff --git a/configs/nucleo-f4x1re/src/stm32_appinit.c b/configs/nucleo-f4x1re/src/stm32_appinit.c index 97cbc4ffc48..06df903438b 100644 --- a/configs/nucleo-f4x1re/src/stm32_appinit.c +++ b/configs/nucleo-f4x1re/src/stm32_appinit.c @@ -55,18 +55,6 @@ #include "nucleo-f4x1re.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -112,9 +100,7 @@ void up_netinitialize(void) int board_app_initialize(uintptr_t arg) { -#if defined(HAVE_MMCSD) || defined(CONFIG_AJOYSTICK) - int ret; -#endif + int ret = OK; /* Configure CPU load estimation */ @@ -153,6 +139,19 @@ int board_app_initialize(uintptr_t arg) syslog(LOG_INFO, "[boot] Initialized SDIO\n"); #endif +#ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ + + ret = stm32_qencoder_initialize("/dev/qe0", 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + #ifdef CONFIG_AJOYSTICK /* Initialize and register the joystick driver */ @@ -166,5 +165,5 @@ int board_app_initialize(uintptr_t arg) } #endif - return OK; + return ret; } diff --git a/configs/nucleo-f4x1re/src/stm32_qencoder.c b/configs/nucleo-f4x1re/src/stm32_qencoder.c index 6d729328440..bac52a803e4 100644 --- a/configs/nucleo-f4x1re/src/stm32_qencoder.c +++ b/configs/nucleo-f4x1re/src/stm32_qencoder.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f4discovery/src/stm32_qencoder.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,79 +50,12 @@ #include "stm32_qencoder.h" #include "nucleo-f4x1re.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Check if we have a timer configured for quadrature encoder -- assume YES. */ - -#define HAVE_QENCODER 1 - -/* If TIMn is not enabled (via CONFIG_STM32_TIMn), then the configuration cannot - * specify TIMn as a quadrature encoder (via CONFIG_STM32_TIMn_QE). - */ - -#ifndef CONFIG_STM32_TIM1 -# undef CONFIG_STM32_TIM1_QE -#endif -#ifndef CONFIG_STM32_TIM2 -# undef CONFIG_STM32_TIM2_QE -#endif -#ifndef CONFIG_STM32_TIM3 -# undef CONFIG_STM32_TIM3_QE -#endif -#ifndef CONFIG_STM32_TIM4 -# undef CONFIG_STM32_TIM4_QE -#endif -#ifndef CONFIG_STM32_TIM5 -# undef CONFIG_STM32_TIM5_QE -#endif -#ifndef CONFIG_STM32_TIM8 -# undef CONFIG_STM32_TIM8_QE -#endif - -/* If the upper-half quadrature encoder driver is not enabled, then we cannot - * support the quadrature encoder. - */ - -#ifndef CONFIG_QENCODER -# undef HAVE_QENCODER -#endif - -/* Which Timer should we use, TIMID={1,2,3,4,5,8}. If multiple timers are - * configured as quadrature encoders, this logic will arbitrarily select - * the lowest numbered timer. - * - * At least one TIMn, n={1,2,3,4,5,8}, must be both enabled and configured - * as a quadrature encoder in order to support the lower half quadrature - * encoder driver. The above check assures that if CONFIG_STM32_TIMn_QE - * is defined, then the correspdonding TIMn is also enabled. - */ - -#if defined CONFIG_STM32_TIM1_QE -# define TIMID 1 -#elif defined CONFIG_STM32_TIM2_QE -# define TIMID 2 -#elif defined CONFIG_STM32_TIM3_QE -# define TIMID 3 -#elif defined CONFIG_STM32_TIM4_QE -# define TIMID 4 -#elif defined CONFIG_STM32_TIM5_QE -# define TIMID 5 -#elif defined CONFIG_STM32_TIM8_QE -# define TIMID 8 -#else -# undef HAVE_QENCODER -#endif - -#ifdef HAVE_QENCODER - /************************************************************************************ * Public Functions ************************************************************************************/ /************************************************************************************ - * Name: qe_devinit + * Name: stm32_qencoder_initialize * * Description: * All STM32 architectures must provide the following interface to work with @@ -130,29 +63,20 @@ * ************************************************************************************/ -int qe_devinit(void) +int stm32_qencoder_initialize(FAR const char *devpath, int timer) { - static bool initialized = false; int ret; - /* Check if we are already initialized */ + /* Initialize a quadrature encoder interface. */ - if (!initialized) + sninfo("Initializing the quadrature encoder using TIM%d\n", timer); + ret = stm32_qeinitialize(devpath, timer); + if (ret < 0) { - /* Initialize a quadrature encoder interface. */ - - sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); - ret = stm32_qeinitialize("/dev/qe0", TIMID); - if (ret < 0) - { - snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); - return ret; - } - - initialized = true; + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); } - return OK; + return ret; } #endif /* HAVE_QENCODER */ diff --git a/configs/nucleo-l476rg/src/nucleo-l476rg.h b/configs/nucleo-l476rg/src/nucleo-l476rg.h index 50151a3fe5a..53915d03934 100644 --- a/configs/nucleo-l476rg/src/nucleo-l476rg.h +++ b/configs/nucleo-l476rg/src/nucleo-l476rg.h @@ -363,4 +363,16 @@ int board_ajoy_initialize(void); int board_timer_driver_initialize(FAR const char *devpath, int timer); #endif +/**************************************************************************** + * Name: stm32l4_qencoder_initialize + * + * Description: + * Initialize and register a qencoder + * + ****************************************************************************/ + +#ifdef CONFIG_QENCODER +int stm32l4_qencoder_initialize(FAR const char *devpath, int timer); +#endif + #endif /* __CONFIGS_NUCLEO_L476RG_SRC_NUCLEO_L476RG_H */ diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index bb134ee6aa3..6b279bd7a52 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -218,6 +218,19 @@ int board_app_initialize(uintptr_t arg) } #endif +#ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ + + ret = stm32l4_qencoder_initialize("/dev/qe0", 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + return OK; } diff --git a/configs/nucleo-l476rg/src/stm32_qencoder.c b/configs/nucleo-l476rg/src/stm32_qencoder.c index 308b6744770..d12f077ef07 100644 --- a/configs/nucleo-l476rg/src/stm32_qencoder.c +++ b/configs/nucleo-l476rg/src/stm32_qencoder.c @@ -53,73 +53,6 @@ #include "stm32l4_qencoder.h" #include "nucleo-l476rg.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Check if we have a timer configured for quadrature encoder -- assume YES. */ - -#define HAVE_QENCODER 1 - -/* If TIMn is not enabled (via CONFIG_STM32L4_TIMn), then the configuration cannot - * specify TIMn as a quadrature encoder (via CONFIG_STM32L4_TIMn_QE). - */ - -#ifndef CONFIG_STM32L4_TIM1 -# undef CONFIG_STM32L4_TIM1_QE -#endif -#ifndef CONFIG_STM32L4_TIM2 -# undef CONFIG_STM32L4_TIM2_QE -#endif -#ifndef CONFIG_STM32L4_TIM3 -# undef CONFIG_STM32L4_TIM3_QE -#endif -#ifndef CONFIG_STM32L4_TIM4 -# undef CONFIG_STM32L4_TIM4_QE -#endif -#ifndef CONFIG_STM32L4_TIM5 -# undef CONFIG_STM32L4_TIM5_QE -#endif -#ifndef CONFIG_STM32L4_TIM8 -# undef CONFIG_STM32L4_TIM8_QE -#endif - -/* If the upper-half quadrature encoder driver is not enabled, then we cannot - * support the quadrature encoder. - */ - -#ifndef CONFIG_QENCODER -# undef HAVE_QENCODER -#endif - -/* Which Timer should we use, TIMID={1,2,3,4,5,8}. If multiple timers are - * configured as quadrature encoders, this logic will arbitrarily select - * the lowest numbered timer. - * - * At least one TIMn, n={1,2,3,4,5,8}, must be both enabled and configured - * as a quadrature encoder in order to support the lower half quadrature - * encoder driver. The above check assures that if CONFIG_STM32L4_TIMn_QE - * is defined, then the correspdonding TIMn is also enabled. - */ - -#if defined CONFIG_STM32L4_TIM1_QE -# define TIMID 1 -#elif defined CONFIG_STM32L4_TIM2_QE -# define TIMID 2 -#elif defined CONFIG_STM32L4_TIM3_QE -# define TIMID 3 -#elif defined CONFIG_STM32L4_TIM4_QE -# define TIMID 4 -#elif defined CONFIG_STM32L4_TIM5_QE -# define TIMID 5 -#elif defined CONFIG_STM32L4_TIM8_QE -# define TIMID 8 -#else -# undef HAVE_QENCODER -#endif - -#ifdef HAVE_QENCODER - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -133,29 +66,18 @@ * ************************************************************************************/ -int qe_devinit(void) +int stm32l4_qencoder_initialize(FAR const char *devpath, int timer) { - static bool initialized = false; int ret; - /* Check if we are already initialized */ + /* Initialize a quadrature encoder interface. */ - if (!initialized) + sninfo("Initializing the quadrature encoder using TIM%d\n", timer); + ret = stm32l4_qeinitialize(devpath, timer); + if (ret < 0) { - /* Initialize a quadrature encoder interface. */ - - sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); - ret = stm32l4_qeinitialize("/dev/qe0", TIMID); - if (ret < 0) - { - snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); - return ret; - } - - initialized = true; + snerr("ERROR: stm32l4_qeinitialize failed: %d\n", ret); } - return OK; + return ret; } - -#endif /* HAVE_QENCODER */ diff --git a/configs/stm32f3discovery/src/stm32_appinit.c b/configs/stm32f3discovery/src/stm32_appinit.c index c95837c9c52..d4726c22b74 100644 --- a/configs/stm32f3discovery/src/stm32_appinit.c +++ b/configs/stm32f3discovery/src/stm32_appinit.c @@ -115,9 +115,9 @@ int board_app_initialize(uintptr_t arg) { -#ifdef HAVE_USBMONITOR - int ret; + int ret = OK; +#ifdef HAVE_USBMONITOR /* Start the USB Monitor */ ret = usbmonitor_start(); @@ -127,5 +127,18 @@ int board_app_initialize(uintptr_t arg) } #endif - return OK; +#ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ + + ret = stm32_qencoder_initialize("/dev/qe0", 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + + return ret; } diff --git a/configs/stm32f3discovery/src/stm32_qencoder.c b/configs/stm32f3discovery/src/stm32_qencoder.c index d4fa6051cc5..76697af9809 100644 --- a/configs/stm32f3discovery/src/stm32_qencoder.c +++ b/configs/stm32f3discovery/src/stm32_qencoder.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f3discovery/src/stm32_qencoder.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,83 +50,12 @@ #include "stm32_qencoder.h" #include "stm32f3discovery.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Check if we have a timer configured for quadrature encoder -- assume YES. */ - -#define HAVE_QENCODER 1 - -/* If TIMn is not enabled (via CONFIG_STM32_TIMn), then the configuration cannot - * specify TIMn as a quadrature encoder (via CONFIG_STM32_TIMn_QE). - */ - -#ifndef CONFIG_STM32_TIM1 -# undef CONFIG_STM32_TIM1_QE -#endif -#ifndef CONFIG_STM32_TIM2 -# undef CONFIG_STM32_TIM2_QE -#endif -#ifndef CONFIG_STM32_TIM3 -# undef CONFIG_STM32_TIM3_QE -#endif -#ifndef CONFIG_STM32_TIM4 -# undef CONFIG_STM32_TIM4_QE -#endif -#ifndef CONFIG_STM32_TIM5 -# undef CONFIG_STM32_TIM5_QE -#endif -#ifndef CONFIG_STM32_TIM8 -# undef CONFIG_STM32_TIM8_QE -#endif - -/* If the upper-half quadrature encoder driver is not enabled, then we cannot - * support the quadrature encoder. - */ - -#ifndef CONFIG_QENCODER -# undef HAVE_QENCODER -#endif - -/* Which Timer should we use, TIMID={1,2,3,4,5,8}. If multiple timers are - * configured as quadrature encoders, this logic will arbitrarily select - * the lowest numbered timer. - * - * At least one TIMn, n={1,2,3,4,5,8}, must be both enabled and configured - * as a quadrature encoder in order to support the lower half quadrature - * encoder driver. The above check assures that if CONFIG_STM32_TIMn_QE - * is defined, then the correspdonding TIMn is also enabled. - */ - -#if defined CONFIG_STM32_TIM1_QE -# define TIMID 1 -#elif defined CONFIG_STM32_TIM2_QE -# define TIMID 2 -#elif defined CONFIG_STM32_TIM3_QE -# define TIMID 3 -#elif defined CONFIG_STM32_TIM4_QE -# define TIMID 4 -#elif defined CONFIG_STM32_TIM5_QE -# define TIMID 5 -#elif defined CONFIG_STM32_TIM8_QE -# define TIMID 8 -#else -# undef HAVE_QENCODER -#endif - -#ifdef HAVE_QENCODER - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ /************************************************************************************ - * Name: qe_devinit + * Name: stm32_qencoder_initialize * * Description: * All STM32 architectures must provide the following interface to work with @@ -134,29 +63,20 @@ * ************************************************************************************/ -int qe_devinit(void) +int stm32_qencoder_initialize(FAR const char *devpath, int timer) { - static bool initialized = false; int ret; - /* Check if we are already initialized */ + /* Initialize a quadrature encoder interface. */ - if (!initialized) + sninfo("Initializing the quadrature encoder using TIM%d\n", timer); + ret = stm32_qeinitialize(devpath, timer); + if (ret < 0) { - /* Initialize a quadrature encoder interface. */ - - sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); - ret = stm32_qeinitialize("/dev/qe0", TIMID); - if (ret < 0) - { - snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); - return ret; - } - - initialized = true; + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); } - return OK; + return ret; } #endif /* HAVE_QENCODER */ diff --git a/configs/stm32f3discovery/src/stm32f3discovery.h b/configs/stm32f3discovery/src/stm32f3discovery.h index eb35061c01c..5b2e2626a09 100644 --- a/configs/stm32f3discovery/src/stm32f3discovery.h +++ b/configs/stm32f3discovery/src/stm32f3discovery.h @@ -2,7 +2,7 @@ * configs/stm32f3discovery/src/stm32f3discovery.h * arch/arm/src/board/stm32f3discovery.n * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -162,6 +162,18 @@ void weak_function stm32_spidev_initialize(void); void weak_function stm32_usbinitialize(void); #endif +/**************************************************************************** + * Name: stm32_qencoder_initialize + * + * Description: + * Initialize and register a qencoder + * + ****************************************************************************/ + +#ifdef CONFIG_QENCODER +int stm32_qencoder_initialize(FAR const char *devpath, int timer); +#endif + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_STM32F3DISCOVERY_SRC_STM32F3DISCOVERY_H */ diff --git a/configs/stm32f4discovery/src/stm32_bringup.c b/configs/stm32f4discovery/src/stm32_bringup.c index d0b002bb33d..7805a71e05b 100644 --- a/configs/stm32f4discovery/src/stm32_bringup.c +++ b/configs/stm32f4discovery/src/stm32_bringup.c @@ -159,6 +159,19 @@ int stm32_bringup(void) } #endif +#ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ + + ret = stm32_qencoder_initialize("/dev/qe0", 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + #ifdef HAVE_RTC_DRIVER /* Instantiate the STM32 lower-half RTC driver */ diff --git a/configs/stm32f4discovery/src/stm32_qencoder.c b/configs/stm32f4discovery/src/stm32_qencoder.c index 5d0ae6460af..9a8af84dddf 100644 --- a/configs/stm32f4discovery/src/stm32_qencoder.c +++ b/configs/stm32f4discovery/src/stm32_qencoder.c @@ -50,79 +50,12 @@ #include "stm32_qencoder.h" #include "stm32f4discovery.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Check if we have a timer configured for quadrature encoder -- assume YES. */ - -#define HAVE_QENCODER 1 - -/* If TIMn is not enabled (via CONFIG_STM32_TIMn), then the configuration cannot - * specify TIMn as a quadrature encoder (via CONFIG_STM32_TIMn_QE). - */ - -#ifndef CONFIG_STM32_TIM1 -# undef CONFIG_STM32_TIM1_QE -#endif -#ifndef CONFIG_STM32_TIM2 -# undef CONFIG_STM32_TIM2_QE -#endif -#ifndef CONFIG_STM32_TIM3 -# undef CONFIG_STM32_TIM3_QE -#endif -#ifndef CONFIG_STM32_TIM4 -# undef CONFIG_STM32_TIM4_QE -#endif -#ifndef CONFIG_STM32_TIM5 -# undef CONFIG_STM32_TIM5_QE -#endif -#ifndef CONFIG_STM32_TIM8 -# undef CONFIG_STM32_TIM8_QE -#endif - -/* If the upper-half quadrature encoder driver is not enabled, then we cannot - * support the quadrature encoder. - */ - -#ifndef CONFIG_QENCODER -# undef HAVE_QENCODER -#endif - -/* Which Timer should we use, TIMID={1,2,3,4,5,8}. If multiple timers are - * configured as quadrature encoders, this logic will arbitrarily select - * the lowest numbered timer. - * - * At least one TIMn, n={1,2,3,4,5,8}, must be both enabled and configured - * as a quadrature encoder in order to support the lower half quadrature - * encoder driver. The above check assures that if CONFIG_STM32_TIMn_QE - * is defined, then the correspdonding TIMn is also enabled. - */ - -#if defined CONFIG_STM32_TIM1_QE -# define TIMID 1 -#elif defined CONFIG_STM32_TIM2_QE -# define TIMID 2 -#elif defined CONFIG_STM32_TIM3_QE -# define TIMID 3 -#elif defined CONFIG_STM32_TIM4_QE -# define TIMID 4 -#elif defined CONFIG_STM32_TIM5_QE -# define TIMID 5 -#elif defined CONFIG_STM32_TIM8_QE -# define TIMID 8 -#else -# undef HAVE_QENCODER -#endif - -#ifdef HAVE_QENCODER - /************************************************************************************ * Public Functions ************************************************************************************/ /************************************************************************************ - * Name: qe_devinit + * Name: stm32_qencoder_initialize * * Description: * All STM32 architectures must provide the following interface to work with @@ -130,29 +63,20 @@ * ************************************************************************************/ -int qe_devinit(void) +int stm32_qencoder_initialize(FAR const char *devpath, int timer) { - static bool initialized = false; int ret; - /* Check if we are already initialized */ + /* Initialize a quadrature encoder interface. */ - if (!initialized) + sninfo("Initializing the quadrature encoder using TIM%d\n", timer); + ret = stm32_qeinitialize(devpath, timer); + if (ret < 0) { - /* Initialize a quadrature encoder interface. */ - - sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); - ret = stm32_qeinitialize("/dev/qe0", TIMID); - if (ret < 0) - { - snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); - return ret; - } - - initialized = true; + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); } - return OK; + return ret; } #endif /* HAVE_QENCODER */ diff --git a/configs/stm32f4discovery/src/stm32f4discovery.h b/configs/stm32f4discovery/src/stm32f4discovery.h index 50495addf38..2d4f7a617a8 100644 --- a/configs/stm32f4discovery/src/stm32f4discovery.h +++ b/configs/stm32f4discovery/src/stm32f4discovery.h @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f4discovery/src/stm32f4discovery.h * - * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -564,6 +564,18 @@ int stm32_sdio_initialize(void); void weak_function stm32_netinitialize(void); #endif +/**************************************************************************** + * Name: stm32_qencoder_initialize + * + * Description: + * Initialize and register a qencoder + * + ****************************************************************************/ + +#ifdef CONFIG_QENCODER +int stm32_qencoder_initialize(FAR const char *devpath, int timer); +#endif + /**************************************************************************** * Name: stm32_zerocross_initialize * diff --git a/configs/stm32ldiscovery/src/stm32_appinit.c b/configs/stm32ldiscovery/src/stm32_appinit.c index 359e271eb95..eb60217e5e1 100644 --- a/configs/stm32ldiscovery/src/stm32_appinit.c +++ b/configs/stm32ldiscovery/src/stm32_appinit.c @@ -47,10 +47,6 @@ #include "stm32ldiscovery.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -82,11 +78,30 @@ int board_app_initialize(uintptr_t arg) { + int ret = OK; + #ifdef CONFIG_STM32_LCD /* Initialize the SLCD and register the SLCD device as /dev/slcd */ - return stm32_slcd_initialize(); -#else - return OK; + ret = stm32_slcd_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: stm32_slcd_initialize failed: %d\n", ret); + return ret; + } #endif + +#ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ + + ret = stm32_qencoder_initialize("/dev/qe0", 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + } +#endif + + return ret; } diff --git a/configs/stm32ldiscovery/src/stm32_qencoder.c b/configs/stm32ldiscovery/src/stm32_qencoder.c index ebd78514aa1..7306b14127c 100644 --- a/configs/stm32ldiscovery/src/stm32_qencoder.c +++ b/configs/stm32ldiscovery/src/stm32_qencoder.c @@ -1,8 +1,7 @@ /************************************************************************************ * configs/stm32ldiscovery/src/up_qencoder.c - * arch/arm/src/board/up_qencoder.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -51,79 +50,12 @@ #include "stm32_qencoder.h" #include "stm32ldiscovery.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Check if we have a timer configured for quadrature encoder -- assume YES. */ - -#define HAVE_QENCODER 1 - -/* If TIMn is not enabled (via CONFIG_STM32_TIMn), then the configuration cannot - * specify TIMn as a quadrature encoder (via CONFIG_STM32_TIMn_QE). - */ - -#ifndef CONFIG_STM32_TIM1 -# undef CONFIG_STM32_TIM1_QE -#endif -#ifndef CONFIG_STM32_TIM2 -# undef CONFIG_STM32_TIM2_QE -#endif -#ifndef CONFIG_STM32_TIM3 -# undef CONFIG_STM32_TIM3_QE -#endif -#ifndef CONFIG_STM32_TIM4 -# undef CONFIG_STM32_TIM4_QE -#endif -#ifndef CONFIG_STM32_TIM5 -# undef CONFIG_STM32_TIM5_QE -#endif -#ifndef CONFIG_STM32_TIM8 -# undef CONFIG_STM32_TIM8_QE -#endif - -/* If the upper-half quadrature encoder driver is not enabled, then we cannot - * support the quadrature encoder. - */ - -#ifndef CONFIG_QENCODER -# undef HAVE_QENCODER -#endif - -/* Which Timer should we use, TIMID={1,2,3,4,5,8}. If multiple timers are - * configured as quadrature encoders, this logic will arbitrarily select - * the lowest numbered timer. - * - * At least one TIMn, n={1,2,3,4,5,8}, must be both enabled and configured - * as a quadrature encoder in order to support the lower half quadrature - * encoder driver. The above check assures that if CONFIG_STM32_TIMn_QE - * is defined, then the correspdonding TIMn is also enabled. - */ - -#if defined CONFIG_STM32_TIM1_QE -# define TIMID 1 -#elif defined CONFIG_STM32_TIM2_QE -# define TIMID 2 -#elif defined CONFIG_STM32_TIM3_QE -# define TIMID 3 -#elif defined CONFIG_STM32_TIM4_QE -# define TIMID 4 -#elif defined CONFIG_STM32_TIM5_QE -# define TIMID 5 -#elif defined CONFIG_STM32_TIM8_QE -# define TIMID 8 -#else -# undef HAVE_QENCODER -#endif - -#ifdef HAVE_QENCODER - /************************************************************************************ * Public Functions ************************************************************************************/ /************************************************************************************ - * Name: qe_devinit + * Name: stm32_qencoder_initialize * * Description: * All STM32 architectures must provide the following interface to work with @@ -131,29 +63,20 @@ * ************************************************************************************/ -int qe_devinit(void) +int stm32_qencoder_initialize(FAR const char *devpath, int timer) { - static bool initialized = false; int ret; - /* Check if we are already initialized */ + /* Initialize a quadrature encoder interface. */ - if (!initialized) + sninfo("Initializing the quadrature encoder using TIM%d\n", timer); + ret = stm32_qeinitialize(devpath, timer); + if (ret < 0) { - /* Initialize a quadrature encoder interface. */ - - sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); - ret = stm32_qeinitialize("/dev/qe0", TIMID); - if (ret < 0) - { - snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); - return ret; - } - - initialized = true; + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); } - return OK; + return ret; } #endif /* HAVE_QENCODER */ diff --git a/configs/stm32ldiscovery/src/stm32ldiscovery.h b/configs/stm32ldiscovery/src/stm32ldiscovery.h index 1bd424f3762..bf2f34e16eb 100644 --- a/configs/stm32ldiscovery/src/stm32ldiscovery.h +++ b/configs/stm32ldiscovery/src/stm32ldiscovery.h @@ -2,7 +2,7 @@ * configs/stm32ldiscovery/src/stm32ldiscovery.h * arch/arm/src/board/stm32ldiscovery.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -243,6 +243,18 @@ void weak_function stm32_spidev_initialize(void); +/**************************************************************************** + * Name: stm32_qencoder_initialize + * + * Description: + * Initialize and register a qencoder + * + ****************************************************************************/ + +#ifdef CONFIG_QENCODER +int stm32_qencoder_initialize(FAR const char *devpath, int timer); +#endif + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_STM32F3DISCOVERY_SRC_STM32F3DISCOVERY_H */ From a0711b1c192b200f873f37bf66c9657adb6d2112 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 06:41:46 -0600 Subject: [PATCH 09/35] configs: All QE encoder files. Last change made timer hard-coded to 3. Make configurable. --- configs/mikroe-stm32f4/Kconfig | 5 +++++ configs/mikroe-stm32f4/src/stm32_appinit.c | 2 +- configs/nucleo-f4x1re/Kconfig | 5 +++++ configs/nucleo-f4x1re/src/stm32_appinit.c | 2 +- configs/nucleo-l476rg/Kconfig | 5 +++++ configs/nucleo-l476rg/src/stm32_appinit.c | 2 +- configs/stm32f3discovery/Kconfig | 5 +++++ configs/stm32f3discovery/src/stm32_appinit.c | 2 +- configs/stm32f4discovery/Kconfig | 5 +++++ configs/stm32f4discovery/README.txt | 2 ++ configs/stm32f4discovery/src/stm32_bringup.c | 2 +- configs/stm32f4discovery/src/stm32_qencoder.c | 2 +- configs/stm32ldiscovery/Kconfig | 6 ++++++ configs/stm32ldiscovery/src/stm32_appinit.c | 2 +- 14 files changed, 40 insertions(+), 7 deletions(-) diff --git a/configs/mikroe-stm32f4/Kconfig b/configs/mikroe-stm32f4/Kconfig index 836f13cf2b1..00a5e41ee47 100644 --- a/configs/mikroe-stm32f4/Kconfig +++ b/configs/mikroe-stm32f4/Kconfig @@ -76,6 +76,11 @@ config MIKROE_RAMMTD_SIZE ---help--- Sets the size of static RAM allocation for the SMART RAM device +config MIKROE_QETIMER + int "Timer to use with QE encoder" + default 3 + depends on QENCODER + config PM_ALARM_SEC int "PM_STANDBY delay (seconds)" default 15 diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index cfc907dd03e..89828b2872b 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -366,7 +366,7 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_QENCODER /* Initialize and register the qencoder driver */ - ret = stm32_qencoder_initialize("/dev/qe0", 3); + ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_MIKROE_QETIMER); if (ret != OK) { syslog(LOG_ERR, diff --git a/configs/nucleo-f4x1re/Kconfig b/configs/nucleo-f4x1re/Kconfig index 6449f5b673c..27e172d8418 100644 --- a/configs/nucleo-f4x1re/Kconfig +++ b/configs/nucleo-f4x1re/Kconfig @@ -5,6 +5,11 @@ if ARCH_BOARD_NUCLEO_F401RE +config NUCLEO_F401RE_QETIMER + int "Timer to use with QE encoder" + default 3 + depends on QENCODER + config NUCLEO_F401RE_AJOY_MINBUTTONS bool "Minimal Joystick Buttons" default n if !STM32_USART1 diff --git a/configs/nucleo-f4x1re/src/stm32_appinit.c b/configs/nucleo-f4x1re/src/stm32_appinit.c index 06df903438b..a55f6a3c513 100644 --- a/configs/nucleo-f4x1re/src/stm32_appinit.c +++ b/configs/nucleo-f4x1re/src/stm32_appinit.c @@ -142,7 +142,7 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_QENCODER /* Initialize and register the qencoder driver */ - ret = stm32_qencoder_initialize("/dev/qe0", 3); + ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_NUCLEO_F401RE_QETIMER); if (ret != OK) { syslog(LOG_ERR, diff --git a/configs/nucleo-l476rg/Kconfig b/configs/nucleo-l476rg/Kconfig index 7361b3f4904..8edd703e42c 100644 --- a/configs/nucleo-l476rg/Kconfig +++ b/configs/nucleo-l476rg/Kconfig @@ -5,6 +5,11 @@ if ARCH_BOARD_NUCLEO_L476RG +config NUCLEO_L476RG_QETIMER + int "Timer to use with QE encoder" + default 3 + depends on QENCODER + config NUCLEO_L476RG_AJOY_MINBUTTONS bool "Minimal Joystick Buttons" default n if !STM32_USART1 diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index 6b279bd7a52..ceeca0eff36 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -221,7 +221,7 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_QENCODER /* Initialize and register the qencoder driver */ - ret = stm32l4_qencoder_initialize("/dev/qe0", 3); + ret = stm32l4_qencoder_initialize("/dev/qe0", CONFIG_NUCLEO_L476RG_QETIMER); if (ret != OK) { syslog(LOG_ERR, diff --git a/configs/stm32f3discovery/Kconfig b/configs/stm32f3discovery/Kconfig index de0d2da5f80..71e736df11f 100644 --- a/configs/stm32f3discovery/Kconfig +++ b/configs/stm32f3discovery/Kconfig @@ -5,6 +5,11 @@ if ARCH_BOARD_STM32F3_DISCOVERY +config STM32F3DISCO_QETIMER + int "Timer to use with QE encoder" + default 3 + depends on QENCODER + config PM_BUTTONS bool "PM Button support" default n diff --git a/configs/stm32f3discovery/src/stm32_appinit.c b/configs/stm32f3discovery/src/stm32_appinit.c index d4726c22b74..68cb782539b 100644 --- a/configs/stm32f3discovery/src/stm32_appinit.c +++ b/configs/stm32f3discovery/src/stm32_appinit.c @@ -130,7 +130,7 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_QENCODER /* Initialize and register the qencoder driver */ - ret = stm32_qencoder_initialize("/dev/qe0", 3); + ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F3DISCO_QETIMER); if (ret != OK) { syslog(LOG_ERR, diff --git a/configs/stm32f4discovery/Kconfig b/configs/stm32f4discovery/Kconfig index 3c84095efce..9703364210e 100644 --- a/configs/stm32f4discovery/Kconfig +++ b/configs/stm32f4discovery/Kconfig @@ -22,6 +22,11 @@ config STM32F4DISCO_USBHOST_PRIO default 100 depends on USBHOST +config STM32F4DISCO_QETIMER + int "Timer to use with QE encoder" + default 3 + depends on QENCODER + config PM_BUTTONS bool "PM button support" default n diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index 2b1bb2501fa..aaa37fe7f7e 100644 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -456,6 +456,8 @@ pins PA15 and PA1 for CH1 and CH2, respectively). If TIM8 is selected, then PC6 and PI5 will be used for CH1 and CH2 (see include board.h for pin definitions). +Selected via CONFIG_STM32F4DISCO_QETIMER + FPU === diff --git a/configs/stm32f4discovery/src/stm32_bringup.c b/configs/stm32f4discovery/src/stm32_bringup.c index 7805a71e05b..8a800d59f30 100644 --- a/configs/stm32f4discovery/src/stm32_bringup.c +++ b/configs/stm32f4discovery/src/stm32_bringup.c @@ -162,7 +162,7 @@ int stm32_bringup(void) #ifdef CONFIG_QENCODER /* Initialize and register the qencoder driver */ - ret = stm32_qencoder_initialize("/dev/qe0", 3); + ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32F4DISCO_QETIMER); if (ret != OK) { syslog(LOG_ERR, diff --git a/configs/stm32f4discovery/src/stm32_qencoder.c b/configs/stm32f4discovery/src/stm32_qencoder.c index 9a8af84dddf..80264a7a2a0 100644 --- a/configs/stm32f4discovery/src/stm32_qencoder.c +++ b/configs/stm32f4discovery/src/stm32_qencoder.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f4discovery/src/stm32_qencoder.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/stm32ldiscovery/Kconfig b/configs/stm32ldiscovery/Kconfig index 2d37b4e88db..34e1f833880 100644 --- a/configs/stm32ldiscovery/Kconfig +++ b/configs/stm32ldiscovery/Kconfig @@ -4,4 +4,10 @@ # if ARCH_BOARD_STM32FL_DISCOVERY + +config STM32LDISCO_QETIMER + int "Timer to use with QE encoder" + default 3 + depends on QENCODER + endif diff --git a/configs/stm32ldiscovery/src/stm32_appinit.c b/configs/stm32ldiscovery/src/stm32_appinit.c index eb60217e5e1..b0f4909a2e3 100644 --- a/configs/stm32ldiscovery/src/stm32_appinit.c +++ b/configs/stm32ldiscovery/src/stm32_appinit.c @@ -94,7 +94,7 @@ int board_app_initialize(uintptr_t arg) #ifdef CONFIG_QENCODER /* Initialize and register the qencoder driver */ - ret = stm32_qencoder_initialize("/dev/qe0", 3); + ret = stm32_qencoder_initialize("/dev/qe0", CONFIG_STM32LDISCO_QETIMER); if (ret != OK) { syslog(LOG_ERR, From 8eec4ab0e8ac6b4c07cbf92b4bae5d624f251743 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 06:58:34 -0600 Subject: [PATCH 10/35] Eliminate a warning --- include/nuttx/sensors/veml6070.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/nuttx/sensors/veml6070.h b/include/nuttx/sensors/veml6070.h index a143f1ee8d2..487eb539599 100644 --- a/include/nuttx/sensors/veml6070.h +++ b/include/nuttx/sensors/veml6070.h @@ -109,6 +109,7 @@ extern "C" * ****************************************************************************/ +struct i2c_master_s; int veml6070_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, uint8_t addr); From 7825dbb3a15aaa33bca6783fcee1e67d83a2a30f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 07:23:23 -0600 Subject: [PATCH 11/35] configs: Remove all button configurations that depended on the obsoleted ARCHBUTTON example --- configs/hymini-stm32v/README.txt | 8 - configs/hymini-stm32v/buttons/Make.defs | 117 --- configs/hymini-stm32v/buttons/defconfig | 1050 ---------------------- configs/hymini-stm32v/buttons/setenv.sh | 47 - configs/stm3210e-eval/README.txt | 8 - configs/stm3210e-eval/buttons/Make.defs | 117 --- configs/stm3210e-eval/buttons/defconfig | 1056 ----------------------- configs/stm3210e-eval/buttons/setenv.sh | 47 - 8 files changed, 2450 deletions(-) delete mode 100644 configs/hymini-stm32v/buttons/Make.defs delete mode 100644 configs/hymini-stm32v/buttons/defconfig delete mode 100755 configs/hymini-stm32v/buttons/setenv.sh delete mode 100644 configs/stm3210e-eval/buttons/Make.defs delete mode 100644 configs/stm3210e-eval/buttons/defconfig delete mode 100755 configs/stm3210e-eval/buttons/setenv.sh diff --git a/configs/hymini-stm32v/README.txt b/configs/hymini-stm32v/README.txt index e6643aaed34..2a804a43a69 100644 --- a/configs/hymini-stm32v/README.txt +++ b/configs/hymini-stm32v/README.txt @@ -561,14 +561,6 @@ can be selected as follow: Where is one of the following: - buttons: - -------- - - Uses apps/examples/buttons to exercise HY-MiniSTM32V buttons and - button interrupts. - - CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : Generic GNU EABI toolchain - nsh and nsh2: ------------ Configure the NuttShell (nsh) located at examples/nsh. diff --git a/configs/hymini-stm32v/buttons/Make.defs b/configs/hymini-stm32v/buttons/Make.defs deleted file mode 100644 index 8a2b9857ab3..00000000000 --- a/configs/hymini-stm32v/buttons/Make.defs +++ /dev/null @@ -1,117 +0,0 @@ -############################################################################ -# configs/hymini-stm32v/buttons/Make.defs -# -# Copyright (C) 2011, 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# 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. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs - -ifeq ($(CONFIG_STM32_DFU),y) - LDSCRIPT = ld.script.dfu -else - LDSCRIPT = ld.script -endif - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh - ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" - ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" -else - # Linux/Cygwin-native toolchain - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) -endif - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -ARCHWARNINGSXX = -Wall -Wshadow -Wundef -ARCHDEFINES = -ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 - -CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) -CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) -CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -AFLAGS = $(CFLAGS) -D__ASSEMBLY__ - -NXFLATLDFLAGS1 = -r -d -warn-common -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections -LDNXFLATFLAGS = -e main -s 2048 - -ASMEXT = .S -OBJEXT = .o -LIBEXT = .a -EXEEXT = - -ifneq ($(CROSSDEV),arm-nuttx-elf-) - LDFLAGS += -nostartfiles -nodefaultlibs -endif -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g -endif - - -HOSTCC = gcc -HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe -HOSTLDFLAGS = - diff --git a/configs/hymini-stm32v/buttons/defconfig b/configs/hymini-stm32v/buttons/defconfig deleted file mode 100644 index c314821a14b..00000000000 --- a/configs/hymini-stm32v/buttons/defconfig +++ /dev/null @@ -1,1050 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -CONFIG_HOST_LINUX=y -# CONFIG_HOST_OSX is not set -# CONFIG_HOST_WINDOWS is not set -# CONFIG_HOST_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -# CONFIG_MOTOROLA_SREC is not set -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -CONFIG_DEBUG_ALERT=y -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y -# CONFIG_HEAP_COLORATION is not set -# CONFIG_DEBUG_SYMBOLS is not set -CONFIG_ARCH_HAVE_CUSTOMOPT=y -# CONFIG_DEBUG_NOOPT is not set -# CONFIG_DEBUG_CUSTOMOPT is not set -CONFIG_DEBUG_FULLOPT=y - -# -# System Type -# -CONFIG_ARCH_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_RGMP 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_Z16 is not set -# CONFIG_ARCH_Z80 is not set -CONFIG_ARCH="arm" - -# -# ARM Options -# -# CONFIG_ARCH_CHIP_A1X is not set -# CONFIG_ARCH_CHIP_C5471 is not set -# CONFIG_ARCH_CHIP_CALYPSO is not set -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -CONFIG_ARCH_CHIP_STM32=y -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -# CONFIG_ARCH_ARM7TDMI is not set -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -CONFIG_ARCH_CORTEXM3=y -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="armv7-m" -CONFIG_ARCH_CHIP="stm32" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -CONFIG_ARM_TOOLCHAIN_GNU=y -# CONFIG_ARMV7M_USEBASEPRI is not set -CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -CONFIG_ARM_HAVE_MPU_UNIFIED=y -# CONFIG_ARM_MPU is not set - -# -# ARMV7M Configuration Options -# -# CONFIG_ARMV7M_HAVE_ICACHE is not set -# CONFIG_ARMV7M_HAVE_DCACHE is not set -# CONFIG_ARMV7M_HAVE_ITCM is not set -# CONFIG_ARMV7M_HAVE_DTCM is not set -# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set -# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y -CONFIG_ARMV7M_HAVE_STACKCHECK=y -# CONFIG_ARMV7M_STACKCHECK is not set -# CONFIG_ARMV7M_ITMSYSLOG is not set -# CONFIG_SERIAL_TERMIOS is not set - -# -# STM32 Configuration Options -# -# CONFIG_ARCH_CHIP_STM32L151C6 is not set -# CONFIG_ARCH_CHIP_STM32L151C8 is not set -# CONFIG_ARCH_CHIP_STM32L151CB is not set -# CONFIG_ARCH_CHIP_STM32L151R6 is not set -# CONFIG_ARCH_CHIP_STM32L151R8 is not set -# CONFIG_ARCH_CHIP_STM32L151RB is not set -# CONFIG_ARCH_CHIP_STM32L151V6 is not set -# CONFIG_ARCH_CHIP_STM32L151V8 is not set -# CONFIG_ARCH_CHIP_STM32L151VB is not set -# CONFIG_ARCH_CHIP_STM32L152C6 is not set -# CONFIG_ARCH_CHIP_STM32L152C8 is not set -# CONFIG_ARCH_CHIP_STM32L152CB is not set -# CONFIG_ARCH_CHIP_STM32L152R6 is not set -# CONFIG_ARCH_CHIP_STM32L152R8 is not set -# CONFIG_ARCH_CHIP_STM32L152RB is not set -# CONFIG_ARCH_CHIP_STM32L152V6 is not set -# CONFIG_ARCH_CHIP_STM32L152V8 is not set -# CONFIG_ARCH_CHIP_STM32L152VB is not set -# CONFIG_ARCH_CHIP_STM32L162ZD is not set -# CONFIG_ARCH_CHIP_STM32L162VE is not set -# CONFIG_ARCH_CHIP_STM32F100C8 is not set -# CONFIG_ARCH_CHIP_STM32F100CB is not set -# CONFIG_ARCH_CHIP_STM32F100R8 is not set -# CONFIG_ARCH_CHIP_STM32F100RB is not set -# CONFIG_ARCH_CHIP_STM32F100RC is not set -# CONFIG_ARCH_CHIP_STM32F100RD is not set -# CONFIG_ARCH_CHIP_STM32F100RE is not set -# CONFIG_ARCH_CHIP_STM32F100V8 is not set -# CONFIG_ARCH_CHIP_STM32F100VB is not set -# CONFIG_ARCH_CHIP_STM32F100VC is not set -# CONFIG_ARCH_CHIP_STM32F100VD is not set -# CONFIG_ARCH_CHIP_STM32F100VE is not set -# CONFIG_ARCH_CHIP_STM32F102CB is not set -# CONFIG_ARCH_CHIP_STM32F103T8 is not set -# CONFIG_ARCH_CHIP_STM32F103TB is not set -# CONFIG_ARCH_CHIP_STM32F103C4 is not set -# CONFIG_ARCH_CHIP_STM32F103C8 is not set -# CONFIG_ARCH_CHIP_STM32F103CB is not set -# CONFIG_ARCH_CHIP_STM32F103R8 is not set -# CONFIG_ARCH_CHIP_STM32F103RB is not set -# CONFIG_ARCH_CHIP_STM32F103RC is not set -# CONFIG_ARCH_CHIP_STM32F103RD is not set -# CONFIG_ARCH_CHIP_STM32F103RE is not set -# CONFIG_ARCH_CHIP_STM32F103RG is not set -# CONFIG_ARCH_CHIP_STM32F103V8 is not set -# CONFIG_ARCH_CHIP_STM32F103VB is not set -CONFIG_ARCH_CHIP_STM32F103VC=y -# CONFIG_ARCH_CHIP_STM32F103VE is not set -# CONFIG_ARCH_CHIP_STM32F103ZE is not set -# CONFIG_ARCH_CHIP_STM32F105VB is not set -# CONFIG_ARCH_CHIP_STM32F105RB is not set -# CONFIG_ARCH_CHIP_STM32F107VC is not set -# CONFIG_ARCH_CHIP_STM32F205RG is not set -# CONFIG_ARCH_CHIP_STM32F207IG is not set -# CONFIG_ARCH_CHIP_STM32F207ZE is not set -# CONFIG_ARCH_CHIP_STM32F302K6 is not set -# CONFIG_ARCH_CHIP_STM32F302K8 is not set -# CONFIG_ARCH_CHIP_STM32F302CB is not set -# CONFIG_ARCH_CHIP_STM32F302CC is not set -# CONFIG_ARCH_CHIP_STM32F302RB is not set -# CONFIG_ARCH_CHIP_STM32F302RC is not set -# CONFIG_ARCH_CHIP_STM32F302VB is not set -# CONFIG_ARCH_CHIP_STM32F302VC is not set -# CONFIG_ARCH_CHIP_STM32F303K6 is not set -# CONFIG_ARCH_CHIP_STM32F303K8 is not set -# CONFIG_ARCH_CHIP_STM32F303C6 is not set -# CONFIG_ARCH_CHIP_STM32F303C8 is not set -# CONFIG_ARCH_CHIP_STM32F303CB is not set -# CONFIG_ARCH_CHIP_STM32F303CC is not set -# CONFIG_ARCH_CHIP_STM32F303RB is not set -# CONFIG_ARCH_CHIP_STM32F303RC is not set -# CONFIG_ARCH_CHIP_STM32F303RD is not set -# CONFIG_ARCH_CHIP_STM32F303RE is not set -# CONFIG_ARCH_CHIP_STM32F303VB is not set -# CONFIG_ARCH_CHIP_STM32F303VC is not set -# CONFIG_ARCH_CHIP_STM32F372C8 is not set -# CONFIG_ARCH_CHIP_STM32F372R8 is not set -# CONFIG_ARCH_CHIP_STM32F372V8 is not set -# CONFIG_ARCH_CHIP_STM32F372CB is not set -# CONFIG_ARCH_CHIP_STM32F372RB is not set -# CONFIG_ARCH_CHIP_STM32F372VB is not set -# CONFIG_ARCH_CHIP_STM32F372CC is not set -# CONFIG_ARCH_CHIP_STM32F372RC is not set -# CONFIG_ARCH_CHIP_STM32F372VC is not set -# CONFIG_ARCH_CHIP_STM32F373C8 is not set -# CONFIG_ARCH_CHIP_STM32F373R8 is not set -# CONFIG_ARCH_CHIP_STM32F373V8 is not set -# CONFIG_ARCH_CHIP_STM32F373CB is not set -# CONFIG_ARCH_CHIP_STM32F373RB is not set -# CONFIG_ARCH_CHIP_STM32F373VB is not set -# CONFIG_ARCH_CHIP_STM32F373CC is not set -# CONFIG_ARCH_CHIP_STM32F373RC is not set -# CONFIG_ARCH_CHIP_STM32F373VC is not set -# CONFIG_ARCH_CHIP_STM32F401RE is not set -# CONFIG_ARCH_CHIP_STM32F411RE is not set -# CONFIG_ARCH_CHIP_STM32F411VE is not set -# CONFIG_ARCH_CHIP_STM32F405RG is not set -# CONFIG_ARCH_CHIP_STM32F405VG is not set -# CONFIG_ARCH_CHIP_STM32F405ZG is not set -# CONFIG_ARCH_CHIP_STM32F407VE is not set -# CONFIG_ARCH_CHIP_STM32F407VG is not set -# CONFIG_ARCH_CHIP_STM32F407ZE is not set -# CONFIG_ARCH_CHIP_STM32F407ZG is not set -# CONFIG_ARCH_CHIP_STM32F407IE is not set -# CONFIG_ARCH_CHIP_STM32F407IG is not set -# CONFIG_ARCH_CHIP_STM32F427V is not set -# CONFIG_ARCH_CHIP_STM32F427Z is not set -# CONFIG_ARCH_CHIP_STM32F427I is not set -# CONFIG_ARCH_CHIP_STM32F429V is not set -# CONFIG_ARCH_CHIP_STM32F429Z is not set -# CONFIG_ARCH_CHIP_STM32F429I is not set -# CONFIG_ARCH_CHIP_STM32F429B is not set -# CONFIG_ARCH_CHIP_STM32F429N is not set -# CONFIG_ARCH_CHIP_STM32F446M is not set -# CONFIG_ARCH_CHIP_STM32F446R is not set -# CONFIG_ARCH_CHIP_STM32F446V is not set -# CONFIG_ARCH_CHIP_STM32F446Z is not set -# CONFIG_ARCH_CHIP_STM32F469A is not set -# CONFIG_ARCH_CHIP_STM32F469I is not set -# CONFIG_ARCH_CHIP_STM32F469B is not set -# CONFIG_ARCH_CHIP_STM32F469N is not set -CONFIG_STM32_FLASH_CONFIG_DEFAULT=y -# CONFIG_STM32_FLASH_CONFIG_4 is not set -# CONFIG_STM32_FLASH_CONFIG_6 is not set -# CONFIG_STM32_FLASH_CONFIG_8 is not set -# CONFIG_STM32_FLASH_CONFIG_B is not set -# CONFIG_STM32_FLASH_CONFIG_C is not set -# CONFIG_STM32_FLASH_CONFIG_D is not set -# CONFIG_STM32_FLASH_CONFIG_E is not set -# CONFIG_STM32_FLASH_CONFIG_F is not set -# CONFIG_STM32_FLASH_CONFIG_G is not set -# CONFIG_STM32_FLASH_CONFIG_I is not set -# CONFIG_STM32_STM32L15XX is not set -# CONFIG_STM32_ENERGYLITE is not set -CONFIG_STM32_STM32F10XX=y -# CONFIG_STM32_VALUELINE is not set -# CONFIG_STM32_CONNECTIVITYLINE is not set -CONFIG_STM32_PERFORMANCELINE=y -# CONFIG_STM32_USBACCESSLINE is not set -CONFIG_STM32_HIGHDENSITY=y -# CONFIG_STM32_MEDIUMDENSITY is not set -# CONFIG_STM32_LOWDENSITY is not set -# CONFIG_STM32_STM32F20XX is not set -# CONFIG_STM32_STM32F205 is not set -# CONFIG_STM32_STM32F207 is not set -# CONFIG_STM32_STM32F30XX is not set -# CONFIG_STM32_STM32F302 is not set -# CONFIG_STM32_STM32F303 is not set -# CONFIG_STM32_STM32F37XX is not set -# CONFIG_STM32_STM32F40XX is not set -# CONFIG_STM32_STM32F401 is not set -# CONFIG_STM32_STM32F411 is not set -# CONFIG_STM32_STM32F405 is not set -# CONFIG_STM32_STM32F407 is not set -# CONFIG_STM32_STM32F427 is not set -# CONFIG_STM32_STM32F429 is not set -# CONFIG_STM32_STM32F446 is not set -# CONFIG_STM32_STM32F469 is not set -# CONFIG_STM32_DFU is not set - -# -# STM32 Peripheral Support -# -# CONFIG_STM32_HAVE_CCM is not set -CONFIG_STM32_HAVE_USBDEV=y -# CONFIG_STM32_HAVE_OTGFS is not set -CONFIG_STM32_HAVE_FSMC=y -# CONFIG_STM32_HAVE_LTDC is not set -CONFIG_STM32_HAVE_USART3=y -CONFIG_STM32_HAVE_UART4=y -CONFIG_STM32_HAVE_UART5=y -# CONFIG_STM32_HAVE_USART6 is not set -# CONFIG_STM32_HAVE_UART7 is not set -# CONFIG_STM32_HAVE_UART8 is not set -CONFIG_STM32_HAVE_TIM1=y -# CONFIG_STM32_HAVE_TIM2 is not set -CONFIG_STM32_HAVE_TIM3=y -CONFIG_STM32_HAVE_TIM4=y -CONFIG_STM32_HAVE_TIM5=y -CONFIG_STM32_HAVE_TIM6=y -CONFIG_STM32_HAVE_TIM7=y -CONFIG_STM32_HAVE_TIM8=y -# CONFIG_STM32_HAVE_TIM9 is not set -# CONFIG_STM32_HAVE_TIM10 is not set -# CONFIG_STM32_HAVE_TIM11 is not set -# CONFIG_STM32_HAVE_TIM12 is not set -# CONFIG_STM32_HAVE_TIM13 is not set -# CONFIG_STM32_HAVE_TIM14 is not set -# CONFIG_STM32_HAVE_TIM15 is not set -# CONFIG_STM32_HAVE_TIM16 is not set -# CONFIG_STM32_HAVE_TIM17 is not set -CONFIG_STM32_HAVE_ADC2=y -CONFIG_STM32_HAVE_ADC3=y -# CONFIG_STM32_HAVE_ADC4 is not set -# CONFIG_STM32_HAVE_ADC1_DMA is not set -# 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_CAN1=y -# CONFIG_STM32_HAVE_CAN2 is not set -CONFIG_STM32_HAVE_DAC1=y -CONFIG_STM32_HAVE_DAC2=y -# CONFIG_STM32_HAVE_RNG is not set -# CONFIG_STM32_HAVE_ETHMAC is not set -CONFIG_STM32_HAVE_I2C2=y -# CONFIG_STM32_HAVE_I2C3 is not set -CONFIG_STM32_HAVE_SPI2=y -CONFIG_STM32_HAVE_SPI3=y -# CONFIG_STM32_HAVE_SPI4 is not set -# CONFIG_STM32_HAVE_SPI5 is not set -# CONFIG_STM32_HAVE_SPI6 is not set -# CONFIG_STM32_HAVE_SAIPLL is not set -# CONFIG_STM32_HAVE_I2SPLL is not set -# CONFIG_STM32_ADC1 is not set -# CONFIG_STM32_ADC2 is not set -# CONFIG_STM32_ADC3 is not set -# CONFIG_STM32_BKP is not set -# CONFIG_STM32_CAN1 is not set -# CONFIG_STM32_CRC is not set -# CONFIG_STM32_DMA1 is not set -# CONFIG_STM32_DMA2 is not set -# CONFIG_STM32_DAC1 is not set -# CONFIG_STM32_DAC2 is not set -# CONFIG_STM32_FSMC is not set -# CONFIG_STM32_I2C1 is not set -# CONFIG_STM32_I2C2 is not set -CONFIG_STM32_PWR=y -# CONFIG_STM32_SDIO is not set -# CONFIG_STM32_SPI1 is not set -# CONFIG_STM32_SPI2 is not set -# CONFIG_STM32_SPI3 is not set -# CONFIG_STM32_TIM1 is not set -# CONFIG_STM32_TIM2 is not set -# CONFIG_STM32_TIM3 is not set -# CONFIG_STM32_TIM4 is not set -# CONFIG_STM32_TIM5 is not set -# CONFIG_STM32_TIM6 is not set -# CONFIG_STM32_TIM7 is not set -# CONFIG_STM32_TIM8 is not set -CONFIG_STM32_USART1=y -# CONFIG_STM32_USART2 is not set -# CONFIG_STM32_USART3 is not set -# CONFIG_STM32_UART4 is not set -# CONFIG_STM32_UART5 is not set -# CONFIG_STM32_USB is not set -# CONFIG_STM32_IWDG is not set -# CONFIG_STM32_WWDG is not set -# CONFIG_STM32_NOEXT_VECTORS is not set - -# -# Alternate Pin Mapping -# -# CONFIG_STM32_USART1_REMAP is not set -CONFIG_STM32_JTAG_DISABLE=y -# CONFIG_STM32_JTAG_FULL_ENABLE is not set -# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set -# CONFIG_STM32_JTAG_SW_ENABLE is not set -# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set -# CONFIG_STM32_FORCEPOWER is not set -# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set - -# -# Timer Configuration -# -# CONFIG_STM32_ONESHOT is not set -# CONFIG_STM32_FREERUN is not set -# CONFIG_STM32_TIM1_CAP is not set -# CONFIG_STM32_TIM3_CAP is not set -# CONFIG_STM32_TIM4_CAP is not set -# CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set -CONFIG_STM32_USART=y -CONFIG_STM32_SERIALDRIVER=y - -# -# U[S]ART Configuration -# - -# -# U[S]ART Device Configuration -# -CONFIG_STM32_USART1_SERIALDRIVER=y -# CONFIG_STM32_USART1_1WIREDRIVER is not set -# CONFIG_USART1_RS485 is not set - -# -# Serial Driver Configuration -# -# CONFIG_SERIAL_DISABLE_REORDERING is not set -# CONFIG_STM32_FLOWCONTROL_BROKEN is not set -# CONFIG_STM32_USART_BREAKS is not set -# CONFIG_STM32_USART_SINGLEWIRE is not set -CONFIG_STM32_HAVE_RTC_COUNTER=y -# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set - -# -# USB FS Host Configuration -# - -# -# USB HS Host Configuration -# - -# -# USB Host Debug Configuration -# - -# -# USB Device Configuration -# - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA is not set -CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_L2CACHE is not set -# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set -# CONFIG_ARCH_HAVE_ADDRENV is not set -# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -CONFIG_ARCH_HAVE_MPU=y -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -# CONFIG_ARCH_HAVE_POWEROFF is not set -CONFIG_ARCH_HAVE_RESET=y -# CONFIG_ARCH_USE_MPU is not set -# CONFIG_ARCH_IRQPRIO is not set -CONFIG_ARCH_STACKDUMP=y -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -CONFIG_ARCH_HAVE_RAMVECTORS=y -# CONFIG_ARCH_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=5483 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=0 -CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y -# CONFIG_ARCH_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -CONFIG_BOOT_RUNFROMFLASH=y -# CONFIG_BOOT_RUNFROMISRAM is not set -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0x20000000 -CONFIG_RAM_SIZE=49152 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -CONFIG_ARCH_BOARD_HYMINI_STM32V=y -# CONFIG_ARCH_BOARD_VIEWTOOL_STM32F107 is not set -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="hymini-stm32v" - -# -# Common Board Options -# -CONFIG_ARCH_HAVE_LEDS=y -CONFIG_ARCH_LEDS=y -CONFIG_ARCH_HAVE_BUTTONS=y -CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_ARCH_IRQBUTTONS=y - -# -# Board-Specific Options -# -# CONFIG_BOARD_CRASHDUMP is not set -# CONFIG_LIB_BOARDCTL is not set - -# -# RTOS Features -# -CONFIG_DISABLE_OS_API=y -# CONFIG_DISABLE_POSIX_TIMERS is not set -# CONFIG_DISABLE_PTHREAD is not set -# CONFIG_DISABLE_SIGNALS is not set -# CONFIG_DISABLE_MQUEUE is not set -# CONFIG_DISABLE_ENVIRON is not set - -# -# Clocks and Timers -# -CONFIG_ARCH_HAVE_TICKLESS=y -# CONFIG_SCHED_TICKLESS is not set -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -CONFIG_ARCH_HAVE_TIMEKEEPING=y -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2011 -CONFIG_START_MONTH=7 -CONFIG_START_DAY=5 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -CONFIG_USER_ENTRYPOINT="archbuttons_main" -CONFIG_RR_INTERVAL=200 -# CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=16 -# CONFIG_SCHED_HAVE_PARENT is not set -CONFIG_SCHED_WAITPID=y - -# -# Pthread Options -# -# CONFIG_MUTEX_TYPES is not set -CONFIG_NPTHREAD_KEYS=4 - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set -# CONFIG_SIG_EVTHREAD is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -CONFIG_SIG_SIGCONDTIMEDOUT=16 -CONFIG_SIG_SIGWORK=17 - -# -# POSIX Message Queue Options -# -CONFIG_PREALLOC_MQ_MSGS=4 -CONFIG_MQ_MAXMSGSIZE=32 -# CONFIG_MODULE is not set - -# -# Work queue support -# -CONFIG_SCHED_WORKQUEUE=y -CONFIG_SCHED_HPWORK=y -CONFIG_SCHED_HPWORKPRIORITY=192 -CONFIG_SCHED_HPWORKPERIOD=50000 -CONFIG_SCHED_HPWORKSTACKSIZE=1024 -# CONFIG_SCHED_LPWORK is not set - -# -# Stack and heap information -# -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=2048 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=2048 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -CONFIG_DEV_NULL=y -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_URANDOM is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -CONFIG_ARCH_HAVE_I2CRESET=y -# CONFIG_I2C is not set -# CONFIG_SPI is not set -CONFIG_ARCH_HAVE_SPI_BITORDER=y -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_ONESHOT is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set - -# -# IO Expander/GPIO Support -# -# CONFIG_IOEXPANDER is not set -# CONFIG_DEV_GPIO is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_USERLED is not set -# CONFIG_RGBLED is not set -# CONFIG_PCA9635PW is not set -# CONFIG_NCP5623C is not set -# CONFIG_MMCSD is not set -# CONFIG_MODEM is not set -# CONFIG_MTD is not set -# CONFIG_EEPROM is not set -# CONFIG_PIPES is not set -# CONFIG_PM is not set -# CONFIG_POWER is not set -# CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set -CONFIG_SERIAL=y -# CONFIG_DEV_LOWCONSOLE is not set -# CONFIG_SERIAL_REMOVABLE is not set -CONFIG_SERIAL_CONSOLE=y -# CONFIG_16550_UART is not set -# CONFIG_UART_SERIALDRIVER is not set -# CONFIG_UART0_SERIALDRIVER is not set -# CONFIG_UART1_SERIALDRIVER is not set -# CONFIG_UART2_SERIALDRIVER is not set -# CONFIG_UART3_SERIALDRIVER is not set -# CONFIG_UART4_SERIALDRIVER is not set -# CONFIG_UART5_SERIALDRIVER is not set -# CONFIG_UART6_SERIALDRIVER is not set -# CONFIG_UART7_SERIALDRIVER is not set -# CONFIG_UART8_SERIALDRIVER is not set -# CONFIG_SCI0_SERIALDRIVER is not set -# CONFIG_SCI1_SERIALDRIVER is not set -# CONFIG_USART0_SERIALDRIVER is not set -CONFIG_USART1_SERIALDRIVER=y -# CONFIG_USART2_SERIALDRIVER is not set -# CONFIG_USART3_SERIALDRIVER is not set -# CONFIG_USART4_SERIALDRIVER is not set -# CONFIG_USART5_SERIALDRIVER is not set -# CONFIG_USART6_SERIALDRIVER is not set -# CONFIG_USART7_SERIALDRIVER is not set -# CONFIG_USART8_SERIALDRIVER is not set -# CONFIG_OTHER_UART_SERIALDRIVER is not set -CONFIG_MCU_SERIAL=y -CONFIG_STANDARD_SERIAL=y -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y -CONFIG_USART1_SERIAL_CONSOLE=y -# CONFIG_OTHER_SERIAL_CONSOLE is not set -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# USART1 Configuration -# -CONFIG_USART1_RXBUFSIZE=256 -CONFIG_USART1_TXBUFSIZE=256 -CONFIG_USART1_BAUD=115200 -CONFIG_USART1_BITS=8 -CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 -# CONFIG_USART1_IFLOWCONTROL is not set -# CONFIG_USART1_OFLOWCONTROL is not set -# CONFIG_USART1_DMA is not set -# CONFIG_PSEUDOTERM is not set -# CONFIG_USBDEV is not set -# 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 -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_SERIAL_CONSOLE=y -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_CONSOLE=y -# CONFIG_SYSLOG_NONE is not set -# CONFIG_SYSLOG_FILE is not set -# CONFIG_SYSLOG_CHARDEV is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -# CONFIG_DISABLE_MOUNTPOINT is not set -# CONFIG_FS_AUTOMOUNTER is not set -# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -CONFIG_FS_MQUEUE_MPATH="/var/mqueue" -# CONFIG_FS_RAMMAP is not set -# CONFIG_FS_FAT is not set -# CONFIG_FS_NXFFS is not set -# CONFIG_FS_ROMFS is not set -# CONFIG_FS_TMPFS is not set -# CONFIG_FS_SMARTFS is not set -# CONFIG_FS_PROCFS is not set -# CONFIG_FS_UNIONFS is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -# CONFIG_MM_SMALL is not set -CONFIG_MM_REGIONS=1 -# CONFIG_ARCH_HAVE_HEAP2 is not set -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# - -# -# Binary Loader -# -CONFIG_BINFMT_DISABLE=y -# CONFIG_PIC is not set -CONFIG_SYMTAB_ORDEREDBYNAME=y - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=64 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=2 -CONFIG_LIB_HOMEDIR="/" -# CONFIG_LIBM is not set -# CONFIG_NOPRINTF_FIELDWIDTH is not set -# CONFIG_LIBC_FLOATINGPOINT is not set -CONFIG_LIBC_LONG_LONG=y -# 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 -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_LIBC_LOCALTIME is not set -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set -# CONFIG_LIB_HEX2BIN is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# CAN Utilities -# - -# -# Examples -# -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=1 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="Key A" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Key B" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" -# CONFIG_EXAMPLES_BUTTONS is not set -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -# CONFIG_EXAMPLES_HELLO is not set -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -# CONFIG_EXAMPLES_NSH is not set -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RFID_READUID is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_RGMP is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_MINIBASIC is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -# CONFIG_NSH_LIBRARY is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_HEXED is not set -# CONFIG_SYSTEM_INSTALL is not set -# CONFIG_SYSTEM_RAMTEST is not set -# CONFIG_READLINE_HAVE_EXTMATCH is not set -CONFIG_SYSTEM_READLINE=y -CONFIG_READLINE_ECHO=y -# CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_TEE is not set -# CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_SYSTEM_VI is not set -# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/hymini-stm32v/buttons/setenv.sh b/configs/hymini-stm32v/buttons/setenv.sh deleted file mode 100755 index df0dba31803..00000000000 --- a/configs/hymini-stm32v/buttons/setenv.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# configs/hymini-stm32v/buttons/setenv.sh -# -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# 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. -# - -if [ "$(basename $0)" = "setenv.sh" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - -WD=`pwd` -export RIDE_BIN="/cygdrive/c/Program Files/Raisonance/Ride/arm-gcc/bin" -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:${RIDE_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" - -echo "PATH : ${PATH}" diff --git a/configs/stm3210e-eval/README.txt b/configs/stm3210e-eval/README.txt index 1e70b125b54..050276b5bbc 100644 --- a/configs/stm3210e-eval/README.txt +++ b/configs/stm3210e-eval/README.txt @@ -705,14 +705,6 @@ can be selected as follow: Where is one of the following: - buttons: - -------- - - Uses apps/examples/buttons to exercise STM3210E-EVAL buttons and - button interrupts. - - CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows - composite --------- diff --git a/configs/stm3210e-eval/buttons/Make.defs b/configs/stm3210e-eval/buttons/Make.defs deleted file mode 100644 index a0f63802978..00000000000 --- a/configs/stm3210e-eval/buttons/Make.defs +++ /dev/null @@ -1,117 +0,0 @@ -############################################################################ -# configs/stm3210e-eval/buttons/Make.defs -# -# Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# 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. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs - -ifeq ($(CONFIG_STM32_DFU),y) - LDSCRIPT = ld.script.dfu -else - LDSCRIPT = ld.script -endif - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh - ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" - ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" -else - # Linux/Cygwin-native toolchain - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) -endif - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -ARCHWARNINGSXX = -Wall -Wshadow -Wundef -ARCHDEFINES = -ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 - -CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) -CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) -CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -AFLAGS = $(CFLAGS) -D__ASSEMBLY__ - -NXFLATLDFLAGS1 = -r -d -warn-common -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections -LDNXFLATFLAGS = -e main -s 2048 - -ASMEXT = .S -OBJEXT = .o -LIBEXT = .a -EXEEXT = - -ifneq ($(CROSSDEV),arm-nuttx-elf-) - LDFLAGS += -nostartfiles -nodefaultlibs -endif -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g -endif - - -HOSTCC = gcc -HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe -HOSTLDFLAGS = - diff --git a/configs/stm3210e-eval/buttons/defconfig b/configs/stm3210e-eval/buttons/defconfig deleted file mode 100644 index 202b99f6c87..00000000000 --- a/configs/stm3210e-eval/buttons/defconfig +++ /dev/null @@ -1,1056 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -# CONFIG_HOST_LINUX is not set -# CONFIG_HOST_OSX is not set -CONFIG_HOST_WINDOWS=y -# CONFIG_HOST_OTHER is not set -# CONFIG_WINDOWS_NATIVE is not set -CONFIG_WINDOWS_CYGWIN=y -# CONFIG_WINDOWS_MSYS is not set -# CONFIG_WINDOWS_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -CONFIG_INTELHEX_BINARY=y -# CONFIG_MOTOROLA_SREC is not set -# CONFIG_RAW_BINARY is not set -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -CONFIG_DEBUG_ALERT=y -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y -# CONFIG_HEAP_COLORATION is not set -# CONFIG_DEBUG_SYMBOLS is not set -CONFIG_ARCH_HAVE_CUSTOMOPT=y -# CONFIG_DEBUG_NOOPT is not set -# CONFIG_DEBUG_CUSTOMOPT is not set -CONFIG_DEBUG_FULLOPT=y - -# -# System Type -# -CONFIG_ARCH_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_RGMP 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_Z16 is not set -# CONFIG_ARCH_Z80 is not set -CONFIG_ARCH="arm" - -# -# ARM Options -# -# CONFIG_ARCH_CHIP_A1X is not set -# CONFIG_ARCH_CHIP_C5471 is not set -# CONFIG_ARCH_CHIP_CALYPSO is not set -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -CONFIG_ARCH_CHIP_STM32=y -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -# CONFIG_ARCH_ARM7TDMI is not set -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -CONFIG_ARCH_CORTEXM3=y -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="armv7-m" -CONFIG_ARCH_CHIP="stm32" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -CONFIG_ARM_TOOLCHAIN_GNU=y -# CONFIG_ARMV7M_USEBASEPRI is not set -CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -CONFIG_ARM_HAVE_MPU_UNIFIED=y -# CONFIG_ARM_MPU is not set - -# -# ARMV7M Configuration Options -# -# CONFIG_ARMV7M_HAVE_ICACHE is not set -# CONFIG_ARMV7M_HAVE_DCACHE is not set -# CONFIG_ARMV7M_HAVE_ITCM is not set -# CONFIG_ARMV7M_HAVE_DTCM is not set -# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set -# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set -# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set -CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y -# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set -# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set -CONFIG_ARMV7M_HAVE_STACKCHECK=y -# CONFIG_ARMV7M_STACKCHECK is not set -# CONFIG_ARMV7M_ITMSYSLOG is not set -# CONFIG_SERIAL_TERMIOS is not set - -# -# STM32 Configuration Options -# -# CONFIG_ARCH_CHIP_STM32L151C6 is not set -# CONFIG_ARCH_CHIP_STM32L151C8 is not set -# CONFIG_ARCH_CHIP_STM32L151CB is not set -# CONFIG_ARCH_CHIP_STM32L151R6 is not set -# CONFIG_ARCH_CHIP_STM32L151R8 is not set -# CONFIG_ARCH_CHIP_STM32L151RB is not set -# CONFIG_ARCH_CHIP_STM32L151V6 is not set -# CONFIG_ARCH_CHIP_STM32L151V8 is not set -# CONFIG_ARCH_CHIP_STM32L151VB is not set -# CONFIG_ARCH_CHIP_STM32L152C6 is not set -# CONFIG_ARCH_CHIP_STM32L152C8 is not set -# CONFIG_ARCH_CHIP_STM32L152CB is not set -# CONFIG_ARCH_CHIP_STM32L152R6 is not set -# CONFIG_ARCH_CHIP_STM32L152R8 is not set -# CONFIG_ARCH_CHIP_STM32L152RB is not set -# CONFIG_ARCH_CHIP_STM32L152V6 is not set -# CONFIG_ARCH_CHIP_STM32L152V8 is not set -# CONFIG_ARCH_CHIP_STM32L152VB is not set -# CONFIG_ARCH_CHIP_STM32L162ZD is not set -# CONFIG_ARCH_CHIP_STM32L162VE is not set -# CONFIG_ARCH_CHIP_STM32F100C8 is not set -# CONFIG_ARCH_CHIP_STM32F100CB is not set -# CONFIG_ARCH_CHIP_STM32F100R8 is not set -# CONFIG_ARCH_CHIP_STM32F100RB is not set -# CONFIG_ARCH_CHIP_STM32F100RC is not set -# CONFIG_ARCH_CHIP_STM32F100RD is not set -# CONFIG_ARCH_CHIP_STM32F100RE is not set -# CONFIG_ARCH_CHIP_STM32F100V8 is not set -# CONFIG_ARCH_CHIP_STM32F100VB is not set -# CONFIG_ARCH_CHIP_STM32F100VC is not set -# CONFIG_ARCH_CHIP_STM32F100VD is not set -# CONFIG_ARCH_CHIP_STM32F100VE is not set -# CONFIG_ARCH_CHIP_STM32F102CB is not set -# CONFIG_ARCH_CHIP_STM32F103T8 is not set -# CONFIG_ARCH_CHIP_STM32F103TB is not set -# CONFIG_ARCH_CHIP_STM32F103C4 is not set -# CONFIG_ARCH_CHIP_STM32F103C8 is not set -# CONFIG_ARCH_CHIP_STM32F103CB is not set -# CONFIG_ARCH_CHIP_STM32F103R8 is not set -# CONFIG_ARCH_CHIP_STM32F103RB is not set -# CONFIG_ARCH_CHIP_STM32F103RC is not set -# CONFIG_ARCH_CHIP_STM32F103RD is not set -# CONFIG_ARCH_CHIP_STM32F103RE is not set -# CONFIG_ARCH_CHIP_STM32F103RG is not set -# CONFIG_ARCH_CHIP_STM32F103V8 is not set -# CONFIG_ARCH_CHIP_STM32F103VB is not set -# CONFIG_ARCH_CHIP_STM32F103VC is not set -# CONFIG_ARCH_CHIP_STM32F103VE is not set -CONFIG_ARCH_CHIP_STM32F103ZE=y -# CONFIG_ARCH_CHIP_STM32F105VB is not set -# CONFIG_ARCH_CHIP_STM32F105RB is not set -# CONFIG_ARCH_CHIP_STM32F107VC is not set -# CONFIG_ARCH_CHIP_STM32F205RG is not set -# CONFIG_ARCH_CHIP_STM32F207IG is not set -# CONFIG_ARCH_CHIP_STM32F207ZE is not set -# CONFIG_ARCH_CHIP_STM32F302K6 is not set -# CONFIG_ARCH_CHIP_STM32F302K8 is not set -# CONFIG_ARCH_CHIP_STM32F302CB is not set -# CONFIG_ARCH_CHIP_STM32F302CC is not set -# CONFIG_ARCH_CHIP_STM32F302RB is not set -# CONFIG_ARCH_CHIP_STM32F302RC is not set -# CONFIG_ARCH_CHIP_STM32F302VB is not set -# CONFIG_ARCH_CHIP_STM32F302VC is not set -# CONFIG_ARCH_CHIP_STM32F303K6 is not set -# CONFIG_ARCH_CHIP_STM32F303K8 is not set -# CONFIG_ARCH_CHIP_STM32F303C6 is not set -# CONFIG_ARCH_CHIP_STM32F303C8 is not set -# CONFIG_ARCH_CHIP_STM32F303CB is not set -# CONFIG_ARCH_CHIP_STM32F303CC is not set -# CONFIG_ARCH_CHIP_STM32F303RB is not set -# CONFIG_ARCH_CHIP_STM32F303RC is not set -# CONFIG_ARCH_CHIP_STM32F303RD is not set -# CONFIG_ARCH_CHIP_STM32F303RE is not set -# CONFIG_ARCH_CHIP_STM32F303VB is not set -# CONFIG_ARCH_CHIP_STM32F303VC is not set -# CONFIG_ARCH_CHIP_STM32F372C8 is not set -# CONFIG_ARCH_CHIP_STM32F372R8 is not set -# CONFIG_ARCH_CHIP_STM32F372V8 is not set -# CONFIG_ARCH_CHIP_STM32F372CB is not set -# CONFIG_ARCH_CHIP_STM32F372RB is not set -# CONFIG_ARCH_CHIP_STM32F372VB is not set -# CONFIG_ARCH_CHIP_STM32F372CC is not set -# CONFIG_ARCH_CHIP_STM32F372RC is not set -# CONFIG_ARCH_CHIP_STM32F372VC is not set -# CONFIG_ARCH_CHIP_STM32F373C8 is not set -# CONFIG_ARCH_CHIP_STM32F373R8 is not set -# CONFIG_ARCH_CHIP_STM32F373V8 is not set -# CONFIG_ARCH_CHIP_STM32F373CB is not set -# CONFIG_ARCH_CHIP_STM32F373RB is not set -# CONFIG_ARCH_CHIP_STM32F373VB is not set -# CONFIG_ARCH_CHIP_STM32F373CC is not set -# CONFIG_ARCH_CHIP_STM32F373RC is not set -# CONFIG_ARCH_CHIP_STM32F373VC is not set -# CONFIG_ARCH_CHIP_STM32F401RE is not set -# CONFIG_ARCH_CHIP_STM32F411RE is not set -# CONFIG_ARCH_CHIP_STM32F411VE is not set -# CONFIG_ARCH_CHIP_STM32F405RG is not set -# CONFIG_ARCH_CHIP_STM32F405VG is not set -# CONFIG_ARCH_CHIP_STM32F405ZG is not set -# CONFIG_ARCH_CHIP_STM32F407VE is not set -# CONFIG_ARCH_CHIP_STM32F407VG is not set -# CONFIG_ARCH_CHIP_STM32F407ZE is not set -# CONFIG_ARCH_CHIP_STM32F407ZG is not set -# CONFIG_ARCH_CHIP_STM32F407IE is not set -# CONFIG_ARCH_CHIP_STM32F407IG is not set -# CONFIG_ARCH_CHIP_STM32F427V is not set -# CONFIG_ARCH_CHIP_STM32F427Z is not set -# CONFIG_ARCH_CHIP_STM32F427I is not set -# CONFIG_ARCH_CHIP_STM32F429V is not set -# CONFIG_ARCH_CHIP_STM32F429Z is not set -# CONFIG_ARCH_CHIP_STM32F429I is not set -# CONFIG_ARCH_CHIP_STM32F429B is not set -# CONFIG_ARCH_CHIP_STM32F429N is not set -# CONFIG_ARCH_CHIP_STM32F446M is not set -# CONFIG_ARCH_CHIP_STM32F446R is not set -# CONFIG_ARCH_CHIP_STM32F446V is not set -# CONFIG_ARCH_CHIP_STM32F446Z is not set -# CONFIG_ARCH_CHIP_STM32F469A is not set -# CONFIG_ARCH_CHIP_STM32F469I is not set -# CONFIG_ARCH_CHIP_STM32F469B is not set -# CONFIG_ARCH_CHIP_STM32F469N is not set -CONFIG_STM32_FLASH_CONFIG_DEFAULT=y -# CONFIG_STM32_FLASH_CONFIG_4 is not set -# CONFIG_STM32_FLASH_CONFIG_6 is not set -# CONFIG_STM32_FLASH_CONFIG_8 is not set -# CONFIG_STM32_FLASH_CONFIG_B is not set -# CONFIG_STM32_FLASH_CONFIG_C is not set -# CONFIG_STM32_FLASH_CONFIG_D is not set -# CONFIG_STM32_FLASH_CONFIG_E is not set -# CONFIG_STM32_FLASH_CONFIG_F is not set -# CONFIG_STM32_FLASH_CONFIG_G is not set -# CONFIG_STM32_FLASH_CONFIG_I is not set -# CONFIG_STM32_STM32L15XX is not set -# CONFIG_STM32_ENERGYLITE is not set -CONFIG_STM32_STM32F10XX=y -# CONFIG_STM32_VALUELINE is not set -# CONFIG_STM32_CONNECTIVITYLINE is not set -CONFIG_STM32_PERFORMANCELINE=y -# CONFIG_STM32_USBACCESSLINE is not set -CONFIG_STM32_HIGHDENSITY=y -# CONFIG_STM32_MEDIUMDENSITY is not set -# CONFIG_STM32_LOWDENSITY is not set -# CONFIG_STM32_STM32F20XX is not set -# CONFIG_STM32_STM32F205 is not set -# CONFIG_STM32_STM32F207 is not set -# CONFIG_STM32_STM32F30XX is not set -# CONFIG_STM32_STM32F302 is not set -# CONFIG_STM32_STM32F303 is not set -# CONFIG_STM32_STM32F37XX is not set -# CONFIG_STM32_STM32F40XX is not set -# CONFIG_STM32_STM32F401 is not set -# CONFIG_STM32_STM32F411 is not set -# CONFIG_STM32_STM32F405 is not set -# CONFIG_STM32_STM32F407 is not set -# CONFIG_STM32_STM32F427 is not set -# CONFIG_STM32_STM32F429 is not set -# CONFIG_STM32_STM32F446 is not set -# CONFIG_STM32_STM32F469 is not set -CONFIG_STM32_DFU=y - -# -# STM32 Peripheral Support -# -# CONFIG_STM32_HAVE_CCM is not set -CONFIG_STM32_HAVE_USBDEV=y -# CONFIG_STM32_HAVE_OTGFS is not set -CONFIG_STM32_HAVE_FSMC=y -# CONFIG_STM32_HAVE_LTDC is not set -CONFIG_STM32_HAVE_USART3=y -CONFIG_STM32_HAVE_UART4=y -CONFIG_STM32_HAVE_UART5=y -# CONFIG_STM32_HAVE_USART6 is not set -# CONFIG_STM32_HAVE_UART7 is not set -# CONFIG_STM32_HAVE_UART8 is not set -CONFIG_STM32_HAVE_TIM1=y -# CONFIG_STM32_HAVE_TIM2 is not set -CONFIG_STM32_HAVE_TIM3=y -CONFIG_STM32_HAVE_TIM4=y -CONFIG_STM32_HAVE_TIM5=y -CONFIG_STM32_HAVE_TIM6=y -CONFIG_STM32_HAVE_TIM7=y -CONFIG_STM32_HAVE_TIM8=y -# CONFIG_STM32_HAVE_TIM9 is not set -# CONFIG_STM32_HAVE_TIM10 is not set -# CONFIG_STM32_HAVE_TIM11 is not set -# CONFIG_STM32_HAVE_TIM12 is not set -# CONFIG_STM32_HAVE_TIM13 is not set -# CONFIG_STM32_HAVE_TIM14 is not set -# CONFIG_STM32_HAVE_TIM15 is not set -# CONFIG_STM32_HAVE_TIM16 is not set -# CONFIG_STM32_HAVE_TIM17 is not set -CONFIG_STM32_HAVE_ADC2=y -CONFIG_STM32_HAVE_ADC3=y -# CONFIG_STM32_HAVE_ADC4 is not set -# CONFIG_STM32_HAVE_ADC1_DMA is not set -# 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_CAN1=y -# CONFIG_STM32_HAVE_CAN2 is not set -CONFIG_STM32_HAVE_DAC1=y -CONFIG_STM32_HAVE_DAC2=y -# CONFIG_STM32_HAVE_RNG is not set -# CONFIG_STM32_HAVE_ETHMAC is not set -CONFIG_STM32_HAVE_I2C2=y -# CONFIG_STM32_HAVE_I2C3 is not set -CONFIG_STM32_HAVE_SPI2=y -CONFIG_STM32_HAVE_SPI3=y -# CONFIG_STM32_HAVE_SPI4 is not set -# CONFIG_STM32_HAVE_SPI5 is not set -# CONFIG_STM32_HAVE_SPI6 is not set -# CONFIG_STM32_HAVE_SAIPLL is not set -# CONFIG_STM32_HAVE_I2SPLL is not set -# CONFIG_STM32_ADC1 is not set -# CONFIG_STM32_ADC2 is not set -# CONFIG_STM32_ADC3 is not set -# CONFIG_STM32_BKP is not set -# CONFIG_STM32_CAN1 is not set -# CONFIG_STM32_CRC is not set -# CONFIG_STM32_DMA1 is not set -# CONFIG_STM32_DMA2 is not set -# CONFIG_STM32_DAC1 is not set -# CONFIG_STM32_DAC2 is not set -CONFIG_STM32_FSMC=y -# CONFIG_STM32_I2C1 is not set -# CONFIG_STM32_I2C2 is not set -# CONFIG_STM32_PWR is not set -# CONFIG_STM32_SDIO is not set -# CONFIG_STM32_SPI1 is not set -# CONFIG_STM32_SPI2 is not set -# CONFIG_STM32_SPI3 is not set -# CONFIG_STM32_TIM1 is not set -# CONFIG_STM32_TIM2 is not set -# CONFIG_STM32_TIM3 is not set -# CONFIG_STM32_TIM4 is not set -# CONFIG_STM32_TIM5 is not set -# CONFIG_STM32_TIM6 is not set -# CONFIG_STM32_TIM7 is not set -# CONFIG_STM32_TIM8 is not set -CONFIG_STM32_USART1=y -CONFIG_STM32_USART2=y -# CONFIG_STM32_USART3 is not set -# CONFIG_STM32_UART4 is not set -# CONFIG_STM32_UART5 is not set -# CONFIG_STM32_USB is not set -# CONFIG_STM32_IWDG is not set -# CONFIG_STM32_WWDG is not set -# CONFIG_STM32_NOEXT_VECTORS is not set - -# -# Alternate Pin Mapping -# -# CONFIG_STM32_USART1_REMAP is not set -# CONFIG_STM32_USART2_REMAP is not set -# CONFIG_STM32_JTAG_DISABLE is not set -CONFIG_STM32_JTAG_FULL_ENABLE=y -# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set -# CONFIG_STM32_JTAG_SW_ENABLE is not set -# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set -# CONFIG_STM32_FORCEPOWER is not set -# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set -# CONFIG_STM32_FSMC_SRAM is not set - -# -# Timer Configuration -# -# CONFIG_STM32_ONESHOT is not set -# CONFIG_STM32_FREERUN is not set -# CONFIG_STM32_TIM1_CAP is not set -# CONFIG_STM32_TIM3_CAP is not set -# CONFIG_STM32_TIM4_CAP is not set -# CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set -CONFIG_STM32_USART=y -CONFIG_STM32_SERIALDRIVER=y - -# -# U[S]ART Configuration -# - -# -# U[S]ART Device Configuration -# -CONFIG_STM32_USART1_SERIALDRIVER=y -# CONFIG_STM32_USART1_1WIREDRIVER is not set -# CONFIG_USART1_RS485 is not set -CONFIG_STM32_USART2_SERIALDRIVER=y -# CONFIG_STM32_USART2_1WIREDRIVER is not set -# CONFIG_USART2_RS485 is not set - -# -# Serial Driver Configuration -# -# CONFIG_SERIAL_DISABLE_REORDERING is not set -# CONFIG_STM32_FLOWCONTROL_BROKEN is not set -# CONFIG_STM32_USART_BREAKS is not set -# CONFIG_STM32_USART_SINGLEWIRE is not set -CONFIG_STM32_HAVE_RTC_COUNTER=y -# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set - -# -# USB FS Host Configuration -# - -# -# USB HS Host Configuration -# - -# -# USB Host Debug Configuration -# - -# -# USB Device Configuration -# - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA is not set -CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_L2CACHE is not set -# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set -# CONFIG_ARCH_HAVE_ADDRENV is not set -# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -CONFIG_ARCH_HAVE_MPU=y -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -# CONFIG_ARCH_HAVE_POWEROFF is not set -CONFIG_ARCH_HAVE_RESET=y -# CONFIG_ARCH_USE_MPU is not set -# CONFIG_ARCH_IRQPRIO is not set -CONFIG_ARCH_STACKDUMP=y -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -CONFIG_ARCH_HAVE_RAMVECTORS=y -# CONFIG_ARCH_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=5483 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=0 -CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y -# CONFIG_ARCH_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -CONFIG_BOOT_RUNFROMFLASH=y -# CONFIG_BOOT_RUNFROMISRAM is not set -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0x20000000 -CONFIG_RAM_SIZE=65536 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -CONFIG_ARCH_BOARD_STM3210E_EVAL=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="stm3210e-eval" - -# -# Common Board Options -# -CONFIG_ARCH_HAVE_LEDS=y -CONFIG_ARCH_LEDS=y -CONFIG_ARCH_HAVE_BUTTONS=y -CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_ARCH_IRQBUTTONS=y - -# -# Board-Specific Options -# - -# -# STM3210E-EVAL LCD Hardware Configuration -# -# CONFIG_STM3210E_LCD is not set -# CONFIG_BOARD_CRASHDUMP is not set -# CONFIG_LIB_BOARDCTL is not set - -# -# RTOS Features -# -CONFIG_DISABLE_OS_API=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -# CONFIG_DISABLE_SIGNALS is not set -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=y - -# -# Clocks and Timers -# -CONFIG_ARCH_HAVE_TICKLESS=y -# CONFIG_SCHED_TICKLESS is not set -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -CONFIG_ARCH_HAVE_TIMEKEEPING=y -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2011 -CONFIG_START_MONTH=7 -CONFIG_START_DAY=7 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="archbuttons_main" -CONFIG_RR_INTERVAL=200 -# CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=8 -# CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=6 -CONFIG_NFILE_STREAMS=6 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -# CONFIG_MODULE is not set - -# -# Work queue support -# -# CONFIG_SCHED_WORKQUEUE is not set -# CONFIG_SCHED_HPWORK is not set -# CONFIG_SCHED_LPWORK is not set - -# -# Stack and heap information -# -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=2048 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=2048 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -CONFIG_DEV_NULL=y -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_URANDOM is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -CONFIG_ARCH_HAVE_I2CRESET=y -# CONFIG_I2C is not set -# CONFIG_SPI is not set -CONFIG_ARCH_HAVE_SPI_BITORDER=y -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_ONESHOT is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set - -# -# IO Expander/GPIO Support -# -# CONFIG_IOEXPANDER is not set -# CONFIG_DEV_GPIO is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_USERLED is not set -# CONFIG_RGBLED is not set -# CONFIG_PCA9635PW is not set -# CONFIG_NCP5623C is not set -# CONFIG_MMCSD is not set -# CONFIG_MODEM is not set -# CONFIG_MTD is not set -# CONFIG_EEPROM is not set -# CONFIG_PIPES is not set -# CONFIG_PM is not set -# CONFIG_POWER is not set -# CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set -CONFIG_SERIAL=y -CONFIG_DEV_LOWCONSOLE=y -# CONFIG_SERIAL_REMOVABLE is not set -CONFIG_SERIAL_CONSOLE=y -# CONFIG_16550_UART is not set -# CONFIG_UART_SERIALDRIVER is not set -# CONFIG_UART0_SERIALDRIVER is not set -# CONFIG_UART1_SERIALDRIVER is not set -# CONFIG_UART2_SERIALDRIVER is not set -# CONFIG_UART3_SERIALDRIVER is not set -# CONFIG_UART4_SERIALDRIVER is not set -# CONFIG_UART5_SERIALDRIVER is not set -# CONFIG_UART6_SERIALDRIVER is not set -# CONFIG_UART7_SERIALDRIVER is not set -# CONFIG_UART8_SERIALDRIVER is not set -# CONFIG_SCI0_SERIALDRIVER is not set -# CONFIG_SCI1_SERIALDRIVER is not set -# CONFIG_USART0_SERIALDRIVER is not set -CONFIG_USART1_SERIALDRIVER=y -CONFIG_USART2_SERIALDRIVER=y -# CONFIG_USART3_SERIALDRIVER is not set -# CONFIG_USART4_SERIALDRIVER is not set -# CONFIG_USART5_SERIALDRIVER is not set -# CONFIG_USART6_SERIALDRIVER is not set -# CONFIG_USART7_SERIALDRIVER is not set -# CONFIG_USART8_SERIALDRIVER is not set -# CONFIG_OTHER_UART_SERIALDRIVER is not set -CONFIG_MCU_SERIAL=y -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y -CONFIG_USART1_SERIAL_CONSOLE=y -# CONFIG_USART2_SERIAL_CONSOLE is not set -# CONFIG_OTHER_SERIAL_CONSOLE is not set -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# USART1 Configuration -# -CONFIG_USART1_RXBUFSIZE=256 -CONFIG_USART1_TXBUFSIZE=256 -CONFIG_USART1_BAUD=115200 -CONFIG_USART1_BITS=8 -CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 -# CONFIG_USART1_IFLOWCONTROL is not set -# CONFIG_USART1_OFLOWCONTROL is not set -# CONFIG_USART1_DMA is not set - -# -# USART2 Configuration -# -CONFIG_USART2_RXBUFSIZE=256 -CONFIG_USART2_TXBUFSIZE=256 -CONFIG_USART2_BAUD=115200 -CONFIG_USART2_BITS=8 -CONFIG_USART2_PARITY=0 -CONFIG_USART2_2STOP=0 -# CONFIG_USART2_IFLOWCONTROL is not set -# CONFIG_USART2_OFLOWCONTROL is not set -# CONFIG_USART2_DMA is not set -# CONFIG_PSEUDOTERM is not set -# CONFIG_USBDEV is not set -# 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 -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_SERIAL_CONSOLE=y -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_CONSOLE=y -# CONFIG_SYSLOG_NONE is not set -# CONFIG_SYSLOG_FILE is not set -# CONFIG_SYSLOG_CHARDEV is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -CONFIG_DISABLE_MOUNTPOINT=y -# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# CONFIG_FS_RAMMAP is not set -# CONFIG_FS_PROCFS is not set -# CONFIG_FS_UNIONFS is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -# CONFIG_MM_SMALL is not set -CONFIG_MM_REGIONS=1 -# CONFIG_ARCH_HAVE_HEAP2 is not set -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -# CONFIG_BUILTIN is not set -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=64 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=2 -# CONFIG_LIBM is not set -# CONFIG_NOPRINTF_FIELDWIDTH is not set -# CONFIG_LIBC_FLOATINGPOINT is not set -CONFIG_LIBC_LONG_LONG=y -# 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 -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set -# CONFIG_LIB_HEX2BIN is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# CAN Utilities -# - -# -# Examples -# -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=7 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=2 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=7 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="WAKEUP" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="TAMPER" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="KEY" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="SELECT" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="DOWN" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="LEFT" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="RIGHT" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="UP" -# CONFIG_EXAMPLES_BUTTONS is not set -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -# CONFIG_EXAMPLES_HELLO is not set -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -# CONFIG_EXAMPLES_NSH is not set -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RFID_READUID is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_RGMP is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_MINIBASIC is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -# CONFIG_NSH_LIBRARY is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_HEXED is not set -# CONFIG_SYSTEM_INSTALL is not set -# CONFIG_SYSTEM_RAMTEST is not set -# CONFIG_READLINE_HAVE_EXTMATCH is not set -# CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_TEE is not set -# CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_SYSTEM_VI is not set -# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/buttons/setenv.sh b/configs/stm3210e-eval/buttons/setenv.sh deleted file mode 100755 index 2bdf5367426..00000000000 --- a/configs/stm3210e-eval/buttons/setenv.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# configs/stm3210e-eval/buttons/setenv.sh -# -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# 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. -# - -if [ "$(basename $0)" = "setenv.sh" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - -WD=`pwd` -export RIDE_BIN="/cygdrive/c/Program Files/Raisonance/Ride/arm-gcc/bin" -export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:${RIDE_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" - -echo "PATH : ${PATH}" From 30318225180e2888a778c86228d5f48e42535366 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 07:37:23 -0600 Subject: [PATCH 12/35] configs: Remove all traces of the no-longer existent ARCHBUTTONS example. --- configs/dk-tm4c129x/ipv6/defconfig | 1 - configs/dk-tm4c129x/nsh/defconfig | 1 - configs/hymini-stm32v/nsh2/defconfig | 28 ++++++++----------- configs/hymini-stm32v/usbnsh/defconfig | 24 ++++++++-------- configs/nucleo-f303re/adc/defconfig | 1 - configs/nucleo-f303re/can/defconfig | 1 - configs/nucleo-f303re/hello/defconfig | 1 - configs/nucleo-f303re/nxlines/defconfig | 1 - configs/nucleo-f303re/pwm/defconfig | 1 - configs/nucleo-f303re/uavcan/defconfig | 1 - configs/olimex-stm32-e407/discover/defconfig | 1 - configs/olimex-stm32-e407/netnsh/defconfig | 1 - configs/olimex-stm32-e407/telnetd/defconfig | 1 - configs/olimex-stm32-e407/webserver/defconfig | 1 - configs/olimex-stm32-h405/usbnsh/defconfig | 24 ++++++++-------- configs/olimex-stm32-p207/nsh/defconfig | 13 --------- configs/olimex-strp711/nettest/defconfig | 1 - configs/olimexino-stm32/composite/defconfig | 28 ++++++++----------- configs/olimexino-stm32/nsh/defconfig | 28 ++++++++----------- configs/sabre-6quad/nsh/defconfig | 1 - configs/sabre-6quad/smp/defconfig | 1 - configs/sam4e-ek/nsh/defconfig | 1 - configs/sam4e-ek/nxwm/defconfig | 1 - configs/sam4e-ek/usbnsh/defconfig | 1 - configs/sama5d4-ek/ipv6/defconfig | 13 --------- configs/sama5d4-ek/nsh/defconfig | 13 --------- configs/sama5d4-ek/nxwm/defconfig | 13 --------- configs/same70-xplained/netnsh/defconfig | 13 --------- configs/same70-xplained/nsh/defconfig | 22 ++++----------- configs/samv71-xult/mxtxplnd/defconfig | 22 ++++----------- configs/samv71-xult/netnsh/defconfig | 13 --------- configs/samv71-xult/nsh/defconfig | 14 +--------- configs/samv71-xult/vnc/defconfig | 1 - configs/samv71-xult/vnxwm/defconfig | 1 - configs/stm3210e-eval/pm/defconfig | 1 - configs/stm32butterfly2/nsh/defconfig | 20 ++++++++----- configs/stm32butterfly2/nshnet/defconfig | 3 -- configs/stm32butterfly2/nshusbdev/defconfig | 20 ++++++++----- configs/stm32butterfly2/nshusbhost/defconfig | 20 ++++++++----- configs/stm32f103-minimum/buttons/defconfig | 1 - configs/stm32f4discovery/ipv6/defconfig | 1 - configs/stm32f4discovery/netnsh/defconfig | 1 - configs/stm32l476vg-disco/nsh/defconfig | 28 +++++++------------ configs/tm4c1294-launchpad/ipv6/defconfig | 1 - configs/viewtool-stm32f107/highpri/defconfig | 1 - configs/viewtool-stm32f107/nsh/defconfig | 1 - 46 files changed, 120 insertions(+), 266 deletions(-) diff --git a/configs/dk-tm4c129x/ipv6/defconfig b/configs/dk-tm4c129x/ipv6/defconfig index 31725598d37..040b6d517a7 100644 --- a/configs/dk-tm4c129x/ipv6/defconfig +++ b/configs/dk-tm4c129x/ipv6/defconfig @@ -920,7 +920,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/dk-tm4c129x/nsh/defconfig b/configs/dk-tm4c129x/nsh/defconfig index 86d440f9e45..b8711463187 100644 --- a/configs/dk-tm4c129x/nsh/defconfig +++ b/configs/dk-tm4c129x/nsh/defconfig @@ -930,7 +930,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index 79ee362dc14..57772618204 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -352,6 +354,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=y @@ -707,14 +715,14 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -1170,20 +1178,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=1 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="Key A" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Key B" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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 diff --git a/configs/hymini-stm32v/usbnsh/defconfig b/configs/hymini-stm32v/usbnsh/defconfig index 1c7d14202fd..37d610d61ea 100644 --- a/configs/hymini-stm32v/usbnsh/defconfig +++ b/configs/hymini-stm32v/usbnsh/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -350,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=y @@ -684,6 +692,8 @@ CONFIG_DEV_NULL=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 @@ -967,20 +977,8 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=1 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="Key A" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Key B" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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 diff --git a/configs/nucleo-f303re/adc/defconfig b/configs/nucleo-f303re/adc/defconfig index 4b674454071..0e2f3b1adc4 100644 --- a/configs/nucleo-f303re/adc/defconfig +++ b/configs/nucleo-f303re/adc/defconfig @@ -884,7 +884,6 @@ CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_NSAMPLES=0 CONFIG_EXAMPLES_ADC_GROUPSIZE=4 CONFIG_EXAMPLES_ADC_SWTRIG=y -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/nucleo-f303re/can/defconfig b/configs/nucleo-f303re/can/defconfig index 3450575cbff..f6e0027a8a1 100644 --- a/configs/nucleo-f303re/can/defconfig +++ b/configs/nucleo-f303re/can/defconfig @@ -882,7 +882,6 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set CONFIG_EXAMPLES_CAN=y CONFIG_EXAMPLES_CAN_DEVPATH="/dev/can0" diff --git a/configs/nucleo-f303re/hello/defconfig b/configs/nucleo-f303re/hello/defconfig index 9c434786e3a..bc432a230b1 100644 --- a/configs/nucleo-f303re/hello/defconfig +++ b/configs/nucleo-f303re/hello/defconfig @@ -931,7 +931,6 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/nucleo-f303re/nxlines/defconfig b/configs/nucleo-f303re/nxlines/defconfig index 6eb9debcdb0..ba05ea87b6b 100644 --- a/configs/nucleo-f303re/nxlines/defconfig +++ b/configs/nucleo-f303re/nxlines/defconfig @@ -1036,7 +1036,6 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CAN is not set # CONFIG_EXAMPLES_CCTYPE is not set diff --git a/configs/nucleo-f303re/pwm/defconfig b/configs/nucleo-f303re/pwm/defconfig index 0e54eba6eb2..4a202c87cd5 100644 --- a/configs/nucleo-f303re/pwm/defconfig +++ b/configs/nucleo-f303re/pwm/defconfig @@ -889,7 +889,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/nucleo-f303re/uavcan/defconfig b/configs/nucleo-f303re/uavcan/defconfig index 944984f2d52..a55127ce49d 100644 --- a/configs/nucleo-f303re/uavcan/defconfig +++ b/configs/nucleo-f303re/uavcan/defconfig @@ -895,7 +895,6 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/olimex-stm32-e407/discover/defconfig b/configs/olimex-stm32-e407/discover/defconfig index ee655a6e3fe..adb8afe01bb 100644 --- a/configs/olimex-stm32-e407/discover/defconfig +++ b/configs/olimex-stm32-e407/discover/defconfig @@ -1154,7 +1154,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/olimex-stm32-e407/netnsh/defconfig b/configs/olimex-stm32-e407/netnsh/defconfig index 3e13c92c6dc..c09c158e180 100644 --- a/configs/olimex-stm32-e407/netnsh/defconfig +++ b/configs/olimex-stm32-e407/netnsh/defconfig @@ -1156,7 +1156,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/olimex-stm32-e407/telnetd/defconfig b/configs/olimex-stm32-e407/telnetd/defconfig index 5e3a351669b..a20c3d7cd63 100644 --- a/configs/olimex-stm32-e407/telnetd/defconfig +++ b/configs/olimex-stm32-e407/telnetd/defconfig @@ -1156,7 +1156,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/olimex-stm32-e407/webserver/defconfig b/configs/olimex-stm32-e407/webserver/defconfig index 7ab0ac66f89..124c1c88f9f 100644 --- a/configs/olimex-stm32-e407/webserver/defconfig +++ b/configs/olimex-stm32-e407/webserver/defconfig @@ -1154,7 +1154,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/olimex-stm32-h405/usbnsh/defconfig b/configs/olimex-stm32-h405/usbnsh/defconfig index a0deb7cb54e..dd4cc0fb40d 100644 --- a/configs/olimex-stm32-h405/usbnsh/defconfig +++ b/configs/olimex-stm32-h405/usbnsh/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -357,6 +359,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=y CONFIG_STM32_HAVE_DAC1=y @@ -737,6 +745,8 @@ CONFIG_CAN_NPENDINGRTR=4 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 @@ -1045,19 +1055,6 @@ CONFIG_EXAMPLES_ADC=y CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_GROUPSIZE=4 # CONFIG_EXAMPLES_ADC_SWTRIG is not set -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="BUT" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set CONFIG_EXAMPLES_CAN=y CONFIG_EXAMPLES_CAN_DEVPATH="/dev/can0" @@ -1065,6 +1062,7 @@ CONFIG_EXAMPLES_CAN_NMSGS=32 # CONFIG_EXAMPLES_CAN_READ is not set # CONFIG_EXAMPLES_CAN_WRITE is not set CONFIG_EXAMPLES_CAN_READWRITE=y +# CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CXXTEST is not set diff --git a/configs/olimex-stm32-p207/nsh/defconfig b/configs/olimex-stm32-p207/nsh/defconfig index caa647b50d6..2c60b366507 100644 --- a/configs/olimex-stm32-p207/nsh/defconfig +++ b/configs/olimex-stm32-p207/nsh/defconfig @@ -1211,19 +1211,6 @@ CONFIG_EXAMPLES_ADC=y CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_GROUPSIZE=1 # CONFIG_EXAMPLES_ADC_SWTRIG is not set -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=6 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=7 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="Button 0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CAN is not set # CONFIG_EXAMPLES_CCTYPE is not set diff --git a/configs/olimex-strp711/nettest/defconfig b/configs/olimex-strp711/nettest/defconfig index 631f41fc69d..05e90b4d782 100644 --- a/configs/olimex-strp711/nettest/defconfig +++ b/configs/olimex-strp711/nettest/defconfig @@ -772,7 +772,6 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/olimexino-stm32/composite/defconfig b/configs/olimexino-stm32/composite/defconfig index fcb7a0c8d7f..6e75398ee7c 100644 --- a/configs/olimexino-stm32/composite/defconfig +++ b/configs/olimexino-stm32/composite/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -350,6 +352,12 @@ CONFIG_STM32_HAVE_ADC1_DMA=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 @@ -717,14 +725,14 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -1101,20 +1109,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="BOOT 0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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_CXXTEST is not set diff --git a/configs/olimexino-stm32/nsh/defconfig b/configs/olimexino-stm32/nsh/defconfig index 8b9fd359f98..43c0283f2da 100644 --- a/configs/olimexino-stm32/nsh/defconfig +++ b/configs/olimexino-stm32/nsh/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -350,6 +352,12 @@ CONFIG_STM32_HAVE_ADC1_DMA=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 @@ -716,14 +724,14 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -1030,20 +1038,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="BOOT 0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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_CXXTEST is not set diff --git a/configs/sabre-6quad/nsh/defconfig b/configs/sabre-6quad/nsh/defconfig index dfc9ef8d6f4..e49adfad3a3 100644 --- a/configs/sabre-6quad/nsh/defconfig +++ b/configs/sabre-6quad/nsh/defconfig @@ -685,7 +685,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sabre-6quad/smp/defconfig b/configs/sabre-6quad/smp/defconfig index 23afd07fe96..1e0d04e2f14 100644 --- a/configs/sabre-6quad/smp/defconfig +++ b/configs/sabre-6quad/smp/defconfig @@ -692,7 +692,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sam4e-ek/nsh/defconfig b/configs/sam4e-ek/nsh/defconfig index ed3f03c24b0..2ef13dd91f6 100644 --- a/configs/sam4e-ek/nsh/defconfig +++ b/configs/sam4e-ek/nsh/defconfig @@ -999,7 +999,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sam4e-ek/nxwm/defconfig b/configs/sam4e-ek/nxwm/defconfig index 3d8dd79bb02..e0f08e426d7 100644 --- a/configs/sam4e-ek/nxwm/defconfig +++ b/configs/sam4e-ek/nxwm/defconfig @@ -1171,7 +1171,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sam4e-ek/usbnsh/defconfig b/configs/sam4e-ek/usbnsh/defconfig index b96a1ca08a7..79c11c73855 100644 --- a/configs/sam4e-ek/usbnsh/defconfig +++ b/configs/sam4e-ek/usbnsh/defconfig @@ -1036,7 +1036,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sama5d4-ek/ipv6/defconfig b/configs/sama5d4-ek/ipv6/defconfig index c60fca08436..dc12843886d 100644 --- a/configs/sama5d4-ek/ipv6/defconfig +++ b/configs/sama5d4-ek/ipv6/defconfig @@ -1298,19 +1298,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="PB_USER" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sama5d4-ek/nsh/defconfig b/configs/sama5d4-ek/nsh/defconfig index 446b2d3dfd8..6e39bfc3121 100644 --- a/configs/sama5d4-ek/nsh/defconfig +++ b/configs/sama5d4-ek/nsh/defconfig @@ -1309,19 +1309,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="PB_USER" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/sama5d4-ek/nxwm/defconfig b/configs/sama5d4-ek/nxwm/defconfig index 907dd01ff81..491f250f7ba 100644 --- a/configs/sama5d4-ek/nxwm/defconfig +++ b/configs/sama5d4-ek/nxwm/defconfig @@ -1297,19 +1297,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="PB_USER" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/same70-xplained/netnsh/defconfig b/configs/same70-xplained/netnsh/defconfig index 70c8117a63d..1313e21cb9a 100644 --- a/configs/same70-xplained/netnsh/defconfig +++ b/configs/same70-xplained/netnsh/defconfig @@ -1041,19 +1041,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="SW0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/same70-xplained/nsh/defconfig b/configs/same70-xplained/nsh/defconfig index 183961eacf0..d43cf6698c0 100644 --- a/configs/same70-xplained/nsh/defconfig +++ b/configs/same70-xplained/nsh/defconfig @@ -64,11 +64,13 @@ 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_RGMP 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" @@ -525,15 +527,15 @@ CONFIG_I2C=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set # CONFIG_SPI_HWFEATURES is not set -# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set -CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set -# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set # CONFIG_SPI_BITBANG is not set @@ -860,20 +862,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=0 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=0 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="SW0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Button 1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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 diff --git a/configs/samv71-xult/mxtxplnd/defconfig b/configs/samv71-xult/mxtxplnd/defconfig index 3ce521bbfb0..940bcd430c0 100644 --- a/configs/samv71-xult/mxtxplnd/defconfig +++ b/configs/samv71-xult/mxtxplnd/defconfig @@ -64,11 +64,13 @@ 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_RGMP 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" @@ -526,15 +528,15 @@ CONFIG_I2C=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set # CONFIG_SPI_HWFEATURES is not set -# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set -CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set -# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set # CONFIG_SPI_BITBANG is not set @@ -990,20 +992,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=1 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="SW0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="SW1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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 diff --git a/configs/samv71-xult/netnsh/defconfig b/configs/samv71-xult/netnsh/defconfig index 4cdc68ea282..54877ac7e1f 100644 --- a/configs/samv71-xult/netnsh/defconfig +++ b/configs/samv71-xult/netnsh/defconfig @@ -1045,19 +1045,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=1 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="SW0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="SW1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/samv71-xult/nsh/defconfig b/configs/samv71-xult/nsh/defconfig index a35e82a9b86..c376395c8bb 100644 --- a/configs/samv71-xult/nsh/defconfig +++ b/configs/samv71-xult/nsh/defconfig @@ -64,6 +64,7 @@ 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_RGMP is not set # CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_RISCV is not set @@ -864,19 +865,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=1 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="SW0" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="SW1" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Button 2" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Button 3" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Button 4" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/samv71-xult/vnc/defconfig b/configs/samv71-xult/vnc/defconfig index c956688f1c1..2e7a83721cd 100644 --- a/configs/samv71-xult/vnc/defconfig +++ b/configs/samv71-xult/vnc/defconfig @@ -1137,7 +1137,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig index c5f417361a6..af193924281 100644 --- a/configs/samv71-xult/vnxwm/defconfig +++ b/configs/samv71-xult/vnxwm/defconfig @@ -1168,7 +1168,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/stm3210e-eval/pm/defconfig b/configs/stm3210e-eval/pm/defconfig index 957c9a57a1c..86003dfefcc 100644 --- a/configs/stm3210e-eval/pm/defconfig +++ b/configs/stm3210e-eval/pm/defconfig @@ -1133,7 +1133,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set diff --git a/configs/stm32butterfly2/nsh/defconfig b/configs/stm32butterfly2/nsh/defconfig index 76318ef95cd..08a3f805deb 100644 --- a/configs/stm32butterfly2/nsh/defconfig +++ b/configs/stm32butterfly2/nsh/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -354,6 +356,12 @@ CONFIG_STM32_HAVE_ADC2=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=y CONFIG_STM32_HAVE_DAC1=y @@ -589,7 +597,7 @@ CONFIG_CLOCK_MONOTONIC=y CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=1970 -CONFIG_START_MONTH=0 +CONFIG_START_MONTH=1 CONFIG_START_DAY=1 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -702,14 +710,14 @@ CONFIG_RAMDISK=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -1024,10 +1032,8 @@ CONFIG_EXAMPLES_ADC=y CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_GROUPSIZE=4 CONFIG_EXAMPLES_ADC_SWTRIG=y -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=4 # 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 diff --git a/configs/stm32butterfly2/nshnet/defconfig b/configs/stm32butterfly2/nshnet/defconfig index fe385454a68..41bdf15b31f 100644 --- a/configs/stm32butterfly2/nshnet/defconfig +++ b/configs/stm32butterfly2/nshnet/defconfig @@ -1212,9 +1212,6 @@ CONFIG_EXAMPLES_ADC=y CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_GROUPSIZE=4 CONFIG_EXAMPLES_ADC_SWTRIG=y -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=4 # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/stm32butterfly2/nshusbdev/defconfig b/configs/stm32butterfly2/nshusbdev/defconfig index e9ca79f09d5..63dc8d5a1d8 100644 --- a/configs/stm32butterfly2/nshusbdev/defconfig +++ b/configs/stm32butterfly2/nshusbdev/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -351,6 +353,12 @@ CONFIG_STM32_HAVE_ADC2=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=y CONFIG_STM32_HAVE_DAC1=y @@ -582,7 +590,7 @@ CONFIG_CLOCK_MONOTONIC=y CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=1970 -CONFIG_START_MONTH=0 +CONFIG_START_MONTH=1 CONFIG_START_DAY=1 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -695,14 +703,14 @@ CONFIG_RAMDISK=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -1033,10 +1041,8 @@ CONFIG_EXAMPLES_ADC=y CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_GROUPSIZE=4 CONFIG_EXAMPLES_ADC_SWTRIG=y -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=4 # 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 diff --git a/configs/stm32butterfly2/nshusbhost/defconfig b/configs/stm32butterfly2/nshusbhost/defconfig index 76318ef95cd..08a3f805deb 100644 --- a/configs/stm32butterfly2/nshusbhost/defconfig +++ b/configs/stm32butterfly2/nshusbhost/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -354,6 +356,12 @@ CONFIG_STM32_HAVE_ADC2=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=y CONFIG_STM32_HAVE_DAC1=y @@ -589,7 +597,7 @@ CONFIG_CLOCK_MONOTONIC=y CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=1970 -CONFIG_START_MONTH=0 +CONFIG_START_MONTH=1 CONFIG_START_DAY=1 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -702,14 +710,14 @@ CONFIG_RAMDISK=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -1024,10 +1032,8 @@ CONFIG_EXAMPLES_ADC=y CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" CONFIG_EXAMPLES_ADC_GROUPSIZE=4 CONFIG_EXAMPLES_ADC_SWTRIG=y -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=4 # 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 diff --git a/configs/stm32f103-minimum/buttons/defconfig b/configs/stm32f103-minimum/buttons/defconfig index b9acf84dced..37ad971e052 100644 --- a/configs/stm32f103-minimum/buttons/defconfig +++ b/configs/stm32f103-minimum/buttons/defconfig @@ -937,7 +937,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set CONFIG_EXAMPLES_BUTTONS=y CONFIG_EXAMPLES_BUTTONS_PRIORITY=100 CONFIG_EXAMPLES_BUTTONS_STACKSIZE=2048 diff --git a/configs/stm32f4discovery/ipv6/defconfig b/configs/stm32f4discovery/ipv6/defconfig index 3b013094777..9a828de914c 100644 --- a/configs/stm32f4discovery/ipv6/defconfig +++ b/configs/stm32f4discovery/ipv6/defconfig @@ -1216,7 +1216,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/stm32f4discovery/netnsh/defconfig b/configs/stm32f4discovery/netnsh/defconfig index 2960a94caf4..61d4db2c5ba 100644 --- a/configs/stm32f4discovery/netnsh/defconfig +++ b/configs/stm32f4discovery/netnsh/defconfig @@ -1227,7 +1227,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/stm32l476vg-disco/nsh/defconfig b/configs/stm32l476vg-disco/nsh/defconfig index 25cfb5102ce..4bebf44d351 100644 --- a/configs/stm32l476vg-disco/nsh/defconfig +++ b/configs/stm32l476vg-disco/nsh/defconfig @@ -61,11 +61,13 @@ 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_RGMP 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" @@ -244,6 +246,8 @@ CONFIG_STM32L4_PWR=y # CONFIG_STM32L4_USART1 is not set CONFIG_STM32L4_USART2=y # CONFIG_STM32L4_USART3 is not set +# CONFIG_STM32L4_UART4 is not set +# CONFIG_STM32L4_UART5 is not set # CONFIG_STM32L4_I2C1 is not set # CONFIG_STM32L4_I2C2 is not set # CONFIG_STM32L4_I2C3 is not set @@ -293,8 +297,8 @@ CONFIG_STM32L4_SAI1PLL=y # CONFIG_STM32L4_ONESHOT is not set # CONFIG_STM32L4_FREERUN is not set CONFIG_STM32L4_HAVE_USART3=y -# CONFIG_STM32L4_HAVE_USART4 is not set -# CONFIG_STM32L4_HAVE_USART5 is not set +CONFIG_STM32L4_HAVE_UART4=y +CONFIG_STM32L4_HAVE_UART5=y # # U[S]ART Configuration @@ -519,14 +523,14 @@ CONFIG_DEV_LOOP=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set # CONFIG_SPI_HWFEATURES 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_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_SPI_DRIVER is not set @@ -852,20 +856,8 @@ CONFIG_EXAMPLES_ALARM_PRIORITY=100 CONFIG_EXAMPLES_ALARM_STACKSIZE=2048 CONFIG_EXAMPLES_ALARM_DEVPATH="/dev/rtc0" CONFIG_EXAMPLES_ALARM_SIGNO=1 -CONFIG_EXAMPLES_ARCHBUTTONS=y -CONFIG_EXAMPLES_ARCHBUTTONS_MIN=0 -CONFIG_EXAMPLES_ARCHBUTTONS_MAX=4 -CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 -CONFIG_EXAMPLES_IRQBUTTONS_MAX=4 -CONFIG_EXAMPLES_ARCHBUTTONS_NAME0="Center" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME1="Left" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME2="Down" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME3="Right" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME4="Up" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME5="Button 5" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME6="Button 6" -CONFIG_EXAMPLES_ARCHBUTTONS_NAME7="Button 7" # 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_CXXTEST is not set diff --git a/configs/tm4c1294-launchpad/ipv6/defconfig b/configs/tm4c1294-launchpad/ipv6/defconfig index 4de7a634ef3..25fc93d9658 100644 --- a/configs/tm4c1294-launchpad/ipv6/defconfig +++ b/configs/tm4c1294-launchpad/ipv6/defconfig @@ -882,7 +882,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/viewtool-stm32f107/highpri/defconfig b/configs/viewtool-stm32f107/highpri/defconfig index 81e2ca9c17b..ece24f6b885 100644 --- a/configs/viewtool-stm32f107/highpri/defconfig +++ b/configs/viewtool-stm32f107/highpri/defconfig @@ -942,7 +942,6 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set diff --git a/configs/viewtool-stm32f107/nsh/defconfig b/configs/viewtool-stm32f107/nsh/defconfig index 1baa61b9fc9..243f7bfee44 100644 --- a/configs/viewtool-stm32f107/nsh/defconfig +++ b/configs/viewtool-stm32f107/nsh/defconfig @@ -945,7 +945,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # -# CONFIG_EXAMPLES_ARCHBUTTONS is not set # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set From a3112b231ca7d65b08e0758c400e3edb739b0a19 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 07:49:04 -0600 Subject: [PATCH 13/35] nucleo-l476rg: Add better selection of timer. --- configs/nucleo-l476rg/Kconfig | 5 -- configs/nucleo-l476rg/src/stm32_appinit.c | 72 ++++++++++++++++++++++- 2 files changed, 71 insertions(+), 6 deletions(-) diff --git a/configs/nucleo-l476rg/Kconfig b/configs/nucleo-l476rg/Kconfig index 8edd703e42c..7361b3f4904 100644 --- a/configs/nucleo-l476rg/Kconfig +++ b/configs/nucleo-l476rg/Kconfig @@ -5,11 +5,6 @@ if ARCH_BOARD_NUCLEO_L476RG -config NUCLEO_L476RG_QETIMER - int "Timer to use with QE encoder" - default 3 - depends on QENCODER - config NUCLEO_L476RG_AJOY_MINBUTTONS bool "Minimal Joystick Buttons" default n if !STM32_USART1 diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index ceeca0eff36..ab2665bc739 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -111,6 +111,10 @@ int board_app_initialize(uintptr_t arg) { #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; +#endif +#ifdef CONFIG_QENCODER + int index; + char buf[9]; #endif int ret; @@ -219,9 +223,14 @@ int board_app_initialize(uintptr_t arg) #endif #ifdef CONFIG_QENCODER + /* Initialize and register the qencoder driver */ - ret = stm32l4_qencoder_initialize("/dev/qe0", CONFIG_NUCLEO_L476RG_QETIMER); + index = 0; + +#ifdef CONFIG_STM32L4_TIM1_QE + sprintf(buf, "/dev/qe%d", index++); + ret = stm32l4_qencoder_initialize(buf, 1); if (ret != OK) { syslog(LOG_ERR, @@ -231,6 +240,67 @@ int board_app_initialize(uintptr_t arg) } #endif +#ifdef CONFIG_STM32L4_TIM2_QE + sprintf(buf, "/dev/qe%d", index++); + ret = stm32l4_qencoder_initialize(buf, 2); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + +#ifdef CONFIG_STM32L4_TIM3_QE + sprintf(buf, "/dev/qe%d", index++); + ret = stm32l4_qencoder_initialize(buf, 3); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + +#ifdef CONFIG_STM32L4_TIM4_QE + sprintf(buf, "/dev/qe%d", index++); + ret = stm32l4_qencoder_initialize(buf, 4); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + +#ifdef CONFIG_STM32L4_TIM5_QE + sprintf(buf, "/dev/qe%d", index++); + ret = stm32l4_qencoder_initialize(buf, 5); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + +#ifdef CONFIG_STM32L4_TIM8_QE + sprintf(buf, "/dev/qe%d", index++); + ret = stm32l4_qencoder_initialize(buf, 8); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return ret; + } +#endif + +#endif return OK; } From ec586ab3509c1d8f524a3ded2867ae45b8b20786 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Tue, 22 Nov 2016 07:57:21 -0600 Subject: [PATCH 14/35] implementation of dumpgpio for stm32l4, was required for pwm debug. --- arch/arm/src/stm32l4/chip/stm32l4x6xx_rcc.h | 1 + arch/arm/src/stm32l4/stm32l4_dumpgpio.c | 153 ++++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/arch/arm/src/stm32l4/chip/stm32l4x6xx_rcc.h b/arch/arm/src/stm32l4/chip/stm32l4x6xx_rcc.h index 0b184230b4b..c56e59c8116 100644 --- a/arch/arm/src/stm32l4/chip/stm32l4x6xx_rcc.h +++ b/arch/arm/src/stm32l4/chip/stm32l4x6xx_rcc.h @@ -381,6 +381,7 @@ /* AHB2 peripheral reset register */ +#define RCC_AHB1ENR_GPIOEN(port) (1 << port) #define RCC_AHB2RSTR_GPIOARST (1 << 0) /* Bit 0: IO port A reset */ #define RCC_AHB2RSTR_GPIOBRST (1 << 1) /* Bit 1: IO port B reset */ #define RCC_AHB2RSTR_GPIOCRST (1 << 2) /* Bit 2: IO port C reset */ diff --git a/arch/arm/src/stm32l4/stm32l4_dumpgpio.c b/arch/arm/src/stm32l4/stm32l4_dumpgpio.c index e69de29bb2d..c0eabb206c9 100644 --- a/arch/arm/src/stm32l4/stm32l4_dumpgpio.c +++ b/arch/arm/src/stm32l4/stm32l4_dumpgpio.c @@ -0,0 +1,153 @@ +/**************************************************************************** + * arch/arm/src/stm32l4/stm32l4_dumpgpio.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_INFO 1 + +#include +#include + +#include + +#include "up_arch.h" +#include "chip.h" +#include "stm32l4_gpio.h" +#include "stm32l4_rcc.h" + +#ifdef CONFIG_DEBUG_FEATURES + +/**************************************************************************** + * Private Data + ****************************************************************************/ +/* Port letters for prettier debug output */ + +static const char g_portchar[STM32L4_NPORTS] = +{ +#if STM32L4_NPORTS > 11 +# error "Additional support required for this number of GPIOs" +#elif STM32L4_NPORTS > 10 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K' +#elif STM32L4_NPORTS > 9 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J' +#elif STM32L4_NPORTS > 8 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I' +#elif STM32L4_NPORTS > 7 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' +#elif STM32L4_NPORTS > 6 + 'A', 'B', 'C', 'D', 'E', 'F', 'G' +#elif STM32L4_NPORTS > 5 + 'A', 'B', 'C', 'D', 'E', 'F' +#elif STM32L4_NPORTS > 4 + 'A', 'B', 'C', 'D', 'E' +#elif STM32L4_NPORTS > 3 + 'A', 'B', 'C', 'D' +#elif STM32L4_NPORTS > 2 + 'A', 'B', 'C' +#elif STM32L4_NPORTS > 1 + 'A', 'B' +#elif STM32L4_NPORTS > 0 + 'A' +#else +# error "Bad number of GPIOs" +#endif +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Function: stm32l4_dumpgpio + * + * Description: + * Dump all GPIO registers associated with the provided base address + * + ****************************************************************************/ + +int stm32l4_dumpgpio(uint32_t pinset, const char *msg) +{ + irqstate_t flags; + uint32_t base; + unsigned int port; + + /* Get the base address associated with the GPIO port */ + + port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; + base = g_gpiobase[port]; + + /* The following requires exclusive access to the GPIO registers */ + + flags = enter_critical_section(); + + DEBUGASSERT(port < STM32L4_NPORTS); + + _info("GPIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); + + if ((getreg32(STM32L4_RCC_AHB1ENR) & RCC_AHB1ENR_GPIOEN(port)) != 0) + { + _info(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", + getreg32(base + STM32L4_GPIO_MODER_OFFSET), + getreg32(base + STM32L4_GPIO_OTYPER_OFFSET), + getreg32(base + STM32L4_GPIO_OSPEED_OFFSET), + getreg32(base + STM32L4_GPIO_PUPDR_OFFSET)); + _info(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", + getreg32(base + STM32L4_GPIO_IDR_OFFSET), + getreg32(base + STM32L4_GPIO_ODR_OFFSET), + getreg32(base + STM32L4_GPIO_BSRR_OFFSET), + getreg32(base + STM32L4_GPIO_LCKR_OFFSET)); + _info(" AFRH: %08x AFRL: %08x\n", + getreg32(base + STM32L4_GPIO_AFRH_OFFSET), + getreg32(base + STM32L4_GPIO_AFRL_OFFSET)); + } + else + { + _info(" GPIO%c not enabled: AHB1ENR: %08x\n", + g_portchar[port], getreg32(STM32L4_RCC_AHB1ENR)); + } + + leave_critical_section(flags); + return OK; +} + +#endif /* CONFIG_DEBUG_FEATURES */ From b39556f625122d6565457860891d314c895adefd Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 09:03:50 -0600 Subject: [PATCH 15/35] Update READMEs --- configs/hymini-stm32v/README.txt | 1 - configs/open1788/README.txt | 26 --------------------- configs/same70-xplained/README.txt | 37 ++++-------------------------- configs/samv71-xult/README.txt | 37 ++++-------------------------- 4 files changed, 8 insertions(+), 93 deletions(-) diff --git a/configs/hymini-stm32v/README.txt b/configs/hymini-stm32v/README.txt index 2a804a43a69..7fec3b1562c 100644 --- a/configs/hymini-stm32v/README.txt +++ b/configs/hymini-stm32v/README.txt @@ -591,7 +591,6 @@ Where is one of the following: Built-in None apps/examples/nx Apps apps/examples/nxhello apps/system/usbmsc (4) - apps/examples/buttons apps/examples/nximage =========== ======================= ================================ diff --git a/configs/open1788/README.txt b/configs/open1788/README.txt index b7419b33aad..b8604d6346a 100644 --- a/configs/open1788/README.txt +++ b/configs/open1788/README.txt @@ -467,32 +467,6 @@ CONFIGURATION CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INPUT=y - 7. The button test (apps/examples/buttons) can be built-in by adding - the following options. See apps/examples/README.txt for further - information about the button test. - - System Type: - CONFIG_LPC17_GPIOIRQ=y - - Board Selection: - CONFIG_ARCH_BUTTONS=y - CONFIG_ARCH_IRQBUTTONS=y - - Application Configuration: - CONFIG_EXAMPLES_BUTTONS=y - CONFIG_EXAMPLES_BUTTONS_MIN=0 - CONFIG_EXAMPLES_BUTTONS_MAX=7 - CONFIG_EXAMPLES_IRQBUTTONS_MIN=1 - CONFIG_EXAMPLES_IRQBUTTONS_MAX=7 - CONFIG_EXAMPLES_BUTTONS_NAME0="USER1" - CONFIG_EXAMPLES_BUTTONS_NAME1="USER2" - CONFIG_EXAMPLES_BUTTONS_NAME2="USER3" - CONFIG_EXAMPLES_BUTTONS_NAME3="JOYSTICK_A" - CONFIG_EXAMPLES_BUTTONS_NAME4="JOYSTICK_B" - CONFIG_EXAMPLES_BUTTONS_NAME5="JOYSTICK_C" - CONFIG_EXAMPLES_BUTTONS_NAME6="JOYSTICK_D" - CONFIG_EXAMPLES_BUTTONS_NAME7="JOYSTICK_CTR" - nxlines ------- Configures the graphics example located at examples/nsh. This diff --git a/configs/same70-xplained/README.txt b/configs/same70-xplained/README.txt index 6f84f024fa6..7d31d20e9d5 100644 --- a/configs/same70-xplained/README.txt +++ b/configs/same70-xplained/README.txt @@ -1363,36 +1363,7 @@ Configuration sub-directories RAMTest: Address-in-address test: 70000000 2097152 nsh> - 5. The button test at apps/examples/buttons is included in the - configuration. This configuration illustrates (1) use of the buttons - on the evaluation board, and (2) the use of PIO interrupts. Example - usage: - - NuttShell (NSH) NuttX-7.8 - nsh> help - help usage: help [-v] [] - ... - Builtin Apps: - buttons - nsh> buttons 3 - maxbuttons: 3 - Attached handler at 4078f7 to button 0 [SW0], oldhandler:0 - Attached handler at 4078e9 to button 1 [SW1], oldhandler:0 - IRQ:125 Button 1:SW1 SET:00: - SW1 released - IRQ:125 Button 1:SW1 SET:02: - SW1 depressed - IRQ:125 Button 1:SW1 SET:00: - SW1 released - IRQ:90 Button 0:SW0 SET:01: - SW0 depressed - IRQ:90 Button 0:SW0 SET:00: - SW0 released - IRQ:125 Button 1:SW1 SET:02: - SW1 depressed - nsh> - - 6. TWI/I2C + 5. TWI/I2C TWIHS0 is enabled in this configuration. The SAM E70 Xplained supports one device on the one on-board I2C device on the TWIHS0 bus: @@ -1464,11 +1435,11 @@ Configuration sub-directories 0x5f are the addresses of the AT24 EEPROM (I am not sure what the other address, 0x37, is as this writing). - 7. TWIHS0 is also used to support 256 byte non-volatile storage for + 6. TWIHS0 is also used to support 256 byte non-volatile storage for configuration data using the MTD configuration as described above under the heading, "MTD Configuration Data". - 8. Support for HSMCI is built-in by default. The SAME70-XPLD provides + 7. Support for HSMCI is built-in by default. The SAME70-XPLD provides one full-size SD memory card slot. Refer to the section entitled "SD card" for configuration-related information. @@ -1477,7 +1448,7 @@ Configuration sub-directories The auto-mounter is not enabled. See the section above entitled "Auto-Mounter". - 9. Performance-related Configuration settings: + 8. Performance-related Configuration settings: CONFIG_ARMV7M_ICACHE=y : Instruction cache is enabled CONFIG_ARMV7M_DCACHE=y : Data cache is enabled diff --git a/configs/samv71-xult/README.txt b/configs/samv71-xult/README.txt index d51f23dfe17..f84223d5b88 100644 --- a/configs/samv71-xult/README.txt +++ b/configs/samv71-xult/README.txt @@ -2053,36 +2053,7 @@ Configuration sub-directories RAMTest: Address-in-address test: 70000000 2097152 nsh> - 5. The button test at apps/examples/buttons is included in the - configuration. This configuration illustrates (1) use of the buttons - on the evaluation board, and (2) the use of PIO interrupts. Example - usage: - - NuttShell (NSH) NuttX-7.8 - nsh> help - help usage: help [-v] [] - ... - Builtin Apps: - buttons - nsh> buttons 3 - maxbuttons: 3 - Attached handler at 4078f7 to button 0 [SW0], oldhandler:0 - Attached handler at 4078e9 to button 1 [SW1], oldhandler:0 - IRQ:125 Button 1:SW1 SET:00: - SW1 released - IRQ:125 Button 1:SW1 SET:02: - SW1 depressed - IRQ:125 Button 1:SW1 SET:00: - SW1 released - IRQ:90 Button 0:SW0 SET:01: - SW0 depressed - IRQ:90 Button 0:SW0 SET:00: - SW0 released - IRQ:125 Button 1:SW1 SET:02: - SW1 depressed - nsh> - - 6. TWI/I2C + 5. TWI/I2C TWIHS0 is enabled in this configuration. The SAM V71 Xplained Ultra supports two devices on the one on-board I2C device on the TWIHS0 bus: @@ -2159,11 +2130,11 @@ Configuration sub-directories the AT2 EEPROM (I am not sure what the other address, 0x37, is as this writing). - 7. TWIHS0 is also used to support 256 byte non-volatile storage for + 6. TWIHS0 is also used to support 256 byte non-volatile storage for configuration data using the MTD configuration as described above under the heading, "MTD Configuration Data". - 8. Support for HSMCI is built-in by default. The SAMV71-XULT provides + 7. Support for HSMCI is built-in by default. The SAMV71-XULT provides one full-size SD memory card slot. Refer to the section entitled "SD card" for configuration-related information. @@ -2172,7 +2143,7 @@ Configuration sub-directories The auto-mounter is not enabled. See the section above entitled "Auto-Mounter". - 9. Performance-related Configuration settings: + 8. Performance-related Configuration settings: CONFIG_ARMV7M_ICACHE=y : Instruction cache is enabled CONFIG_ARMV7M_DCACHE=y : Data cache is enabled From bac7153609dd8e9c7140fc24fb1a7957525aa150 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 11:34:16 -0600 Subject: [PATCH 16/35] SMP: Add logic to avoid a deadlock condition when CPU1 is hung waiting for g_cpu_irqlock and CPU0 is waitin for g_cpu_paused --- TODO | 39 +------- arch/arm/src/armv7-a/arm_cpupause.c | 140 ++++++++++++++++++++++------ arch/sim/src/up_internal.h | 19 ++++ arch/sim/src/up_simsmp.c | 33 +++++-- arch/sim/src/up_smpsignal.c | 62 ++++++++---- include/nuttx/arch.h | 50 ++++++++++ include/nuttx/spinlock.h | 22 ++++- sched/irq/irq_csection.c | 77 ++++++++++++++- sched/semaphore/spinlock.c | 16 ---- sched/task/task_restart.c | 5 +- 10 files changed, 348 insertions(+), 115 deletions(-) diff --git a/TODO b/TODO index 77fb109fe40..d50c610998a 100644 --- a/TODO +++ b/TODO @@ -10,7 +10,7 @@ issues related to each board port. nuttx/: (13) Task/Scheduler (sched/) - (2) SMP + (1) SMP (1) Memory Management (mm/) (1) Power Management (drivers/pm) (3) Signals (sched/signal, arch/) @@ -336,43 +336,6 @@ o SMP Priority: High. spinlocks, and hence SMP, will not work on such systems without this change. - Title: DEADLOCK SCENARIO WITH up_cpu_pause(). - Description: I think there is a possibilty for a hang in up_cpu_pause(). - Suppose this situation: - - - CPU1 is in a critical section and has the g_cpu_irqlock - spinlock. - - CPU0 takes an interrupt and attempts to enter the critical - section. It spins waiting on g_cpu_irqlock with interrupt - disabled. - - CPU1 calls up_cpu_pause() to pause operation on CPU1. This - will issue an inter-CPU interrupt to CPU0 - - But interrupts are disabled. What will happen? I think - that this is a deadlock: Interrupts will stay disabled on - CPU0 because it is spinning in the interrupt handler; - up_cpu_pause() will hang becuase the inter-CPU interrupt - is pending. - - Are inter-CPU interrupts maskable in the same way as other - interrupts? If the are not-maskable, then we must also handle - them as nested interrupts in some fashion. - - A work-around might be to check the state of other-CPU - interrupt handler inside the spin loop of up_cpu_pause(). - Having the other CPU spinning and waiting for up_cpu_pause() - provided that (1) the pending interrupt can be cleared, and - (2) leave_critical_section() is not called prior to the point - where up_cpu_resume() is called, and (3) up_cpu_resume() is - smart enough to know that it should not attempt to resume a - non-paused CPU. - - This would require some kind of information about each - interrupt handler: In an interrupt, waiting for spinlock, - have spinlock, etc. - - Status: Open - Priority: Medium-High. I don't know for certain that this is a problem but it seems like it could - o Memory Management (mm/) ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index 7689598b552..4abfac25b11 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -55,6 +55,20 @@ * Private Data ****************************************************************************/ +/* These spinlocks are used in the SMP configuration in order to implement + * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows + * + * 1. The up_cpu_pause() implementation on CPUn locks both g_cpu_wait[m] + * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_wait[m]. + * 2. CPUm receives the interrupt it (1) unlocks g_cpu_paused[m] and + * (2) locks g_cpu_wait[m]. The first unblocks CPUn and the second + * blocks CPUm in the interrupt handler. + * + * When CPUm resumes, CPUn unlocks g_cpu_wait[m] and the interrupt handler + * on CPUm continues. CPUm must, of course, also then unlock g_cpu_wait[m] + * so that it will be ready for the next pause operation. + */ + static volatile spinlock_t g_cpu_wait[CONFIG_SMP_NCPUS]; static volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS]; @@ -62,6 +76,92 @@ static volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS]; * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: up_cpu_pausereq + * + * Description: + * Return true if a pause request is pending for this CPU. + * + * Input Parameters: + * cpu - The index of the CPU to be queried + * + * Returned Value: + * true = a pause request is pending. + * false = no pasue request is pending. + * + ****************************************************************************/ + +bool up_cpu_pausereq(int cpu) +{ + return spin_islocked(&g_cpu_paused[cpu]); +} + +/**************************************************************************** + * Name: up_cpu_paused + * + * Description: + * Handle a pause request from another CPU. Normally, this logic is + * executed from interrupt handling logic within the architecture-specific + * However, it is sometimes necessary necessary to perform the pending + * pause operation in other contexts where the interrupt cannot be taken + * in order to avoid deadlocks. + * + * This function performs the following operations: + * + * 1. It saves the current task state at the head of the current assigned + * task list. + * 2. It waits on a spinlock, then + * 3. Returns from interrupt, restoring the state of the new task at the + * head of the ready to run list. + * + * Input Parameters: + * cpu - The index of the CPU to be paused + * + * Returned Value: + * On success, OK is returned. Otherwise, a negated errno value indicating + * the nature of the failure is returned. + * + ****************************************************************************/ + +int up_cpu_paused(int cpu) +{ + FAR struct tcb_s *tcb = this_task(); + + /* Update scheduler parameters */ + + sched_suspend_scheduler(tcb); + + /* Save the current context at CURRENT_REGS into the TCB at the head + * of the assigned task list for this CPU. + */ + + up_savestate(tcb->xcp.regs); + + /* Wait for the spinlock to be released */ + + spin_unlock(&g_cpu_paused[cpu]); + spin_lock(&g_cpu_wait[cpu]); + + /* Restore the exception context of the tcb at the (new) head of the + * assigned task list. + */ + + tcb = this_task(); + + /* Reset scheduler parameters */ + + sched_resume_scheduler(tcb); + + /* Then switch contexts. Any necessary address environment changes + * will be made when the interrupt returns. + */ + + up_restorestate(tcb->xcp.regs); + spin_unlock(&g_cpu_wait[cpu]); + + return OK; +} + /**************************************************************************** * Name: arm_pause_handler * @@ -84,40 +184,18 @@ static volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS]; int arm_pause_handler(int irq, FAR void *context) { - FAR struct tcb_s *tcb = this_task(); - int cpu = up_cpu_index(); + int cpu = this_cpu(); - /* Update scheduler parameters */ - - sched_suspend_scheduler(tcb); - - /* Save the current context at CURRENT_REGS into the TCB at the head of the - * assigned task list for this CPU. + /* Check for false alarms. Such false could occur as a consequence of + * some deadlock breaking logic that might have already serviced the SG2 + * interrupt by calling up_cpu_paused. */ - up_savestate(tcb->xcp.regs); + if (spin_islocked(&g_cpu_paused[cpu])) + { + return up_cpu_paused(cpu); + } - /* Wait for the spinlock to be released */ - - spin_unlock(&g_cpu_paused[cpu]); - spin_lock(&g_cpu_wait[cpu]); - - /* Restore the exception context of the tcb at the (new) head of the - * assigned task list. - */ - - tcb = this_task(); - - /* Reset scheduler parameters */ - - sched_resume_scheduler(tcb); - - /* Then switch contexts. Any necessary address environment changes will - * be made when the interrupt returns. - */ - - up_restorestate(tcb->xcp.regs); - spin_unlock(&g_cpu_wait[cpu]); return OK; } @@ -134,7 +212,7 @@ int arm_pause_handler(int irq, FAR void *context) * CPU. * * Input Parameters: - * cpu - The index of the CPU to be stopped/ + * cpu - The index of the CPU to be stopped * * Returned Value: * Zero on success; a negated errno value on failure. diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index 658ec0539bc..ac0a2269ab5 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -199,6 +199,25 @@ extern volatile int g_eventloop; extern volatile int g_uart_data_available; #endif +#ifdef CONFIG_SMP +/* These spinlocks are used in the SMP configuration in order to implement + * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows + * + * 1. The up_cpu_pause() implementation on CPUn locks both g_cpu_wait[m] + * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_wait[m]. + * 2. CPUm receives the interrupt it (1) unlocks g_cpu_paused[m] and + * (2) locks g_cpu_wait[m]. The first unblocks CPUn and the second + * blocks CPUm in the interrupt handler. + * + * When CPUm resumes, CPUn unlocks g_cpu_wait[m] and the interrupt handler + * on CPUm continues. CPUm must, of course, also then unlock g_cpu_wait[m] + * so that it will be ready for the next pause operation. + */ + +volatile spinlock_t g_cpu_wait[CONFIG_SMP_NCPUS]; +volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS]; +#endif + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/arch/sim/src/up_simsmp.c b/arch/sim/src/up_simsmp.c index 7ff5cdb6d0d..5b24f6015ca 100644 --- a/arch/sim/src/up_simsmp.c +++ b/arch/sim/src/up_simsmp.c @@ -78,16 +78,30 @@ struct sim_cpuinfo_s static pthread_key_t g_cpukey; static pthread_t g_sim_cputhread[CONFIG_SMP_NCPUS]; -static volatile unsigned char g_sim_cpupaused[CONFIG_SMP_NCPUS]; -static volatile spinlock_t g_sim_cpuwait[CONFIG_SMP_NCPUS]; + +/* These spinlocks are used in the SMP configuration in order to implement + * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows + * + * 1. The up_cpu_pause() implementation on CPUn locks both g_cpu_wait[m] + * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_wait[m]. + * 2. CPUm receives the interrupt it (1) unlocks g_cpu_paused[m] and + * (2) locks g_cpu_wait[m]. The first unblocks CPUn and the second + * blocks CPUm in the interrupt handler. + * + * When CPUm resumes, CPUn unlocks g_cpu_wait[m] and the interrupt handler + * on CPUm continues. CPUm must, of course, also then unlock g_cpu_wait[m] + * so that it will be ready for the next pause operation. + */ + +volatile spinlock_t g_cpu_wait[CONFIG_SMP_NCPUS]; +volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS]; /**************************************************************************** * NuttX domain function prototypes ****************************************************************************/ void os_start(void) __attribute__ ((noreturn)); -void sim_cpu_pause(int cpu, volatile spinlock_t *wait, - volatile unsigned char *paused); +void up_cpu_paused(int cpu); void sim_smp_hook(void); /**************************************************************************** @@ -222,9 +236,7 @@ static void sim_handle_signal(int signo, siginfo_t *info, void *context) { int cpu = (int)((uintptr_t)pthread_getspecific(g_cpukey)); - /* We need to perform the actual tasking operations in the NuttX domain */ - - sim_cpu_pause(cpu, &g_sim_cpuwait[cpu], &g_sim_cpupaused[cpu]); + (void)up_cpu_paused(cpu); } /**************************************************************************** @@ -446,7 +458,8 @@ int up_cpu_pause(int cpu) { /* Take the spinlock that will prevent the CPU thread from running */ - g_sim_cpuwait[cpu] = SP_LOCKED; + g_cpu_wait[cpu] = SP_LOCKED; + g_cpu_paused[cpu] = SP_LOCKED; /* Signal the CPU thread */ @@ -454,7 +467,7 @@ int up_cpu_pause(int cpu) /* Spin, waiting for the thread to pause */ - while (!g_sim_cpupaused[cpu]) + while (g_cpu_paused[cpu] != 0) { pthread_yield(); } @@ -485,6 +498,6 @@ int up_cpu_resume(int cpu) { /* Release the spinlock that will alloc the CPU thread to continue */ - g_sim_cpuwait[cpu] = SP_UNLOCKED; + g_cpu_wait[cpu] = SP_UNLOCKED; return 0; } diff --git a/arch/sim/src/up_smpsignal.c b/arch/sim/src/up_smpsignal.c index f921c7f3b49..5b5c761a071 100644 --- a/arch/sim/src/up_smpsignal.c +++ b/arch/sim/src/up_smpsignal.c @@ -52,26 +52,53 @@ ****************************************************************************/ /**************************************************************************** - * Name: sim_cpu_pause + * Name: up_cpu_pausereq * * Description: - * This is the SIGUSR1 signal handling logic. It implements the core - * logic of up_cpu_pause() on the thread of execution the simulated CPU. - * This is the part of the implementation that must be performed in the - * NuttX vs. the host domain. + * Return true if a pause request is pending for this CPU. * * Input Parameters: - * cpu - The CPU being paused. - * wait - Spinlock to wait on to be un-paused - * paused - A boolean to set when we are in the paused state. + * cpu - The index of the CPU to be queried * * Returned Value: - * None + * true = a pause request is pending. + * false = no pasue request is pending. * ****************************************************************************/ -void sim_cpu_pause(int cpu, volatile spinlock_t *wait, - volatile unsigned char *paused) +bool up_cpu_pausereq(int cpu) +{ + return spin_islocked(&g_cpu_paused[cpu]); +} + +/**************************************************************************** + * Name: up_cpu_paused + * + * Description: + * Handle a pause request from another CPU. Normally, this logic is + * executed from interrupt handling logic within the architecture-specific + * However, it is sometimes necessary necessary to perform the pending + * pause operation in other contexts where the interrupt cannot be taken + * in order to avoid deadlocks. + * + * This function performs the following operations: + * + * 1. It saves the current task state at the head of the current assigned + * task list. + * 2. It waits on a spinlock, then + * 3. Returns from interrupt, restoring the state of the new task at the + * head of the ready to run list. + * + * Input Parameters: + * cpu - The index of the CPU to be paused + * + * Returned Value: + * On success, OK is returned. Otherwise, a negated errno value indicating + * the nature of the failure is returned. + * + ****************************************************************************/ + +int up_cpu_paused(int cpu) { struct tcb_s *rtcb = current_task(cpu); @@ -86,16 +113,18 @@ void sim_cpu_pause(int cpu, volatile spinlock_t *wait, if (up_setjmp(rtcb->xcp.regs) == 0) { - /* Indicate that we are in the paused state */ + /* Unlock the g_cpu_paused spinlock to indicate that we are in the + * paused state + */ - *paused = 1; + spin_unlock(&g_cpu_paused[cpu]); /* Spin until we are asked to resume. When we resume, we need to * inicate that we are not longer paused. */ - spin_lock(wait); - *paused = 0; + spin_lock(&g_cpu_wait[cpu]); + spin_unlock(&g_cpu_wait[cpu]); /* While we were paused, logic on a different CPU probably changed * the task as that head of the assigned task list. So now we need @@ -125,7 +154,8 @@ void sim_cpu_pause(int cpu, volatile spinlock_t *wait, up_longjmp(rtcb->xcp.regs, 1); } + + return OK; } #endif /* CONFIG_SMP */ - diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 8b83308fc80..4affda90da9 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1827,6 +1827,56 @@ int up_cpu_start(int cpu); int up_cpu_pause(int cpu); #endif +/**************************************************************************** + * Name: up_cpu_pausereq + * + * Description: + * Return true if a pause request is pending for this CPU. + * + * Input Parameters: + * cpu - The index of the CPU to be queried + * + * Returned Value: + * true = a pause request is pending. + * false = no pasue request is pending. + * + ****************************************************************************/ + +#ifdef CONFIG_SMP +bool up_cpu_pausereq(int cpu); +#endif + +/**************************************************************************** + * Name: up_cpu_paused + * + * Description: + * Handle a pause request from another CPU. Normally, this logic is + * executed from interrupt handling logic within the architecture-specific + * However, it is sometimes necessary necessary to perform the pending + * pause operation in other contexts where the interrupt cannot be taken + * in order to avoid deadlocks. + * + * This function performs the following operations: + * + * 1. It saves the current task state at the head of the current assigned + * task list. + * 2. It waits on a spinlock, then + * 3. Returns from interrupt, restoring the state of the new task at the + * head of the ready to run list. + * + * Input Parameters: + * cpu - The index of the CPU to be paused + * + * Returned Value: + * On success, OK is returned. Otherwise, a negated errno value indicating + * the nature of the failure is returned. + * + ****************************************************************************/ + +#ifdef CONFIG_SMP +int up_cpu_paused(int cpu); +#endif + /**************************************************************************** * Name: up_cpu_resume * diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 0a9cc88a5ea..1ad7fef5253 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -59,6 +59,26 @@ #include +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Memory barriers may be provided in arch/spinlock.h + * + * DMB - Data memory barrier. Assures writes are completed to memory. + * DSB - Data syncrhonization barrier. + */ + +#define HAVE_DMB 1 +#ifndef SP_DMB +# define SP_DMB() +# undef HAVE_DMB +#endif + +#ifndef SP_DSB +# define SP_DSB() +#endif + /**************************************************************************** * Public Types ****************************************************************************/ @@ -203,7 +223,7 @@ void spin_lockr(FAR struct spinlock_s *lock); * ****************************************************************************/ -#ifdef SP_DMB +#ifdef HAVE_DMB void spin_unlock(FAR volatile spinlock_t *lock); #else # define spin_unlock(l) do { *(l) = SP_UNLOCKED; } while (0) diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index 8071da97588..cabe7915875 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -78,6 +78,81 @@ volatile cpu_set_t g_cpu_irqset; static uint8_t g_cpu_nestcount[CONFIG_SMP_NCPUS]; #endif +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: irq_waitlock + * + * Description: + * Spin to get g_irq_waitlock, handling a known deadlock condition: + * + * Suppose this situation: + * + * - CPUn is in a critical section and has the g_cpu_irqlock spinlock. + * - CPUm takes an interrupt and attempts to enter the critical section. + * - It spins waiting on g_cpu_irqlock with interrupts disabled. + * - CPUn calls up_cpu_pause() to pause operation on CPUm. This will + * issue an inter-CPU interrupt to CPUm + * - But interrupts are disabled on CPUm so the up_cpu_pause() is never + * handled, causing the deadlock. + * + * This function detects this deadlock condition while spinning in an + * interrupt and calls up_cpu_pause() handler, breaking the deadlock. + * + ****************************************************************************/ + +#ifdef CONFIG_SMP +static void irq_waitlock(void) +{ + int cpu = this_cpu(); + + /* Duplicate the spin_lock() logic from spinlock.c, but adding the check + * for the deadlock condition. + */ + + while (up_testset(&g_cpu_irqlock) == SP_LOCKED) + { + /* The deadlock condition would occur if CPUn: + * + * 1. Holds the g_cpu_irqlock, and + * 2. Is trying to interrupt CPUm + * + * The protocol for CPUn to pause CPUm is as follows + * + * 1. The up_cpu_pause() implementation on CPUn locks both + * g_cpu_wait[m] and g_cpu_paused[m]. CPUn then waits + * spinning on g_cpu_wait[m]. + * 2. When CPUm receives the interrupt it (1) unlocks + * g_cpu_paused[m] and (2) locks g_cpu_wait[m]. The + * first unblocks CPUn and the second blocks CPUm in the + * interrupt handler. + * + * The problem in the deadlock case is that CPUm cannot receive + * the interrupt because it is locked up spinning. He we break + * the deadlock here be handling the pause interrupt request + * while waiting. + */ + + if (up_cpu_pausereq(cpu)) + { + /* Yes.. some CPU is requesting to pause us! Handle the + * pause interrupt now. + */ + + DEBUGVERIFY(up_cpu_paused(cpu)); + } + + SP_DSB(); + } + + /* We have g_cpu_irqlock! */ + + SP_DMB(); +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -190,7 +265,7 @@ irqstate_t enter_critical_section(void) * no longer in the critical section). */ - spin_lock(&g_cpu_irqlock); + irq_waitlock(); } /* In any event, the nesting count is now one */ diff --git a/sched/semaphore/spinlock.c b/sched/semaphore/spinlock.c index a3c5225adf4..e03f14c72f9 100644 --- a/sched/semaphore/spinlock.c +++ b/sched/semaphore/spinlock.c @@ -65,22 +65,6 @@ #undef CONFIG_SPINLOCK_LOCKDOWN /* Feature not yet available */ -/* Memory barriers may be provided in arch/spinlock.h - * - * DMB - Data memory barrier. Assures writes are completed to memory. - * DSB - Data syncrhonization barrier. - */ - -#define HAVE_DMB 1 -#ifndef SP_DMB -# define SP_DMB() -# undef HAVE_DMB -#endif - -#ifndef SP_DSB -# define SP_DSB() -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 36251348ed6..21aec95b474 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -97,7 +97,7 @@ int task_restart(pid_t pid) /* Not implemented */ errcode = ENOSYS; - goto errout_with_lock; + goto errout; } /* We are restarting some other task than ourselves. Make sure that the @@ -222,7 +222,8 @@ int task_restart(pid_t pid) return OK; errout_with_lock: - set_errno(errcode); leave_critical_section(flags); +errout: + set_errno(errcode); return ERROR; } From d1e84fb788b78d818eee9b5af904470bab510336 Mon Sep 17 00:00:00 2001 From: Ramtin Amin Date: Tue, 22 Nov 2016 12:10:11 -0600 Subject: [PATCH 17/35] Misoc: Add timer driver --- arch/misoc/src/common/misoc_serial.c | 32 +--- arch/misoc/src/common/misoc_timerisr.c | 140 ++++++++++++++ arch/misoc/src/lm32/Make.defs | 3 +- arch/misoc/src/lm32/lm32_reprioritizertr.c | 203 +++++++++++++++++++++ configs/misoc/hello/defconfig | 119 +++++++++++- 5 files changed, 464 insertions(+), 33 deletions(-) create mode 100644 arch/misoc/src/common/misoc_timerisr.c create mode 100644 arch/misoc/src/lm32/lm32_reprioritizertr.c diff --git a/arch/misoc/src/common/misoc_serial.c b/arch/misoc/src/common/misoc_serial.c index 9b15ba8e120..de914c8f614 100644 --- a/arch/misoc/src/common/misoc_serial.c +++ b/arch/misoc/src/common/misoc_serial.c @@ -205,13 +205,13 @@ static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE]; static struct misoc_dev_s g_uart1priv = { - .uartbase = CSR_UART_BASE, - .irq = UART_INTERRUPT, - .rxtx_addr = CSR_UART_RXTX_ADDR, - .rxempty_addr = CSR_UART_RXEMPTY_ADDR, - .txfull_addr = CSR_UART_TXFULL_ADDR, - .ev_status_addr = CSR_UART_EV_STATUS_ADDR, - .ev_pending_addr = CSR_UART_EV_PENDING_ADDR, + .uartbase = CSR_UART_BASE, + .irq = UART_INTERRUPT, + .rxtx_addr = CSR_UART_RXTX_ADDR, + .rxempty_addr = CSR_UART_RXEMPTY_ADDR, + .txfull_addr = CSR_UART_TXFULL_ADDR, + .ev_status_addr = CSR_UART_EV_STATUS_ADDR, + .ev_pending_addr = CSR_UART_EV_PENDING_ADDR, .ev_enable_addr = CSR_UART_EV_ENABLE_ADDR, }; @@ -312,16 +312,9 @@ static void misoc_shutdown(struct uart_dev_s *dev) static int misoc_attach(struct uart_dev_s *dev) { struct misoc_dev_s *priv = (struct misoc_dev_s *)dev->priv; - uint32_t im; - irq_attach(priv->irq, misoc_uart_interrupt); - - /* enable interrupt */ - /* TODO: move that somewhere proper ! */ - - im = irq_getmask(); - im |= (1 << UART_INTERRUPT); - irq_setmask(im); + (void)irq_attach(priv->irq, misoc_uart_interrupt); + up_enable_irq(priv->irq); return OK; } @@ -339,13 +332,8 @@ static int misoc_attach(struct uart_dev_s *dev) static void misoc_detach(struct uart_dev_s *dev) { struct misoc_dev_s *priv = (struct misoc_dev_s *)dev->priv; - uint32_t im; - /* TODO: move that somewhere proper */ - - im = irq_getmask(); - im &= ~(1 << UART_INTERRUPT); - irq_setmask(im); + up_disable_irq(priv->irq); irq_detach(priv->irq); } diff --git a/arch/misoc/src/common/misoc_timerisr.c b/arch/misoc/src/common/misoc_timerisr.c new file mode 100644 index 00000000000..3ad75dccf78 --- /dev/null +++ b/arch/misoc/src/common/misoc_timerisr.c @@ -0,0 +1,140 @@ +/**************************************************************************** + * arch/risc-v/src/nr5m100/nr5_timerisr.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Modified for MISOC: + * + * Copyright (C) 2016 Ramtin Amin. All rights reserved. + * Author: Ramtin Amin + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "chip.h" +#include "misoc.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* The desired timer interrupt frequency is provided by the definition + * CLK_TCK (see include/time.h). CLK_TCK defines the desired number of + * system clock ticks per second. That value is a user configurable setting + * that defaults to 100 (100 ticks per second = 10 MS interval). + * + * The RCC feeds the Cortex System Timer (SysTick) with the AHB clock (HCLK) + * divided by 8. The SysTick can work either with this clock or with the + * Cortex clock (HCLK), configurable in the SysTick Control and Status + * register. + */ + +#define SYSTICK_RELOAD ((MISOC_CLK_FREQUENCY / CLOCKS_PER_SEC) - 1) + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Function: up_timerisr + * + * Description: + * The timer ISR will perform a variety of services for various portions + * of the systems. + * + ****************************************************************************/ + +int up_timerisr(int irq, void *context) +{ + /* Clear event pending */ + + timer0_ev_pending_write(timer0_ev_pending_read()); + + /* Process timer interrupt */ + + sched_process_timer(); + return 0; +} + +/**************************************************************************** + * Function: up_timer_initialize + * + * Description: + * This function is called during start-up to initialize + * the timer interrupt. + * + ****************************************************************************/ + +void misoc_timer_initialize(void) +{ + uint32_t im; + + /* Clear event pending */ + + timer0_ev_pending_write(timer0_ev_pending_read()); + + /* Disable timer*/ + + timer0_en_write(0); + + /* FIX ME, PUT PROPER VALUE */ + + timer0_reload_write(80000); + timer0_load_write(80000); + + /* Enable timer */ + + timer0_en_write(1); + + /* Attach the timer interrupt vector */ + + (void)irq_attach(TIMER0_INTERRUPT, up_timerisr); + + /* And enable the timer interrupt */ + + up_enable_irq(TIMER0_INTERRUPT); + + /* Enable IRQ of the timer core */ + + timer0_ev_enable_write(1); +} diff --git a/arch/misoc/src/lm32/Make.defs b/arch/misoc/src/lm32/Make.defs index 9c0768b2a4f..01a6702dcb0 100644 --- a/arch/misoc/src/lm32/Make.defs +++ b/arch/misoc/src/lm32/Make.defs @@ -39,7 +39,7 @@ HEAD_ASRC = lm32_vectors.S CMN_ASRCS = CMN_CSRCS = misoc_lowputs.c misoc_serial.c misoc_mdelay.c CMN_CSRCS += misoc_modifyreg8.c misoc_modifyreg16.c misoc_modifyreg32.c -CMN_CSRCS += misoc_puts.c misoc_udelay.c +CMN_CSRCS += misoc_puts.c misoc_udelay.c misoc_timerisr.c CHIP_ASRCS = lm32_syscall.S @@ -49,3 +49,4 @@ CHIP_CSRCS += lm32_doirq.c lm32_dumpstate.c lm32_exit.c lm32_idle.c CHIP_CSRCS += lm32_initialize.c lm32_initialstate.c lm32_interruptcontext.c CHIP_CSRCS += lm32_irq.c lm32_releasepending.c lm32_releasestack.c CHIP_CSRCS += lm32_stackframe.c lm32_swint.c lm32_unblocktask.c +CHIP_CSRCS += lm32_reprioritizertr.c diff --git a/arch/misoc/src/lm32/lm32_reprioritizertr.c b/arch/misoc/src/lm32/lm32_reprioritizertr.c new file mode 100644 index 00000000000..e6b42611018 --- /dev/null +++ b/arch/misoc/src/lm32/lm32_reprioritizertr.c @@ -0,0 +1,203 @@ +/**************************************************************************** + * arch/misoc/src/lm32/lm32_reprioritizertr.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "sched/sched.h" +#include "group/group.h" +#include "lm32.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_reprioritize_rtr + * + * Description: + * Called when the priority of a running or + * ready-to-run task changes and the reprioritization will + * cause a context switch. Two cases: + * + * 1) The priority of the currently running task drops and the next + * task in the ready to run list has priority. + * 2) An idle, ready to run task's priority has been raised above the + * the priority of the current, running task and it now has the + * priority. + * + * Inputs: + * tcb: The TCB of the task that has been reprioritized + * priority: The new task priority + * + ****************************************************************************/ + +void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) +{ + /* Verify that the caller is sane */ + + if (tcb->task_state < FIRST_READY_TO_RUN_STATE || + tcb->task_state > LAST_READY_TO_RUN_STATE +#if SCHED_PRIORITY_MIN > 0 + || priority < SCHED_PRIORITY_MIN +#endif +#if SCHED_PRIORITY_MAX < UINT8_MAX + || priority > SCHED_PRIORITY_MAX +#endif + ) + { + PANIC(); + } + else + { + struct tcb_s *rtcb = this_task(); + bool switch_needed; + + sinfo("TCB=%p PRI=%d\n", tcb, priority); + + /* Remove the tcb task from the ready-to-run list. + * sched_removereadytorun will return true if we just + * remove the head of the ready to run list. + */ + + switch_needed = sched_removereadytorun(tcb); + + /* Setup up the new task priority */ + + tcb->sched_priority = (uint8_t)priority; + + /* Return the task to the specified blocked task list. + * sched_addreadytorun will return true if the task was + * added to the new list. We will need to perform a context + * switch only if the EXCLUSIVE or of the two calls is non-zero + * (i.e., one and only one the calls changes the head of the + * ready-to-run list). + */ + + switch_needed ^= sched_addreadytorun(tcb); + + /* Now, perform the context switch if one is needed */ + + if (switch_needed) + { + /* If we are going to do a context switch, then now is the right + * time to add any pending tasks back into the ready-to-run list. + * task list now + */ + + if (g_pendingtasks.head) + { + sched_mergepending(); + } + + /* Update scheduler parameters */ + + sched_suspend_scheduler(rtcb); + + /* Are we in an interrupt handler? */ + + if (g_current_regs) + { + /* Yes, then we have to do things differently. + * Just copy the g_current_regs into the OLD rtcb. + */ + + up_savestate(rtcb->xcp.regs); + + /* Restore the exception context of the rtcb at the (new) head + * of the ready-to-run task list. + */ + + rtcb = this_task(); + + /* Update scheduler parameters */ + + sched_resume_scheduler(rtcb); + + /* Then switch contexts. Any necessary address environment + * changes will be made when the interrupt returns. + */ + + up_restorestate(rtcb->xcp.regs); + } + + /* No, then we will need to perform the user context switch */ + + else + { + /* Switch context to the context of the task at the head of the + * ready to run list. + */ + + struct tcb_s *nexttcb = this_task(); + +#ifdef CONFIG_ARCH_ADDRENV + /* Make sure that the address environment for the previously + * running task is closed down gracefully (data caches dump, + * MMU flushed) and set up the address environment for the new + * thread at the head of the ready-to-run list. + */ + + (void)group_addrenv(nexttcb); +#endif + /* Update scheduler parameters */ + + sched_resume_scheduler(nexttcb); + + /* Then switch contexts */ + + up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + + /* up_switchcontext forces a context switch to the task at the + * head of the ready-to-run list. It does not 'return' in the + * normal sense. When it does return, it is because the blocked + * task is again ready to run and has execution priority. + */ + } + } + } +} diff --git a/configs/misoc/hello/defconfig b/configs/misoc/hello/defconfig index dddddfd3ee9..71aea364a7e 100644 --- a/configs/misoc/hello/defconfig +++ b/configs/misoc/hello/defconfig @@ -221,7 +221,7 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="hello_main" +CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 # CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 @@ -263,9 +263,9 @@ CONFIG_NAME_MAX=32 # # Stack and heap information # -CONFIG_IDLETHREAD_STACKSIZE=512 -CONFIG_USERMAIN_STACKSIZE=512 -CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=1024 +CONFIG_PTHREAD_STACK_MIN=512 CONFIG_PTHREAD_STACK_DEFAULT=1024 # CONFIG_LIB_SYSCALL is not set @@ -546,7 +546,7 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_MODBUS is not set # CONFIG_EXAMPLES_MOUNT is not set # CONFIG_EXAMPLES_NRF24L01TERM is not set -# CONFIG_EXAMPLES_NSH is not set +CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NXFFS is not set @@ -555,7 +555,12 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set +CONFIG_EXAMPLES_OSTEST=y +CONFIG_EXAMPLES_OSTEST_LOOPS=1 +CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192 +CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8 +CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 +CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set @@ -618,7 +623,97 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # # NSH Library # -# CONFIG_NSH_LIBRARY is not set +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +# CONFIG_NSH_READLINE is not set +CONFIG_NSH_CLE=y +CONFIG_NSH_LINELEN=80 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_MAXARGUMENTS=6 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_BASENAME is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# 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=y +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 + +# +# Configure Command Options +# +CONFIG_NSH_CMDOPT_DF_H=y +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +# CONFIG_NSH_ARCHINIT is not set +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -632,15 +727,19 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_CLE is not set +CONFIG_SYSTEM_CLE=y +CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set -# CONFIG_READLINE_HAVE_EXTMATCH is not set -# CONFIG_SYSTEM_READLINE is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +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_TEE is not set # CONFIG_SYSTEM_UBLOXMODEM is not set From 054072d0544ce76229ad06c9fa88bb7ec4830848 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 12:15:34 -0600 Subject: [PATCH 18/35] Misoc: Add commits and warnings about missing caculation of the timer reload value --- arch/misoc/src/common/misoc_timerisr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/misoc/src/common/misoc_timerisr.c b/arch/misoc/src/common/misoc_timerisr.c index 3ad75dccf78..d6d5bfabd61 100644 --- a/arch/misoc/src/common/misoc_timerisr.c +++ b/arch/misoc/src/common/misoc_timerisr.c @@ -63,13 +63,13 @@ * system clock ticks per second. That value is a user configurable setting * that defaults to 100 (100 ticks per second = 10 MS interval). * - * The RCC feeds the Cortex System Timer (SysTick) with the AHB clock (HCLK) - * divided by 8. The SysTick can work either with this clock or with the - * Cortex clock (HCLK), configurable in the SysTick Control and Status - * register. + * What clock feeds the timer? What rate does the timer increment by. The + * correct reload value is: + * + * reload = Finput / CLOCKS_PER_SEC */ -#define SYSTICK_RELOAD ((MISOC_CLK_FREQUENCY / CLOCKS_PER_SEC) - 1) +#warning Missing logic /**************************************************************************** * Public Functions @@ -118,6 +118,7 @@ void misoc_timer_initialize(void) timer0_en_write(0); /* FIX ME, PUT PROPER VALUE */ +#warning Missing logic timer0_reload_write(80000); timer0_load_write(80000); From 12f830ffd50e201926f2969ea6555828aae147b7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 11:15:37 -0600 Subject: [PATCH 19/35] SAM3/4: Name of method is now setcallback, not sethandler --- arch/arm/src/sam34/sam_tc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/src/sam34/sam_tc.c b/arch/arm/src/sam34/sam_tc.c index 1ddab1c20fa..4a1b2abf79d 100644 --- a/arch/arm/src/sam34/sam_tc.c +++ b/arch/arm/src/sam34/sam_tc.c @@ -125,7 +125,7 @@ static int sam34_getstatus(FAR struct timer_lowerhalf_s *lower, FAR struct timer_status_s *status); static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, uint32_t timeout); -static void sam34_sethandler(FAR struct timer_lowerhalf_s *lower, +static void sam34_setcallback(FAR struct timer_lowerhalf_s *lower, tccb_t callback, FAR void *arg); static int sam34_ioctl(FAR struct timer_lowerhalf_s *lower, int cmd, unsigned long arg); @@ -137,12 +137,12 @@ static int sam34_ioctl(FAR struct timer_lowerhalf_s *lower, int cmd, static const struct timer_ops_s g_tcops = { - .start = sam34_start, - .stop = sam34_stop, - .getstatus = sam34_getstatus, - .settimeout = sam34_settimeout, - .sethandler = sam34_sethandler, - .ioctl = sam34_ioctl, + .start = sam34_start, + .stop = sam34_stop, + .getstatus = sam34_getstatus, + .settimeout = sam34_settimeout, + .setcallback = sam34_setcallback, + .ioctl = sam34_ioctl, }; /* "Lower half" driver state */ @@ -513,8 +513,8 @@ static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, * ****************************************************************************/ -static void sam34_sethandler(FAR struct timer_lowerhalf_s *lower, - tccb_t callback, FAR void *arg) +static void sam34_setcallback(FAR struct timer_lowerhalf_s *lower, + tccb_t callback, FAR void *arg) { FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; irqstate_t flags; From 09b6af96ba9dcdf33f92da4e425c97108a906396 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 11:38:52 -0600 Subject: [PATCH 20/35] sam4s-xplained-pro/nsh: Configuration uses old, improper timer timer interface. CONFIG_TIMER disabled in configuration.>> --- configs/sam4s-xplained-pro/nsh/defconfig | 25 ++++++++++++++++++---- configs/sam4s-xplained-pro/src/sam_tc.c | 27 +++++++++++++++--------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/configs/sam4s-xplained-pro/nsh/defconfig b/configs/sam4s-xplained-pro/nsh/defconfig index 45fbddf1c56..dd20b99e65c 100644 --- a/configs/sam4s-xplained-pro/nsh/defconfig +++ b/configs/sam4s-xplained-pro/nsh/defconfig @@ -61,10 +61,13 @@ 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_RGMP 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" @@ -369,8 +372,6 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # CONFIG_SAM4S_XPLAINED_PRO_CDCACM_DEVMINOR=0 -CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH="/dev/rtt0" -CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH="/dev/tc0" # CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set @@ -399,6 +400,7 @@ CONFIG_USEC_PER_TICK=10000 CONFIG_SYSTEMTICK_EXTCLK=y # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set CONFIG_JULIAN_TIME=y CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=32 @@ -431,6 +433,8 @@ CONFIG_NPTHREAD_KEYS=4 CONFIG_SCHED_CPULOAD=y CONFIG_SCHED_CPULOAD_EXTCLK=y CONFIG_SCHED_CPULOAD_TICKSPERSEC=222 +# CONFIG_CPULOAD_ONESHOT is not set +CONFIG_CPULOAD_ONESHOT_ENTROPY=6 CONFIG_SCHED_CPULOAD_TIMECONSTANT=2 # CONFIG_SCHED_INSTRUMENTATION is not set @@ -513,12 +517,16 @@ CONFIG_DEV_ZERO=y # CONFIG_ARCH_HAVE_I2CRESET is not set # 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 is not set # CONFIG_I2S is not set # # Timer Driver Support # -CONFIG_TIMER=y +# CONFIG_TIMER is not set +# CONFIG_ONESHOT is not set CONFIG_RTC=y # CONFIG_RTC_DATETIME is not set CONFIG_RTC_HIRES=y @@ -699,6 +707,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # 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 @@ -812,6 +821,8 @@ CONFIG_NUNGET_CHARS=2 # CONFIG_LIBC_FLOATINGPOINT is not set CONFIG_LIBC_LONG_LONG=y # 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 @@ -872,6 +883,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_CPUHOG=y @@ -909,6 +922,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -932,7 +946,6 @@ CONFIG_EXAMPLES_SERIALRX_PRINTHEX=y # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TIMER is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set @@ -962,6 +975,7 @@ CONFIG_EXAMPLES_SERIALRX_PRINTHEX=y # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_MINIBASIC is not set # CONFIG_INTERPRETERS_PCODE is not set # @@ -1034,6 +1048,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 @@ -1106,6 +1121,8 @@ 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 # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4s-xplained-pro/src/sam_tc.c b/configs/sam4s-xplained-pro/src/sam_tc.c index f00fd42c042..8d25619c792 100644 --- a/configs/sam4s-xplained-pro/src/sam_tc.c +++ b/configs/sam4s-xplained-pro/src/sam_tc.c @@ -99,6 +99,8 @@ * Private Functions ****************************************************************************/ +#if 0 /* Cannot be used -- needs to be updated to current, signal based interface */ + #if defined(CONFIG_SYSTEMTICK_EXTCLK) && !defined(CONFIG_SUPPRESS_INTERRUPTS) && \ !defined(CONFIG_SUPPRESS_TIMER_INTS) @@ -119,6 +121,7 @@ static bool calc_cpuload(FAR uint32_t *next_interval_us) } #endif /* CONFIG_SCHED_CPULOAD && CONFIG_SCHED_CPULOAD_EXTCLK */ +#endif /* 0 */ /**************************************************************************** * Public Functions @@ -134,6 +137,7 @@ static bool calc_cpuload(FAR uint32_t *next_interval_us) int sam_timerinitialize(void) { +#if 0 /* Cannot be used -- needs to be updated to current, signal based interface */ int fd; int ret; @@ -200,14 +204,14 @@ int sam_timerinitialize(void) /* install user callback */ { - struct timer_sethandler_s tccb; - tccb.newhandler = systemtick; - tccb.oldhandler = NULL; + struct timer_notify_s notify; + notify.newhandler = systemtick; + notify.oldhandler = NULL; - ret = ioctl(fd, TCIOC_SETHANDLER, (unsigned long)&tccb); + ret = ioctl(fd, TCIOC_NOTIFICATION, (unsigned long)¬ify); if (ret < 0) { - tmrerr("ERROR: ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_NOTIFICATION) failed: %d\n", errno); goto errout_with_dev; } } @@ -251,14 +255,14 @@ int sam_timerinitialize(void) /* Install user callback */ { - struct timer_sethandler_s tccb; - tccb.newhandler = calc_cpuload; - tccb.oldhandler = NULL; + struct timer_notify_s notify; + notify.newhandler = calc_cpuload; + notify.oldhandler = NULL; - ret = ioctl(fd, TCIOC_SETHANDLER, (unsigned long)&tccb); + ret = ioctl(fd, TCIOC_NOTIFICATION, (unsigned long)¬ify); if (ret < 0) { - tmrerr("ERROR: ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_NOTIFICATION) failed: %d\n", errno); goto errout_with_dev; } } @@ -282,6 +286,9 @@ errout: success: return OK; +#else + return -ENOSYS; +#endif } From d95b8f64f53fede788ae027aace79d94e6d33c7e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 12:25:57 -0600 Subject: [PATCH 21/35] sam4s-xplained-pro: Remove obsolete timer initialization logic --- arch/misoc/src/common/misoc_serial.c | 1 - configs/sam4s-xplained-pro/src/Makefile | 4 - .../src/sam4s-xplained-pro.h | 14 - configs/sam4s-xplained-pro/src/sam_appinit.c | 8 - configs/sam4s-xplained-pro/src/sam_boot.c | 17 +- configs/sam4s-xplained-pro/src/sam_tc.c | 295 ------------------ 6 files changed, 1 insertion(+), 338 deletions(-) delete mode 100644 configs/sam4s-xplained-pro/src/sam_tc.c diff --git a/arch/misoc/src/common/misoc_serial.c b/arch/misoc/src/common/misoc_serial.c index de914c8f614..c9b1f838639 100644 --- a/arch/misoc/src/common/misoc_serial.c +++ b/arch/misoc/src/common/misoc_serial.c @@ -334,7 +334,6 @@ static void misoc_detach(struct uart_dev_s *dev) struct misoc_dev_s *priv = (struct misoc_dev_s *)dev->priv; up_disable_irq(priv->irq); - irq_detach(priv->irq); } diff --git a/configs/sam4s-xplained-pro/src/Makefile b/configs/sam4s-xplained-pro/src/Makefile index 62b5b372503..e46e7c7eea9 100644 --- a/configs/sam4s-xplained-pro/src/Makefile +++ b/configs/sam4s-xplained-pro/src/Makefile @@ -64,8 +64,4 @@ ifeq ($(CONFIG_SAM34_WDT),y) CSRCS += sam_wdt.c endif -ifeq ($(CONFIG_TIMER),y) -CSRCS += sam_tc.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h index 081e8f73f29..d995541bbbd 100644 --- a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h +++ b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h @@ -215,20 +215,6 @@ bool sam_writeprotected(int slotno); # define sam_writeprotected(slotno) (false) #endif -/************************************************************************************ - * Name: sam_timerinitialize() - * - * Description: - * Perform architecture-specific initialization of the timer hardware. - * - ************************************************************************************/ - -#ifdef CONFIG_TIMER -int sam_timerinitialize(void); -#else -# define sam_timerinitialize() (0) -#endif - /**************************************************************************** * Name: sam_watchdog_initialize() * diff --git a/configs/sam4s-xplained-pro/src/sam_appinit.c b/configs/sam4s-xplained-pro/src/sam_appinit.c index 7ac7f1587c4..6cb0cabe912 100644 --- a/configs/sam4s-xplained-pro/src/sam_appinit.c +++ b/configs/sam4s-xplained-pro/src/sam_appinit.c @@ -59,20 +59,12 @@ # include #endif -#ifdef CONFIG_TIMER -# include -#endif - #ifdef CONFIG_USBMONITOR # include #endif #include "sam4s-xplained-pro.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam4s-xplained-pro/src/sam_boot.c b/configs/sam4s-xplained-pro/src/sam_boot.c index ce7ae2fad3a..54767ee59c3 100644 --- a/configs/sam4s-xplained-pro/src/sam_boot.c +++ b/configs/sam4s-xplained-pro/src/sam_boot.c @@ -42,19 +42,10 @@ #include #include -#include #include #include "sam4s-xplained-pro.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -91,6 +82,7 @@ void sam_boardinitialize(void) * may be used, for example, to initialize board-specific device drivers. * ****************************************************************************/ + #ifdef CONFIG_BOARD_INITIALIZE void board_initialize(void) { @@ -105,12 +97,5 @@ void board_initialize(void) sam_led_initialize(); #endif - -#ifdef CONFIG_TIMER - /* Registers the timers and starts any async processes (which may include the scheduler) */ - - sam_timerinitialize(); -#endif - } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sam4s-xplained-pro/src/sam_tc.c b/configs/sam4s-xplained-pro/src/sam_tc.c deleted file mode 100644 index 8d25619c792..00000000000 --- a/configs/sam4s-xplained-pro/src/sam_tc.c +++ /dev/null @@ -1,295 +0,0 @@ -/**************************************************************************** - * configs/sam4s-xplained-pro/src/sam_tc.c - * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Bob Doiron - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "sam_lowputc.h" -#include "sam_tc.h" -#include "sam_rtt.h" - -#ifdef CONFIG_TIMER - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -#if !(defined(CONFIG_SAM34_TC0) || defined(CONFIG_SAM34_TC1) || defined(CONFIG_SAM34_TC2) \ - || defined(CONFIG_SAM34_TC3) || defined(CONFIG_SAM34_TC4) || defined(CONFIG_SAM34_RTT) ) -# warning "CONFIG_SAM34_TCx or CONFIG_SAM34_RTT must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_TIMER0_DEVPATH -# define CONFIG_TIMER0_DEVPATH "/dev/tc0" -#endif -#ifndef CONFIG_TIMER1_DEVPATH -# define CONFIG_TIMER1_DEVPATH "/dev/tc1" -#endif -#ifndef CONFIG_TIMER2_DEVPATH -# define CONFIG_TIMER2_DEVPATH "/dev/tc2" -#endif -#ifndef CONFIG_TIMER3_DEVPATH -# define CONFIG_TIMER3_DEVPATH "/dev/tc3" -#endif -#ifndef CONFIG_TIMER4_DEVPATH -# define CONFIG_TIMER4_DEVPATH "/dev/tc4" -#endif -#ifndef CONFIG_TIMER5_DEVPATH -# define CONFIG_TIMER5_DEVPATH "/dev/tc5" -#endif -#ifndef CONFIG_RTT_DEVPATH -# define CONFIG_RTT_DEVPATH "/dev/rtt0" -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -#if 0 /* Cannot be used -- needs to be updated to current, signal based interface */ - -#if defined(CONFIG_SYSTEMTICK_EXTCLK) && !defined(CONFIG_SUPPRESS_INTERRUPTS) && \ - !defined(CONFIG_SUPPRESS_TIMER_INTS) - -static bool systemtick(FAR uint32_t *next_interval_us) -{ - sched_process_timer(); - return true; // reload, no change to interval -} - -#endif /* CONFIG_SYSTEMTICK_EXTCLK && !CONFIG_SUPPRESS_INTERRUPTS && !CONFIG_SUPPRESS_TIMER_INTS */ - -#if defined(CONFIG_SCHED_CPULOAD) && defined(CONFIG_SCHED_CPULOAD_EXTCLK) - -static bool calc_cpuload(FAR uint32_t *next_interval_us) -{ - sched_process_cpuload(); - return TRUE; /* Reload, no change to interval */ -} - -#endif /* CONFIG_SCHED_CPULOAD && CONFIG_SCHED_CPULOAD_EXTCLK */ -#endif /* 0 */ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: sam_timerinitialize() - * - * Description: - * Perform architecture-specific initialization of the timer hardware. - * - ****************************************************************************/ - -int sam_timerinitialize(void) -{ -#if 0 /* Cannot be used -- needs to be updated to current, signal based interface */ - int fd; - int ret; - - /* Initialize and register the timer devices */ - -#if defined(CONFIG_SAM34_TC0) - tmrinfo("Initializing %s...\n", CONFIG_TIMER0_DEVPATH); - sam_tcinitialize(CONFIG_TIMER0_DEVPATH, SAM_IRQ_TC0); -#endif - -#if defined(CONFIG_SAM34_TC1) - tmrinfo("Initializing %s...\n", CONFIG_TIMER1_DEVPATH); - sam_tcinitialize(CONFIG_TIMER1_DEVPATH, SAM_IRQ_TC1); -#endif - -#if defined(CONFIG_SAM34_TC2) - tmrinfo("Initializing %s...\n", CONFIG_TIMER2_DEVPATH); - sam_tcinitialize(CONFIG_TIMER2_DEVPATH, SAM_IRQ_TC2); -#endif - -#if defined(CONFIG_SAM34_TC3) - tmrinfo("Initializing %s...\n", CONFIG_TIMER3_DEVPATH); - sam_tcinitialize(CONFIG_TIMER3_DEVPATH, SAM_IRQ_TC3); -#endif - -#if defined(CONFIG_SAM34_TC4) - tmrinfo("Initializing %s...\n", CONFIG_TIMER4_DEVPATH); - sam_tcinitialize(CONFIG_TIMER4_DEVPATH, SAM_IRQ_TC4); -#endif - -#if defined(CONFIG_SAM34_TC5) - tmrinfo("Initializing %s...\n", CONFIG_TIMER5_DEVPATH); - sam_tcinitialize(CONFIG_TIMER5_DEVPATH, SAM_IRQ_TC5); -#endif - -#if defined(CONFIG_SAM34_RTT) - tmrinfo("Initializing %s...\n", CONFIG_RTT_DEVPATH); - sam_rttinitialize(CONFIG_RTT_DEVPATH); -#endif - -#if defined(CONFIG_SYSTEMTICK_EXTCLK) && !defined(CONFIG_SUPPRESS_INTERRUPTS) && \ - !defined(CONFIG_SUPPRESS_TIMER_INTS) - /* System Timer Initialization */ - - tmrinfo("Opening %s\n", CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH); - - fd = open(CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, O_RDONLY); - if (fd < 0) - { - tmrerr("ERROR: open %s failed: %d\n", - CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, errno); - goto errout; - } - - /* Set the timeout */ - - tmrinfo("Interval = %d us.\n", (unsigned long)USEC_PER_TICK); - ret = ioctl(fd, TCIOC_SETTIMEOUT, (unsigned long)USEC_PER_TICK); - if (ret < 0) - { - tmrerr("ERROR: ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); - goto errout_with_dev; - } - - /* install user callback */ - { - struct timer_notify_s notify; - notify.newhandler = systemtick; - notify.oldhandler = NULL; - - ret = ioctl(fd, TCIOC_NOTIFICATION, (unsigned long)¬ify); - if (ret < 0) - { - tmrerr("ERROR: ioctl(TCIOC_NOTIFICATION) failed: %d\n", errno); - goto errout_with_dev; - } - } - - /* Start the timer */ - - tmrinfo("Starting.\n"); - ret = ioctl(fd, TCIOC_START, 0); - if (ret < 0) - { - tmrerr("ERROR: ioctl(TCIOC_START) failed: %d\n", errno); - goto errout_with_dev; - } -#endif - -#if defined(CONFIG_SCHED_CPULOAD) && defined(CONFIG_SCHED_CPULOAD_EXTCLK) - /* CPU Load initialization */ - - tmrinfo("Opening %s\n", CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH); - - fd = open(CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, O_RDONLY); - if (fd < 0) - { - tmrerr("ERROR: open %s failed: %d\n", - CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, errno); - goto errout; - } - - /* Set the timeout */ - - tmrinfo("Interval = %d us.\n", (unsigned long)1000000 / CONFIG_SCHED_CPULOAD_TICKSPERSEC); - - ret = ioctl(fd, TCIOC_SETTIMEOUT, - (unsigned long)1000000 / CONFIG_SCHED_CPULOAD_TICKSPERSEC); - if (ret < 0) - { - tmrerr("ERROR: ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); - goto errout_with_dev; - } - - /* Install user callback */ - - { - struct timer_notify_s notify; - notify.newhandler = calc_cpuload; - notify.oldhandler = NULL; - - ret = ioctl(fd, TCIOC_NOTIFICATION, (unsigned long)¬ify); - if (ret < 0) - { - tmrerr("ERROR: ioctl(TCIOC_NOTIFICATION) failed: %d\n", errno); - goto errout_with_dev; - } - } - - /* Start the timer */ - - tmrinfo("Starting.\n"); - ret = ioctl(fd, TCIOC_START, 0); - if (ret < 0) - { - tmrerr("ERROR: ioctl(TCIOC_START) failed: %d\n", errno); - goto errout_with_dev; - } -#endif - - goto success; -errout_with_dev: - close(fd); -errout: - return ERROR; - -success: - return OK; -#else - return -ENOSYS; -#endif - -} - -#endif /* CONFIG_TIMER */ From f90525a5d1a0a9b427c1880730ffb3d684e32eee Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 22 Nov 2016 16:48:57 -0600 Subject: [PATCH 22/35] SMP: Update some comments; trivial improvement by inlining static function. --- arch/arm/src/armv7-a/arm_cpupause.c | 2 +- arch/sim/src/up_internal.h | 2 +- arch/sim/src/up_simsmp.c | 2 +- sched/irq/irq_csection.c | 8 +++----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index 4abfac25b11..55ffbf93850 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -59,7 +59,7 @@ * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows * * 1. The up_cpu_pause() implementation on CPUn locks both g_cpu_wait[m] - * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_wait[m]. + * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_paused[m]. * 2. CPUm receives the interrupt it (1) unlocks g_cpu_paused[m] and * (2) locks g_cpu_wait[m]. The first unblocks CPUn and the second * blocks CPUm in the interrupt handler. diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index ac0a2269ab5..9facb343af7 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -204,7 +204,7 @@ extern volatile int g_uart_data_available; * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows * * 1. The up_cpu_pause() implementation on CPUn locks both g_cpu_wait[m] - * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_wait[m]. + * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_paused[m]. * 2. CPUm receives the interrupt it (1) unlocks g_cpu_paused[m] and * (2) locks g_cpu_wait[m]. The first unblocks CPUn and the second * blocks CPUm in the interrupt handler. diff --git a/arch/sim/src/up_simsmp.c b/arch/sim/src/up_simsmp.c index 5b24f6015ca..8a1469976d4 100644 --- a/arch/sim/src/up_simsmp.c +++ b/arch/sim/src/up_simsmp.c @@ -83,7 +83,7 @@ static pthread_t g_sim_cputhread[CONFIG_SMP_NCPUS]; * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows * * 1. The up_cpu_pause() implementation on CPUn locks both g_cpu_wait[m] - * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_wait[m]. + * and g_cpu_paused[m]. CPUn then waits spinning on g_cpu_paused[m]. * 2. CPUm receives the interrupt it (1) unlocks g_cpu_paused[m] and * (2) locks g_cpu_wait[m]. The first unblocks CPUn and the second * blocks CPUm in the interrupt handler. diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index cabe7915875..96fb3abb1b5 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -104,10 +104,8 @@ static uint8_t g_cpu_nestcount[CONFIG_SMP_NCPUS]; ****************************************************************************/ #ifdef CONFIG_SMP -static void irq_waitlock(void) +static inline void irq_waitlock(int cpu) { - int cpu = this_cpu(); - /* Duplicate the spin_lock() logic from spinlock.c, but adding the check * for the deadlock condition. */ @@ -262,10 +260,10 @@ irqstate_t enter_critical_section(void) if ((g_cpu_irqset & (1 << cpu)) == 0) { /* Wait until we can get the spinlock (meaning that we are - * no longer in the critical section). + * no longer blocked by the critical section). */ - irq_waitlock(); + irq_waitlock(cpu); } /* In any event, the nesting count is now one */ From b8754afb1460a4cede8ae93495222eb0d50c14a9 Mon Sep 17 00:00:00 2001 From: Ramtin Amin Date: Wed, 23 Nov 2016 07:00:57 -0600 Subject: [PATCH 23/35] Misoc LM32: Make system timer configurable via CONFIG_USEC_PER_TICK. --- arch/misoc/src/common/misoc.h | 10 ++++++++ arch/misoc/src/common/misoc_timerisr.c | 34 +++++++++++++++++--------- arch/misoc/src/lm32/lm32_initialize.c | 6 +++-- 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/arch/misoc/src/common/misoc.h b/arch/misoc/src/common/misoc.h index 4726759ea58..1531f3dc7fc 100644 --- a/arch/misoc/src/common/misoc.h +++ b/arch/misoc/src/common/misoc.h @@ -63,6 +63,16 @@ #ifndef __ASSEMBLY__ +/**************************************************************************** + * Name: misoc_timer_initialize + * + * Description: + * Initialize and start the system timer. + * + ****************************************************************************/ + +void misoc_timer_initialize(void); + /**************************************************************************** * Name: up_serialinit * diff --git a/arch/misoc/src/common/misoc_timerisr.c b/arch/misoc/src/common/misoc_timerisr.c index d6d5bfabd61..3de69520bed 100644 --- a/arch/misoc/src/common/misoc_timerisr.c +++ b/arch/misoc/src/common/misoc_timerisr.c @@ -47,10 +47,12 @@ #include #include #include + #include #include #include #include + #include "chip.h" #include "misoc.h" @@ -59,17 +61,26 @@ ****************************************************************************/ /* The desired timer interrupt frequency is provided by the definition - * CLK_TCK (see include/time.h). CLK_TCK defines the desired number of - * system clock ticks per second. That value is a user configurable setting - * that defaults to 100 (100 ticks per second = 10 MS interval). + * CLOCKS_PER_SEC (see include/time.h). CLOCKS_PER_SEC defines the desired + * number of system clock ticks per second. That value is a user + * configurable setting based on CONFIG_USEC_PER_TICK. It defaults to 100 + * (100 ticks per second = 10 MS interval). * - * What clock feeds the timer? What rate does the timer increment by. The - * correct reload value is: + * Given the timer input frequency (Finput). The timer correct reload + * value is: * * reload = Finput / CLOCKS_PER_SEC */ -#warning Missing logic +#define SYSTICK_RELOAD ((SYSTEM_CLOCK_FREQUENCY / CLOCKS_PER_SEC) - 1) + +/* The size of the reload field is 30 bits. Verify that the reload value + * will fit in the reload register. + */ + +#if SYSTICK_RELOAD > 0x3fffffff +# error SYSTICK_RELOAD exceeds the range of the RELOAD register +#endif /**************************************************************************** * Public Functions @@ -107,8 +118,6 @@ int up_timerisr(int irq, void *context) void misoc_timer_initialize(void) { - uint32_t im; - /* Clear event pending */ timer0_ev_pending_write(timer0_ev_pending_read()); @@ -117,11 +126,12 @@ void misoc_timer_initialize(void) timer0_en_write(0); - /* FIX ME, PUT PROPER VALUE */ -#warning Missing logic + /* Setup the timer reload register to generate interrupts at the rate of + * CLOCKS_PER_SEC. + */ - timer0_reload_write(80000); - timer0_load_write(80000); + timer0_reload_write(SYSTICK_RELOAD); + timer0_load_write(SYSTICK_RELOAD); /* Enable timer */ diff --git a/arch/misoc/src/lm32/lm32_initialize.c b/arch/misoc/src/lm32/lm32_initialize.c index 23e6e8fc1f0..dd93cce4b65 100644 --- a/arch/misoc/src/lm32/lm32_initialize.c +++ b/arch/misoc/src/lm32/lm32_initialize.c @@ -72,7 +72,9 @@ void up_initialize(void) /* Initialize the serial driver */ -#warning REVISIT: Here you should all misoc_serial_initialize(). That initializes the entire serial driver, a part of the operation is the uart initialization. - misoc_serial_initialize(); + + /* Initialize the system timer */ + + misoc_timer_initialize(); } From d4037a30aa1ebf08639fd47864e4cfd9ffbc8e05 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 23 Nov 2016 13:20:18 -0600 Subject: [PATCH 24/35] Update some comments --- configs/sabre-6quad/README.txt | 3 --- sched/sched/sched_removereadytorun.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/configs/sabre-6quad/README.txt b/configs/sabre-6quad/README.txt index 02e6acb6ec8..ec41ee62719 100644 --- a/configs/sabre-6quad/README.txt +++ b/configs/sabre-6quad/README.txt @@ -482,9 +482,6 @@ The i.MX6 6Quad has 4 CPUs. Support is included for testing an SMP configuration. That configuration is still not yet ready for usage but can be enabled with the following configuration settings: - Build Setup: - CONFIG_EXPERIMENTAL=y - RTOS Features -> Tasks and Scheduling CONFIG_SPINLOCK=y CONFIG_SMP=y diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index 35543037ef4..85c3d43fac5 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -260,7 +260,7 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) } else { - /* No.. we may need to perform release our hold on the irq state. */ + /* No.. we may need to release our hold on the irq state. */ spin_clrbit(&g_cpu_irqset, cpu, &g_cpu_irqsetlock, &g_cpu_irqlock); From bbc17abf6805a5c3dfb113b816bbcfbae5012311 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 23 Nov 2016 13:30:51 -0600 Subject: [PATCH 25/35] Update some comments --- TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO b/TODO index d50c610998a..366533c5348 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated November 19, 2016) +NuttX TODO List (Last updated November 22, 2016) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with From 7dbc25b02ba12a4e005e72ab42f4e60e0da36634 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Wed, 23 Nov 2016 13:33:51 -0600 Subject: [PATCH 26/35] LPC43xx: Add timer driver; configs/bambino-200e: Add support for timer driver --- arch/arm/src/lpc43xx/Kconfig | 10 +- arch/arm/src/lpc43xx/Make.defs | 6 +- arch/arm/src/lpc43xx/chip/lpc43_timer.h | 4 + arch/arm/src/lpc43xx/lpc43_timer.c | 771 +++++++++++++++++++++++ arch/arm/src/lpc43xx/lpc43_timer.h | 100 +++ configs/bambino-200e/nsh/defconfig | 16 +- configs/bambino-200e/src/Makefile | 4 + configs/bambino-200e/src/bambino-200e.h | 14 + configs/bambino-200e/src/lpc43_appinit.c | 10 +- configs/bambino-200e/src/lpc43_timer.c | 125 ++++ 10 files changed, 1054 insertions(+), 6 deletions(-) create mode 100644 arch/arm/src/lpc43xx/lpc43_timer.c create mode 100644 arch/arm/src/lpc43xx/lpc43_timer.h create mode 100644 configs/bambino-200e/src/lpc43_timer.c diff --git a/arch/arm/src/lpc43xx/Kconfig b/arch/arm/src/lpc43xx/Kconfig index c063fd86c73..b597090dca7 100644 --- a/arch/arm/src/lpc43xx/Kconfig +++ b/arch/arm/src/lpc43xx/Kconfig @@ -269,8 +269,9 @@ config LPC43_SSP1 default n config LPC43_TMR0 - bool "ADC1" + bool "Timer 0" default n + select LPC43_TIMER config LPC43_TMR1 bool "Timer 1" @@ -279,10 +280,17 @@ config LPC43_TMR1 config LPC43_TMR2 bool "Timer 2" default n + select LPC43_TIMER config LPC43_TMR3 bool "Timer 3" default n + select LPC43_TIMER + +config LPC43_TIMER + bool + default n + select ARCH_HAVE_EXTCLK config LPC43_USART0 bool "USART0" diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs index 79ddaa4a022..c0d95a27998 100644 --- a/arch/arm/src/lpc43xx/Make.defs +++ b/arch/arm/src/lpc43xx/Make.defs @@ -154,6 +154,10 @@ CHIP_CSRCS += lpc43_ssp.c endif endif +ifeq ($(CONFIG_LPC43_TIMER),y) +CHIP_CSRCS += lpc43_timer.c +endif + ifeq ($(CONFIG_LPC43_RIT),y) CHIP_CSRCS += lpc43_rit.c endif @@ -196,4 +200,4 @@ CHIP_CSRCS += lpc43_usb0dev.c endif endif --include chip/spifi/src/Make.defs \ No newline at end of file +-include chip/spifi/src/Make.defs diff --git a/arch/arm/src/lpc43xx/chip/lpc43_timer.h b/arch/arm/src/lpc43xx/chip/lpc43_timer.h index 109b8c8b7fa..b62f1352a30 100644 --- a/arch/arm/src/lpc43xx/chip/lpc43_timer.h +++ b/arch/arm/src/lpc43xx/chip/lpc43_timer.h @@ -42,10 +42,14 @@ #include +#include "chip.h" + /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ +#define TMR_RVALUE_MASK (0xffffffff) + /* Register offsets *****************************************************************/ #define LPC43_TMR_IR_OFFSET 0x0000 /* Interrupt Register */ diff --git a/arch/arm/src/lpc43xx/lpc43_timer.c b/arch/arm/src/lpc43xx/lpc43_timer.c new file mode 100644 index 00000000000..0d8b35c9110 --- /dev/null +++ b/arch/arm/src/lpc43xx/lpc43_timer.c @@ -0,0 +1,771 @@ +/**************************************************************************** + * arch/arm/src/lpc43/lpc43_timer.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * Alan Carvalho de Assis + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +#include "up_arch.h" +#include "lpc43_timer.h" + +#if defined(CONFIG_TIMER) && (defined(CONFIG_LPC43_TMR0) || \ + defined(CONFIG_LPC43_TMR1) || defined(CONFIG_LPC43_TMR2) || \ + defined(CONFIG_LPC43_TMR3) ) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_LPC43_TMR_REGDEBUG +#endif + +/* Clocking *****************************************************************/ + +/* TODO: Allow selection of any of the input clocks */ + +#define TMR_FCLK (BOARD_FCLKOUT_FREQUENCY) +#define TMR_MAXTIMEOUT ((1000000ULL * (1ULL + TMR_RVALUE_MASK)) / TMR_FCLK) + +/**************************************************************************** + * Private Types + ****************************************************************************/ +/* This structure provides the private representation of the "lower-half" + * driver state structure. This structure must be cast-compatible with the + * timer_lowerhalf_s structure. + */ + +struct lpc43_lowerhalf_s +{ + FAR const struct timer_ops_s *ops; /* Lower half operations */ + + /* Private data */ + + uint32_t base; /* Base address of the timer */ + tccb_t callback; /* Current user interrupt callback */ + FAR void *arg; /* Argument passed to the callback function */ + uint32_t timeout; /* The current timeout value (us) */ + uint32_t adjustment; /* time lost due to clock resolution truncation (us) */ + uint32_t clkticks; /* actual clock ticks for current interval */ + bool started; /* The timer has been started */ + uint16_t tmrid; /* Timer id */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ +/* Register operations ******************************************************/ + +#ifdef CONFIG_LPC43_TMR_REGDEBUG +static uint32_t lpc43_getreg(uint32_t addr); +static void lpc43_putreg(uint32_t val, uint32_t addr); +#else +# define lpc43_getreg(addr) getreg32(addr) +# define lpc43_putreg(val,addr) putreg32(val,addr) +#endif + +/* Interrupt handling *******************************************************/ + +static int lpc43_interrupt(int irq, FAR void *context); + +/* "Lower half" driver methods **********************************************/ + +static int lpc43_start(FAR struct timer_lowerhalf_s *lower); +static int lpc43_stop(FAR struct timer_lowerhalf_s *lower); +static int lpc43_getstatus(FAR struct timer_lowerhalf_s *lower, + FAR struct timer_status_s *status); +static int lpc43_settimeout(FAR struct timer_lowerhalf_s *lower, + uint32_t timeout); +static void lpc43_setcallback(FAR struct timer_lowerhalf_s *lower, + tccb_t callback, FAR void *arg); +static int lpc43_ioctl(FAR struct timer_lowerhalf_s *lower, int cmd, + unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* "Lower half" driver methods */ + +static const struct timer_ops_s g_tmrops = +{ + .start = lpc43_start, + .stop = lpc43_stop, + .getstatus = lpc43_getstatus, + .settimeout = lpc43_settimeout, + .setcallback = lpc43_setcallback, + .ioctl = lpc43_ioctl, +}; + +/* "Lower half" driver state */ + +/* TODO - allocating all 6 now, even though we might not need them. + * May want to allocate the right number to not be wasteful. + */ + +static struct lpc43_lowerhalf_s g_tmrdevs[4]; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lpc43_getreg + * + * Description: + * Get the contents of a register + * + ****************************************************************************/ + +#ifdef CONFIG_LPC43_TMR_REGDEBUG +static uint32_t lpc43_getreg(uint32_t addr) +{ + static uint32_t prevaddr = 0; + static uint32_t count = 0; + static uint32_t preval = 0; + + /* Read the value from the register */ + + uint32_t val = getreg32(addr); + + /* Is this the same value that we read from the same registe last time? + * Are we polling the register? If so, suppress some of the output. + */ + + if (addr == prevaddr && val == preval) + { + if (count == 0xffffffff || ++count > 3) + { + if (count == 4) + { + tmrinfo("...\n"); + } + + return val; + } + } + + /* No this is a new address or value */ + + else + { + /* Did we print "..." for the previous value? */ + + if (count > 3) + { + /* Yes.. then show how many times the value repeated */ + + tmrinfo("[repeats %d more times]\n", count-3); + } + + /* Save the new address, value, and count */ + + prevaddr = addr; + preval = val; + count = 1; + } + + /* Show the register value read */ + + tmrinfo("%08lx->%08lx\n", addr, val); + return val; +} +#endif + +/**************************************************************************** + * Name: lpc43_putreg + * + * Description: + * Set the contents of an LPC43 register to a value + * + ****************************************************************************/ + +#ifdef CONFIG_LPC43_TMR_REGDEBUG +static void lpc43_putreg(uint32_t val, uint32_t addr) +{ + /* Show the register value being written */ + + tmrinfo("%08lx<-%08lx\n", addr, val); + + /* Write the value */ + + putreg32(val, addr); +} +#endif + +void tmr_clk_enable(uint16_t tmrid) +{ + uint32_t regval; + + /* Enable Timer 0 */ + + if (tmrid == 0) + { + regval = getreg32(LPC43_CCU1_M4_TIMER0_CFG); + regval |= CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER0_CFG); + } + + /* Enable Timer 1 */ + + if (tmrid == 1) + { + regval = getreg32(LPC43_CCU1_M4_TIMER1_CFG); + regval |= CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER1_CFG); + } + + /* Enable Timer 2 */ + + if (tmrid == 2) + { + regval = getreg32(LPC43_CCU1_M4_TIMER2_CFG); + regval |= CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER2_CFG); + } + + /* Enable Timer 3 */ + + if (tmrid == 3) + { + regval = getreg32(LPC43_CCU1_M4_TIMER3_CFG); + regval |= CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER3_CFG); + } +} + +void tmr_clk_disable(uint16_t tmrid) +{ + uint32_t regval; + + /* Enable Timer 0 */ + + if (tmrid == 0) + { + regval = getreg32(LPC43_CCU1_M4_TIMER0_CFG); + regval &= ~CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER0_CFG); + } + + /* Enable Timer 1 */ + + if (tmrid == 1) + { + regval = getreg32(LPC43_CCU1_M4_TIMER1_CFG); + regval &= ~CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER1_CFG); + } + + /* Enable Timer 2 */ + + if (tmrid == 2) + { + regval = getreg32(LPC43_CCU1_M4_TIMER2_CFG); + regval &= ~CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER2_CFG); + } + + /* Enable Timer 3 */ + + if (tmrid == 3) + { + regval = getreg32(LPC43_CCU1_M4_TIMER3_CFG); + regval &= ~CCU_CLK_CFG_RUN; + putreg32(regval, LPC43_CCU1_M4_TIMER3_CFG); + } +} + +/**************************************************************************** + * Name: lpc43_interrupt + * + * Description: + * TC interrupt + * + * Input Parameters: + * Usual interrupt callback arguments. + * + * Returned Values: + * Always returns OK. + * + ****************************************************************************/ + +static int lpc43_interrupt(int irq, FAR void *context) +{ + uint8_t chan_int = 0x0f; + FAR struct lpc43_lowerhalf_s *priv = &g_tmrdevs[irq-LPC43M4_IRQ_TIMER0]; + + tmrinfo("Entry\n"); + DEBUGASSERT((irq >= LPC43M4_IRQ_TIMER0) && (irq <= LPC43M4_IRQ_TIMER3)); + + /* Check if the interrupt is really pending */ + + if ((lpc43_getreg(priv->base + LPC43_TMR_IR_OFFSET) & chan_int) != 0) + { + uint32_t timeout; + + /* Is there a registered callback? If the callback has been + * nullified, the timer will be stopped. + */ + + if (priv->callback && priv->callback(&priv->timeout, priv->arg)) + { + /* Calculate new ticks / dither adjustment */ + + priv->clkticks =((uint64_t)(priv->adjustment + priv->timeout)) * + TMR_FCLK / 1000000; + + /* Set next interval interval. TODO: make sure the interval is not + * so soon it will be missed! + */ + + lpc43_putreg(priv->clkticks, priv->base + LPC43_TMR_PR_OFFSET); + + /* Truncated timeout */ + + timeout = (1000000ULL * priv->clkticks) / TMR_FCLK; + + /* Truncated time to be added to next interval (dither) */ + + priv->adjustment = (priv->adjustment + priv->timeout) - timeout; + } + else + { + /* No callback or the callback returned false.. stop the timer */ + + lpc43_stop((FAR struct timer_lowerhalf_s *)priv); + tmrinfo("Stopped\n"); + } + + /* Clear the interrupts */ + + lpc43_putreg(chan_int, priv->base + LPC43_TMR_IR_OFFSET); + } + + return OK; +} + +/**************************************************************************** + * Name: lpc43_start + * + * Description: + * Start the timer, resetting the time to the current timeout, + * + * Input Parameters: + * lower - A pointer the publicly visible representation of the "lower-half" + * driver state structure. + * + * Returned Values: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int lpc43_start(FAR struct timer_lowerhalf_s *lower) +{ + FAR struct lpc43_lowerhalf_s *priv = (FAR struct lpc43_lowerhalf_s *)lower; + uint32_t presc_val; + + tmrinfo("Entry\n"); + DEBUGASSERT(priv); + + if (priv->started) + { + return -EINVAL; + } + + /* Enable timer clock */ + + tmr_clk_enable(priv->tmrid); + + /* Set it to Timer Mode */ + + lpc43_putreg(0, priv->base + LPC43_TMR_CTCR_OFFSET); + + /* Disable the timer */ + + lpc43_putreg(0, priv->base + LPC43_TMR_TCR_OFFSET); + + /* Set prescaler to increase TC each 1 us */ + + presc_val = TMR_FCLK / 1000000; + lpc43_putreg(presc_val - 1, priv->base + LPC43_TMR_PR_OFFSET); + + /* Set MR0 with a large enough initial value */ + + lpc43_putreg(10000000, priv->base + LPC43_TMR_MR0_OFFSET); + + if (priv->callback) + { + /* Enable Match on MR0 generate interrupt and auto-restart */ + + lpc43_putreg(3, priv->base + LPC43_TMR_MCR_OFFSET); + } + + /* Enable the timer */ + + lpc43_putreg(TMR_TCR_EN, priv->base + LPC43_TMR_TCR_OFFSET); + + priv->started = true; + return OK; +} + +/**************************************************************************** + * Name: lpc43_stop + * + * Description: + * Stop the timer + * + * Input Parameters: + * lower - A pointer the publicly visible representation of the "lower-half" + * driver state structure. + * + * Returned Values: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int lpc43_stop(FAR struct timer_lowerhalf_s *lower) +{ + FAR struct lpc43_lowerhalf_s *priv = (FAR struct lpc43_lowerhalf_s *)lower; + tmrinfo("Entry\n"); + DEBUGASSERT(priv); + + if (!priv->started) + { + return -EINVAL; + } + + /* Disable timer */ + + lpc43_putreg(0, priv->base + LPC43_TMR_TCR_OFFSET); + + /* Disable interrupt */ + + lpc43_putreg(0, priv->base + LPC43_TMR_MCR_OFFSET); + + /* Disable timer clock */ + + tmr_clk_disable(priv->tmrid); + + priv->started = false; + + return OK; +} + +/**************************************************************************** + * Name: lpc43_getstatus + * + * Description: + * Get the current timer status + * + * Input Parameters: + * lower - A pointer the publicly visible representation of the "lower- + * half" driver state structure. + * status - The location to return the status information. + * + * Returned Values: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int lpc43_getstatus(FAR struct timer_lowerhalf_s *lower, + FAR struct timer_status_s *status) +{ + FAR struct lpc43_lowerhalf_s *priv = (FAR struct lpc43_lowerhalf_s *)lower; + uint32_t elapsed; + + tmrinfo("Entry\n"); + DEBUGASSERT(priv); + + /* Return the status bit */ + + status->flags = 0; + if (priv->started) + { + status->flags |= TCFLAGS_ACTIVE; + } + + if (priv->callback) + { + status->flags |= TCFLAGS_HANDLER; + } + + /* Return the actual timeout is milliseconds */ + + status->timeout = priv->timeout; + + /* Get the time remaining until the timer expires (in microseconds) */ + /* TODO - check on the +1 in the time left calculation */ + + elapsed = lpc43_getreg(priv->base + LPC43_TMR_TC_OFFSET); + status->timeleft = ((uint64_t)priv->timeout * elapsed) / + (priv->clkticks + 1); + + tmrinfo(" flags : %08x\n", status->flags); + tmrinfo(" timeout : %d\n", status->timeout); + tmrinfo(" timeleft : %d\n", status->timeleft); + return OK; +} + +/**************************************************************************** + * Name: lpc43_settimeout + * + * Description: + * Set a new timeout value (and reset the timer) + * + * Input Parameters: + * lower - A pointer the publicly visible representation of the "lower + * half" driver state structure. + * timeout - The new timeout value in milliseconds. + * + * Returned Values: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int lpc43_settimeout(FAR struct timer_lowerhalf_s *lower, + uint32_t timeout) +{ + FAR struct lpc43_lowerhalf_s *priv = (FAR struct lpc43_lowerhalf_s *)lower; + + DEBUGASSERT(priv); + + if (priv->started) + { + return -EPERM; + } + + tmrinfo("Entry: timeout=%d\n", timeout); + + /* Can this timeout be represented? */ + + if (timeout < 1 || timeout > TMR_MAXTIMEOUT) + { + tmrerr("ERROR: Cannot represent timeout=%lu > %lu\n", + timeout, TMR_MAXTIMEOUT); + return -ERANGE; + } + + /* Intended timeout */ + + priv->timeout = timeout; + + /* Actual clock ticks */ + + priv->clkticks = (((uint64_t)timeout * TMR_FCLK) / 1000000); + + /* Truncated timeout */ + + timeout = (1000000ULL * priv->clkticks) / TMR_FCLK; + + /* Truncated time to be added to next interval (dither) */ + + priv->adjustment = priv->timeout - timeout; + + tmrinfo("fclk=%d clkticks=%d timout=%d, adjustment=%d\n", + TMR_FCLK, priv->clkticks, priv->timeout, priv->adjustment); + + return OK; +} + +/**************************************************************************** + * Name: lpc43_setcallback + * + * Description: + * Call this user provided timeout callback. + * + * Input Parameters: + * lower - A pointer the publicly visible representation of the "lower-half" + * driver state structure. + * newcallback - The new timer expiration function pointer. If this + * function pointer is NULL, then the reset-on-expiration + * behavior is restored, + * + * Returned Values: + * The previous timer expiration function pointer or NULL is there was + * no previous function pointer. + * + ****************************************************************************/ + +static void lpc43_setcallback(FAR struct timer_lowerhalf_s *lower, + tccb_t callback, FAR void *arg) +{ + FAR struct lpc43_lowerhalf_s *priv = (FAR struct lpc43_lowerhalf_s *)lower; + irqstate_t flags; + + flags = enter_critical_section(); + + DEBUGASSERT(priv); + tmrinfo("Entry: callback=%p\n", callback); + + /* Save the new callback and its argument */ + + priv->callback = callback; + priv->arg = arg; + + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: lpc43_ioctl + * + * Description: + * Any ioctl commands that are not recognized by the "upper-half" driver + * are forwarded to the lower half driver through this method. + * + * Input Parameters: + * lower - A pointer the publicly visible representation of the "lower-half" + * driver state structure. + * cmd - The ioctl command value + * arg - The optional argument that accompanies the 'cmd'. The + * interpretation of this argument depends on the particular + * command. + * + * Returned Values: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int lpc43_ioctl(FAR struct timer_lowerhalf_s *lower, int cmd, + unsigned long arg) +{ + FAR struct lpc43_lowerhalf_s *priv = (FAR struct lpc43_lowerhalf_s *)lower; + int ret = -ENOTTY; + + DEBUGASSERT(priv); + tmrinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); + UNUSED(priv); + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lpc43_tmrinitialize + * + * Description: + * Initialize the timer. The timer is initialized and + * registers as 'devpath'. + * + * Input Parameters: + * devpath - The full path to the timer. This should be of the form + * /dev/tmr0 + * + * Returned Values: + * None + * + ****************************************************************************/ + +void lpc43_tmrinitialize(FAR const char *devpath, int irq) +{ + FAR struct lpc43_lowerhalf_s *priv = &g_tmrdevs[irq-LPC43M4_IRQ_TIMER0]; + + tmrinfo("Entry: devpath=%s\n", devpath); + DEBUGASSERT((irq >= LPC43M4_IRQ_TIMER0) && (irq <= LPC43M4_IRQ_TIMER3)); + + /* Initialize the driver state structure. Here we assume: (1) the state + * structure lies in .bss and was zeroed at reset time. (2) This function + * is only called once so it is never necessary to re-zero the structure. + */ + + switch (irq) + { +#if defined(CONFIG_LPC43_TMR0) + case LPC43M4_IRQ_TIMER0: + priv->base = LPC43_TIMER0_BASE; + priv->tmrid = 0; + tmrinfo("Using: Timer 0"); + break; +#endif + +#if defined(CONFIG_LPC43_TMR1) + case LPC43M4_IRQ_TIMER1: + priv->base = LPC43_TIMER1_BASE; + priv->tmrid = 1; + tmrinfo("Using: Timer 1"); + break; +#endif + +#if defined(CONFIG_LPC43_TMR2) + case LPC43M4_IRQ_TIMER2: + priv->base = LPC43_TIMER2_BASE; + priv->tmrid = 2; + tmrinfo("Using: Timer 2"); + break; +#endif + +#if defined(CONFIG_LPC43_TMR3) + case LPC43M4_IRQ_TIMER3: + priv->base = LPC43_TIMER3_BASE; + priv->tmrid = 3; + tmrinfo("Using: Timer 3"); + break; +#endif + + default: + ASSERT(0); + } + + priv->ops = &g_tmrops; + + (void)irq_attach(irq, lpc43_interrupt); + + /* Enable NVIC interrupt. */ + + up_enable_irq(irq); + + /* Register the timer driver as /dev/timerX */ + + (void)timer_register(devpath, (FAR struct timer_lowerhalf_s *)priv); +} + +#endif /* CONFIG_TIMER && CONFIG_LPC43_TMRx */ diff --git a/arch/arm/src/lpc43xx/lpc43_timer.h b/arch/arm/src/lpc43xx/lpc43_timer.h new file mode 100644 index 00000000000..194d917c317 --- /dev/null +++ b/arch/arm/src/lpc43xx/lpc43_timer.h @@ -0,0 +1,100 @@ +/**************************************************************************** + * arch/arm/src/sam34/lpc43_tc.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * Alan Carvalho de Assis + * + * 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. + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC43_TMR_H +#define __ARCH_ARM_SRC_LPC43_TMR_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include "chip.h" +#include "chip/lpc43_timer.h" +#include "chip/lpc43_ccu.h" + +#ifdef CONFIG_TIMER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lpc43_tmrinitialize + * + * Description: + * Initialize the timer. The timer is initialized and + * registers as 'devpath. The initial state of the timer is + * disabled. + * + * Input Parameters: + * devpath - The full path to the timer. This should be of the form + * /dev/timer0 + * irq - irq associated with the timer + * Returned Values: + * None + * + ****************************************************************************/ + +#if defined(CONFIG_LPC43_TMR0) || defined(CONFIG_LPC43_TMR1) || \ + defined(CONFIG_LPC43_TMR2) || defined(CONFIG_LPC43_TMR3) +void lpc43_tmrinitialize(FAR const char *devpath, int irq); +#endif + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* CONFIG_TIMER */ +#endif /* __ARCH_ARM_SRC_LPC43_TMR_H */ diff --git a/configs/bambino-200e/nsh/defconfig b/configs/bambino-200e/nsh/defconfig index 1593440d4b6..ab5b2edc94f 100644 --- a/configs/bambino-200e/nsh/defconfig +++ b/configs/bambino-200e/nsh/defconfig @@ -209,10 +209,11 @@ CONFIG_LPC43_BOOT_SPIFI=y # CONFIG_LPC43_SPIFI is not set # CONFIG_LPC43_SSP0 is not set # CONFIG_LPC43_SSP1 is not set -# CONFIG_LPC43_TMR0 is not set +CONFIG_LPC43_TMR0=y # CONFIG_LPC43_TMR1 is not set # CONFIG_LPC43_TMR2 is not set # CONFIG_LPC43_TMR3 is not set +CONFIG_LPC43_TIMER=y # CONFIG_LPC43_USART0 is not set CONFIG_LPC43_UART1=y # CONFIG_LPC43_USART2 is not set @@ -262,7 +263,7 @@ CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y # CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set +CONFIG_ARCH_HAVE_EXTCLK=y # CONFIG_ARCH_HAVE_POWEROFF is not set CONFIG_ARCH_HAVE_RESET=y # CONFIG_ARCH_USE_MPU is not set @@ -350,6 +351,7 @@ CONFIG_DISABLE_OS_API=y CONFIG_ARCH_HAVE_TICKLESS=y # CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEMTICK_EXTCLK is not set # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set # CONFIG_ARCH_HAVE_TIMEKEEPING is not set @@ -466,7 +468,7 @@ CONFIG_DEV_NULL=y # # Timer Driver Support # -# CONFIG_TIMER is not set +CONFIG_TIMER=y # CONFIG_ONESHOT is not set # CONFIG_RTC is not set # CONFIG_WATCHDOG is not set @@ -809,6 +811,14 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_TIFF is not set +CONFIG_EXAMPLES_TIMER=y +CONFIG_EXAMPLE_TIMER_DEVNAME="/dev/timer0" +CONFIG_EXAMPLE_TIMER_INTERVAL=1000000 +CONFIG_EXAMPLE_TIMER_DELAY=100000 +CONFIG_EXAMPLE_TIMER_NSAMPLES=20 +CONFIG_EXAMPLES_TIMER_APPNAME="timer" +CONFIG_EXAMPLES_TIMER_STACKSIZE=2048 +CONFIG_EXAMPLES_TIMER_PRIORITY=100 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set diff --git a/configs/bambino-200e/src/Makefile b/configs/bambino-200e/src/Makefile index fa49acd1041..bb34f2be40d 100644 --- a/configs/bambino-200e/src/Makefile +++ b/configs/bambino-200e/src/Makefile @@ -57,6 +57,10 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += lpc43_buttons.c endif +ifeq ($(CONFIG_TIMER),y) +CSRCS += lpc43_timer.c +endif + ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc43_usbmsc.c endif diff --git a/configs/bambino-200e/src/bambino-200e.h b/configs/bambino-200e/src/bambino-200e.h index 2ec6d17479e..9a0b8568014 100644 --- a/configs/bambino-200e/src/bambino-200e.h +++ b/configs/bambino-200e/src/bambino-200e.h @@ -123,5 +123,19 @@ void weak_function lpc43_sspdev_initialize(void); +/************************************************************************************ + * Name: lpc43xx_timerinitialize() + * + * Description: + * Perform architecture-specific initialization of the timer hardware. + * + ************************************************************************************/ + +#ifdef CONFIG_TIMER +int lpc43_timerinitialize(void); +#else +# define lpc43_timerinitialize() (0) +#endif + #endif /* __ASSEMBLY__ */ #endif /* _CONFIGS_BAMBINO_200E_SRC_BAMBINO_H */ diff --git a/configs/bambino-200e/src/lpc43_appinit.c b/configs/bambino-200e/src/lpc43_appinit.c index eae609cf2e0..13c51dfd818 100644 --- a/configs/bambino-200e/src/lpc43_appinit.c +++ b/configs/bambino-200e/src/lpc43_appinit.c @@ -162,5 +162,13 @@ int board_app_initialize(uintptr_t arg) { /* Initialize the SPIFI block device */ - return nsh_spifi_initialize(); + nsh_spifi_initialize(); + +#ifdef CONFIG_TIMER + /* Registers the timers */ + + lpc43_timerinitialize(); +#endif + + return 0; } diff --git a/configs/bambino-200e/src/lpc43_timer.c b/configs/bambino-200e/src/lpc43_timer.c new file mode 100644 index 00000000000..2efe5b23662 --- /dev/null +++ b/configs/bambino-200e/src/lpc43_timer.c @@ -0,0 +1,125 @@ +/**************************************************************************** + * configs/bambino-200e/src/lpc43_timer.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Bob Doiron + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include "lpc43_timer.h" + +#ifdef CONFIG_TIMER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#if !(defined(CONFIG_LPC43_TMR0) || defined(CONFIG_LPC43_TMR1) || defined(CONFIG_LPC43_TMR2) \ + || defined(CONFIG_LPC43_TMR3) ) +# warning "CONFIG_LPC43_TMRx must be defined" +#endif + +/* Select the path to the registered watchdog timer device */ + +#ifndef CONFIG_TIMER0_DEVPATH +# define CONFIG_TIMER0_DEVPATH "/dev/timer0" +#endif +#ifndef CONFIG_TIMER1_DEVPATH +# define CONFIG_TIMER1_DEVPATH "/dev/timer1" +#endif +#ifndef CONFIG_TIMER2_DEVPATH +# define CONFIG_TIMER2_DEVPATH "/dev/timer2" +#endif +#ifndef CONFIG_TIMER3_DEVPATH +# define CONFIG_TIMER3_DEVPATH "/dev/timer3" +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lpc43_timerinitialize() + * + * Description: + * Perform architecture-specific initialization of the timer hardware. + * + ****************************************************************************/ + +int lpc43_timerinitialize(void) +{ + /* Initialize and register the timer devices */ + +#if defined(CONFIG_LPC43_TMR0) + tmrinfo("Initializing %s...\n", CONFIG_TIMER0_DEVPATH); + lpc43_tmrinitialize(CONFIG_TIMER0_DEVPATH, LPC43M4_IRQ_TIMER0); +#endif + +#if defined(CONFIG_LPC43_TMR1) + tmrinfo("Initializing %s...\n", CONFIG_TIMER1_DEVPATH); + lpc43_tmrinitialize(CONFIG_TIMER1_DEVPATH, LPC43M4_IRQ_TIMER1); +#endif + +#if defined(CONFIG_LPC43_TMR2) + tmrinfo("Initializing %s...\n", CONFIG_TIMER2_DEVPATH); + lpc43_tmrinitialize(CONFIG_TIMER2_DEVPATH, LPC43M4_IRQ_TIMER2); +#endif + +#if defined(CONFIG_LPC43_TMR3) + tmrinfo("Initializing %s...\n", CONFIG_TIMER3_DEVPATH); + lpc43_tmrinitialize(CONFIG_TIMER3_DEVPATH, LPC43M4_IRQ_TIMER3); +#endif + + return OK; +} + +#endif /* CONFIG_TIMER */ From 7bec4ffeec677de1bf7c3608d4e1e472460c55f8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 23 Nov 2016 17:40:01 -0600 Subject: [PATCH 27/35] Update some comments --- sched/irq/irq_csection.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index 96fb3abb1b5..9f89e2d2850 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -112,31 +112,32 @@ static inline void irq_waitlock(int cpu) while (up_testset(&g_cpu_irqlock) == SP_LOCKED) { - /* The deadlock condition would occur if CPUn: + /* A deadlock condition would occur if CPUn: * - * 1. Holds the g_cpu_irqlock, and - * 2. Is trying to interrupt CPUm + * 1. Holds the g_cpu_irqlock, and + * 2. Is trying to interrupt CPUm, but + * 3. CPUm is spinning trying acquaire the g_cpu_irqlock. * * The protocol for CPUn to pause CPUm is as follows * - * 1. The up_cpu_pause() implementation on CPUn locks both - * g_cpu_wait[m] and g_cpu_paused[m]. CPUn then waits - * spinning on g_cpu_wait[m]. - * 2. When CPUm receives the interrupt it (1) unlocks - * g_cpu_paused[m] and (2) locks g_cpu_wait[m]. The - * first unblocks CPUn and the second blocks CPUm in the - * interrupt handler. + * 1. The up_cpu_pause() implementation on CPUn locks both + * g_cpu_wait[m] and g_cpu_paused[m]. CPUn then waits + * spinning on g_cpu_wait[m]. + * 2. When CPUm receives the interrupt it (1) unlocks + * g_cpu_paused[m] and (2) locks g_cpu_wait[m]. The + * first unblocks CPUn and the second blocks CPUm in the + * interrupt handler. * * The problem in the deadlock case is that CPUm cannot receive - * the interrupt because it is locked up spinning. He we break + * the interrupt because it is locked up spinning. Here we break * the deadlock here be handling the pause interrupt request * while waiting. */ if (up_cpu_pausereq(cpu)) { - /* Yes.. some CPU is requesting to pause us! Handle the - * pause interrupt now. + /* Yes.. some other CPU is requesting to pause this CPU! Handle + * the pause interrupt now. */ DEBUGVERIFY(up_cpu_paused(cpu)); From 4b0bbf41ca9e2c6dbe3e3332437551a784dcb476 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 23 Nov 2016 22:24:14 -0600 Subject: [PATCH 28/35] SMP: Fix backward condition in test. --- arch/arm/src/armv7-a/arm_cpupause.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index 55ffbf93850..3b5b2039d2b 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -188,10 +188,11 @@ int arm_pause_handler(int irq, FAR void *context) /* Check for false alarms. Such false could occur as a consequence of * some deadlock breaking logic that might have already serviced the SG2 - * interrupt by calling up_cpu_paused. + * interrupt by calling up_cpu_paused(). If the pause event has already + * been processed with g_cpu_paused[cpu] will not be locked. */ - if (spin_islocked(&g_cpu_paused[cpu])) + if (!spin_islocked(&g_cpu_paused[cpu])) { return up_cpu_paused(cpu); } From 19e7f2210efbd15b4ae943b0194a7ce84ec7a6bf Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Nov 2016 04:24:40 +0000 Subject: [PATCH 29/35] arm_cpupause.c edited online with Bitbucket. Fix a typo in a comment. --- arch/arm/src/armv7-a/arm_cpupause.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index 3b5b2039d2b..1e7fca94c1e 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -189,7 +189,7 @@ int arm_pause_handler(int irq, FAR void *context) /* Check for false alarms. Such false could occur as a consequence of * some deadlock breaking logic that might have already serviced the SG2 * interrupt by calling up_cpu_paused(). If the pause event has already - * been processed with g_cpu_paused[cpu] will not be locked. + * been processed then g_cpu_paused[cpu] will not be locked. */ if (!spin_islocked(&g_cpu_paused[cpu])) From c03d126da6e43b4934d9f29a1e83314ea451b2d0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Nov 2016 04:45:07 +0000 Subject: [PATCH 30/35] arm_cpupause.c edited online with Bitbucke. What was I thinking... Back out previous change. --- arch/arm/src/armv7-a/arm_cpupause.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index 1e7fca94c1e..1b5726aba9e 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -192,7 +192,7 @@ int arm_pause_handler(int irq, FAR void *context) * been processed then g_cpu_paused[cpu] will not be locked. */ - if (!spin_islocked(&g_cpu_paused[cpu])) + if (spin_islocked(&g_cpu_paused[cpu])) { return up_cpu_paused(cpu); } From eb9f8074c0dd9b05be0501ef1d24d85c7740c2bb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Nov 2016 09:56:12 -0600 Subject: [PATCH 31/35] Update comments --- sched/sched/sched_mergepending.c | 4 ++-- sched/sched/sched_removereadytorun.c | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sched/sched/sched_mergepending.c b/sched/sched/sched_mergepending.c index 07a554ff068..863eb73c275 100644 --- a/sched/sched/sched_mergepending.c +++ b/sched/sched/sched_mergepending.c @@ -271,11 +271,11 @@ bool sched_mergepending(void) return ret; } - cpu = sched_cpu_select(ALL_CPUS /* ptcb->affinity */); + cpu = sched_cpu_select(ALL_CPUS /* ptcb->affinity */); rtcb = current_task(cpu); } - /* No more pending tasks can be made running. Move any reamaining + /* No more pending tasks can be made running. Move any remaining * tasks in the pending task list to the ready-to-run task list. */ diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index 85c3d43fac5..5b6b663d97c 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -145,7 +145,7 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) cpu = rtcb->cpu; tasklist = TLIST_HEAD(rtcb->task_state, cpu); - /* Check if the TCB to be removed is at the head of a ready to run list. + /* Check if the TCB to be removed is at the head of a ready-to-run list. * For the case of SMP, there are two lists involved: (1) the * g_readytorun list that holds non-running tasks that have not been * assigned to a CPU, and (2) and the g_assignedtasks[] lists which hold @@ -154,9 +154,12 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) * only only removing the head of that list can result in a context * switch. * - * The tasklist RUNNABLE attribute will inform us if the list holds the - * currently executing and task and, hence, if a context switch could - * occur. + * rtcb->blink == NULL will tell us if the TCB is at the head of the + * ready-to-run list and, hence, a candidate for the new running task. + * + * If so, then the tasklist RUNNABLE attribute will inform us if the list + * holds the currently executing task and, hence, if a context switch + * should occur. */ if (rtcb->blink == NULL && TLIST_ISRUNNABLE(rtcb->task_state)) @@ -205,7 +208,10 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) rtrtcb = (FAR struct tcb_s *)rtrtcb->flink); /* Did we find a task in the g_readytorun list? Which task should - * we use? We decide strictly by the priority of the two tasks. + * we use? We decide strictly by the priority of the two tasks: + * Either (1) the task currently at the head of the g_assignedtasks[cpu] + * list (nexttcb) or (2) the highest priority task from the + * g_readytorun list with matching affinity (rtrtcb). */ if (rtrtcb != NULL && rtrtcb->sched_priority >= nxttcb->sched_priority) From f77dcdf323ce0b41a32028bf621fa2aae9ed1f44 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Nov 2016 11:45:05 -0600 Subject: [PATCH 32/35] ARMv7-A SMP: Add a little logic to signal handling. --- arch/arm/src/armv7-a/arm_schedulesigaction.c | 25 ++++++++++++++++++++ arch/arm/src/armv7-a/arm_sigdeliver.c | 12 +++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_schedulesigaction.c b/arch/arm/src/armv7-a/arm_schedulesigaction.c index 89df348ba03..c448a9a8a4d 100644 --- a/arch/arm/src/armv7-a/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-a/arm_schedulesigaction.c @@ -153,6 +153,18 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) CURRENT_REGS[REG_PC] = (uint32_t)up_sigdeliver; CURRENT_REGS[REG_CPSR] = (PSR_MODE_SVC | PSR_I_BIT | PSR_F_BIT); +#ifdef CONFIG_SMP + /* In an SMP configuration, the interrupt disable logic also + * involves spinlocks that are configured per the TCB irqcount + * field. This is logically equivalent to enter_critical_section(). + * The matching call to leave_critical_section() will be + * performed in up_sigdeliver(). + */ + + DEBUGASSERT(tcb->irqcount < INT16_MAX); + tcb->irqcount++; +#endif + /* And make sure that the saved context in the TCB is the same * as the interrupt return context. */ @@ -183,6 +195,19 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; tcb->xcp.regs[REG_CPSR] = (PSR_MODE_SVC | PSR_I_BIT | PSR_F_BIT); + +#ifdef CONFIG_SMP + /* In an SMP configuration, the interrupt disable logic also + * involves spinlocks that are configured per the TCB irqcount + * field. This is logically equivalent to enter_critical_section(); + * The matching leave_critical_section will be performed in + * The matching call to leave_critical_section() will be performed + * in up_sigdeliver(). + */ + + DEBUGASSERT(tcb->irqcount < INT16_MAX); + tcb->irqcount++; +#endif } } diff --git a/arch/arm/src/armv7-a/arm_sigdeliver.c b/arch/arm/src/armv7-a/arm_sigdeliver.c index be720a464c3..672648a63a5 100644 --- a/arch/arm/src/armv7-a/arm_sigdeliver.c +++ b/arch/arm/src/armv7-a/arm_sigdeliver.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-a/arm_sigdeliver.c * - * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -103,18 +103,24 @@ void up_sigdeliver(void) /* Then restore the task interrupt state */ - up_irq_restore(regs[REG_CPSR]); + leave_critical_section(regs[REG_CPSR]); - /* Deliver the signals */ + /* Deliver the signal */ sigdeliver(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original * errno that is needed by the user logic (it is probably EINTR). + * + * REVISIT: In SMP mode up_irq_save() probably only disables interrupts + * on the local CPU. We do not want to call enter_critical_section() + * here, however, because we don't want this state to stick after the + * call to up_fullcontextrestore(). */ sinfo("Resuming\n"); + (void)up_irq_save(); rtcb->pterrno = saved_errno; From 7568aaf21316ab4ab334295a7e54e0a64a4865d6 Mon Sep 17 00:00:00 2001 From: Ramtin Amin Date: Thu, 24 Nov 2016 12:58:23 -0600 Subject: [PATCH 33/35] Misoc LM32: Add signal handling logic --- arch/misoc/include/lm32/irq.h | 35 +++- arch/misoc/src/lm32/Make.defs | 2 +- arch/misoc/src/lm32/lm32.h | 11 +- arch/misoc/src/lm32/lm32_initialstate.c | 2 +- arch/misoc/src/lm32/lm32_schedulesigaction.c | 207 +++++++++++++++++++ arch/misoc/src/lm32/lm32_sigdeliver.c | 136 ++++++++++++ arch/misoc/src/lm32/lm32_vectors.S | 7 +- configs/misoc/hello/defconfig | 64 ++++-- 8 files changed, 438 insertions(+), 26 deletions(-) create mode 100644 arch/misoc/src/lm32/lm32_schedulesigaction.c create mode 100644 arch/misoc/src/lm32/lm32_sigdeliver.c diff --git a/arch/misoc/include/lm32/irq.h b/arch/misoc/include/lm32/irq.h index 2e5e51e83a6..57512bba884 100644 --- a/arch/misoc/include/lm32/irq.h +++ b/arch/misoc/include/lm32/irq.h @@ -195,11 +195,44 @@ struct xcptcontext { +#ifndef CONFIG_DISABLE_SIGNALS + /* The following function pointer is non-NULL if there are pending signals + * to be processed. + */ + + void *sigdeliver; /* Actual type is sig_deliver_t */ + + /* These additional register save locations are used to implement the + * signal delivery trampoline. + */ + + uint32_t saved_epc; /* Trampoline PC */ + uint32_t saved_int_ctx; /* Interrupt context with interrupts disabled. */ + +# ifdef CONFIG_BUILD_KERNEL + /* This is the saved address to use when returning from a user-space + * signal handler. + */ + + uint32_t sigreturn; + +# endif +#endif + +#ifdef CONFIG_BUILD_KERNEL + /* The following array holds information needed to return from each nested + * system call. + */ + + uint8_t nsyscalls; + struct xcpt_syscall_s syscall[CONFIG_SYS_NNEST]; + +#endif + /* Register save area */ uint32_t regs[XCPTCONTEXT_REGS]; }; #endif /* __ASSEMBLY__ */ - #endif /* __ARCH_MISOC_INCLUDE_LM32_IRQ_H */ diff --git a/arch/misoc/src/lm32/Make.defs b/arch/misoc/src/lm32/Make.defs index 01a6702dcb0..addffc59848 100644 --- a/arch/misoc/src/lm32/Make.defs +++ b/arch/misoc/src/lm32/Make.defs @@ -49,4 +49,4 @@ CHIP_CSRCS += lm32_doirq.c lm32_dumpstate.c lm32_exit.c lm32_idle.c CHIP_CSRCS += lm32_initialize.c lm32_initialstate.c lm32_interruptcontext.c CHIP_CSRCS += lm32_irq.c lm32_releasepending.c lm32_releasestack.c CHIP_CSRCS += lm32_stackframe.c lm32_swint.c lm32_unblocktask.c -CHIP_CSRCS += lm32_reprioritizertr.c +CHIP_CSRCS += lm32_reprioritizertr.c lm32_schedulesigaction.c lm32_sigdeliver.c diff --git a/arch/misoc/src/lm32/lm32.h b/arch/misoc/src/lm32/lm32.h index eac1fe76516..b23e60e4f20 100644 --- a/arch/misoc/src/lm32/lm32.h +++ b/arch/misoc/src/lm32/lm32.h @@ -57,16 +57,17 @@ * logic. */ -#define STACK_COLOR 0xdeadbeef -#define INTSTACK_COLOR 0xdeadbeef -#define HEAP_COLOR 'h' +#define STACK_COLOR 0xdeadbeef +#define INTSTACK_COLOR 0xdeadbeef +#define HEAP_COLOR 'h' /* In the LM32 model, the state is copied from the stack to the TCB, but * only a referenced is passed to get the state from the TCB. */ -#define up_savestate(regs) lm32_copystate(regs, (uint32_t*)g_current_regs) -#define up_restorestate(regs) (g_current_regs = regs) +#define up_savestate(regs) lm32_copystate(regs, (uint32_t*)g_current_regs) +#define up_copystate(rega,regb) lm32_copystate(rega, regb) +#define up_restorestate(regs) (g_current_regs = regs) /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is diff --git a/arch/misoc/src/lm32/lm32_initialstate.c b/arch/misoc/src/lm32/lm32_initialstate.c index 6064e186c84..f46d2aaf07b 100644 --- a/arch/misoc/src/lm32/lm32_initialstate.c +++ b/arch/misoc/src/lm32/lm32_initialstate.c @@ -101,7 +101,7 @@ void up_initial_state(struct tcb_s *tcb) /* Initial state of IE: Interrupts enabled */ - xcp->regs[REG_INT_CTX] = 1; + xcp->regs[REG_INT_CTX] = 2; /* If this task is running PIC, then set the PIC base register to the * address of the allocated D-Space region. diff --git a/arch/misoc/src/lm32/lm32_schedulesigaction.c b/arch/misoc/src/lm32/lm32_schedulesigaction.c new file mode 100644 index 00000000000..15f06e0e779 --- /dev/null +++ b/arch/misoc/src/lm32/lm32_schedulesigaction.c @@ -0,0 +1,207 @@ +/**************************************************************************** + * arch/misoc/src/lm32/lm32_schedulesigaction.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Modified for MISOC: + * + * Copyright (C) 2016 Ramtin Amin. All rights reserved. + * Author: Ramtin Amin + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include + +#include "sched/sched.h" +#include "lm32.h" + +#ifndef CONFIG_DISABLE_SIGNALS + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_schedule_sigaction + * + * Description: + * This function is called by the OS when one or more + * signal handling actions have been queued for execution. + * The architecture specific code must configure things so + * that the 'igdeliver' callback is executed on the thread + * specified by 'tcb' as soon as possible. + * + * This function may be called from interrupt handling logic. + * + * This operation should not cause the task to be unblocked + * nor should it cause any immediate execution of sigdeliver. + * Typically, a few cases need to be considered: + * + * (1) This function may be called from an interrupt handler + * During interrupt processing, all xcptcontext structures + * should be valid for all tasks. That structure should + * be modified to invoke sigdeliver() either on return + * from (this) interrupt or on some subsequent context + * switch to the recipient task. + * (2) If not in an interrupt handler and the tcb is NOT + * the currently executing task, then again just modify + * the saved xcptcontext structure for the recipient + * task so it will invoke sigdeliver when that task is + * later resumed. + * (3) If not in an interrupt handler and the tcb IS the + * currently executing task -- just call the signal + * handler now. + * + ****************************************************************************/ + +void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) +{ + irqstate_t flags; + uint32_t int_ctx; + + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + + /* Make sure that interrupts are disabled */ + + flags = enter_critical_section(); + + /* Refuse to handle nested signal actions */ + + if (!tcb->xcp.sigdeliver) + { + /* First, handle some special cases when the signal is + * being delivered to the currently executing task. + */ + + sinfo("rtcb=0x%p g_current_regs=0x%p\n", + this_task(), g_current_regs); + + if (tcb == this_task()) + { + /* CASE 1: We are not in an interrupt handler and + * a task is signalling itself for some reason. + */ + + if (!g_current_regs) + { + /* In this case just deliver the signal now. */ + + sigdeliver(tcb); + } + + /* CASE 2: We are in an interrupt handler AND the + * interrupted task is the same as the one that + * must receive the signal, then we will have to modify + * the return state as well as the state in the TCB. + * + * Hmmm... there looks like a latent bug here: The following + * logic would fail in the strange case where we are in an + * interrupt handler, the thread is signalling itself, but + * a context switch to another task has occurred so that + * g_current_regs does not refer to the thread of this_task()! + */ + + else + { + /* Save the return EPC and STATUS registers. These will be + * restored by the signal trampoline after the signals have + * been delivered. + */ + + tcb->xcp.sigdeliver = sigdeliver; + tcb->xcp.saved_epc = g_current_regs[REG_EPC]; + + /* Then set up to vector to the trampoline with interrupts + * disabled + */ + + g_current_regs[REG_EPC] = (uint32_t)up_sigdeliver; + g_current_regs[REG_INT_CTX] = 0; + + + /* And make sure that the saved context in the TCB + * is the same as the interrupt return context. + */ + + up_savestate(tcb->xcp.regs); + + sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", + tcb->xcp.saved_epc, tcb->xcp.saved_status, + g_current_regs[REG_EPC], g_current_regs[REG_STATUS]); + } + } + + /* Otherwise, we are (1) signaling a task is not running + * from an interrupt handler or (2) we are not in an + * interrupt handler and the running task is signalling + * some non-running task. + */ + + else + { + /* Save the return EPC and STATUS registers. These will be + * restored by the signal trampoline after the signals have + * been delivered. + */ + + tcb->xcp.sigdeliver = sigdeliver; + tcb->xcp.saved_epc = tcb->xcp.regs[REG_EPC]; + tcb->xcp.saved_int_ctx = tcb->xcp.regs[REG_INT_CTX]; + + /* Then set up to vector to the trampoline with interrupts + * disabled + */ + + tcb->xcp.regs[REG_EPC] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_INT_CTX] = 0; + + sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", + tcb->xcp.saved_epc, tcb->xcp.saved_status, + tcb->xcp.regs[REG_EPC], tcb->xcp.regs[REG_STATUS]); + } + } + + leave_critical_section(flags); +} + +#endif /* !CONFIG_DISABLE_SIGNALS */ diff --git a/arch/misoc/src/lm32/lm32_sigdeliver.c b/arch/misoc/src/lm32/lm32_sigdeliver.c new file mode 100644 index 00000000000..ce3378e57df --- /dev/null +++ b/arch/misoc/src/lm32/lm32_sigdeliver.c @@ -0,0 +1,136 @@ +/**************************************************************************** + * arch/misoc/src/lm32/lm32_sigdeliver.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "sched/sched.h" +#include "lm32.h" + +#ifndef CONFIG_DISABLE_SIGNALS + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_sigdeliver + * + * Description: + * This is the a signal handling trampoline. When a signal action was + * posted. The task context was mucked with and forced to branch to this + * location with interrupts disabled. + * + ****************************************************************************/ + +void up_sigdeliver(void) +{ + struct tcb_s *rtcb = this_task(); + uint32_t regs[XCPTCONTEXT_REGS]; + sig_deliver_t sigdeliver; + + /* Save the errno. This must be preserved throughout the signal handling + * so that the user code final gets the correct errno value (probably + * EINTR). + */ + + int saved_errno = rtcb->pterrno; + + board_autoled_on(LED_SIGNAL); + + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); + ASSERT(rtcb->xcp.sigdeliver != NULL); + + /* Save the real return state on the stack. */ + + up_copystate(regs, rtcb->xcp.regs); + regs[REG_EPC] = rtcb->xcp.saved_epc; + regs[REG_INT_CTX] = rtcb->xcp.saved_int_ctx; + + /* Get a local copy of the sigdeliver function pointer. We do this so that + * we can nullify the sigdeliver function pointer in the TCB and accept + * more signal deliveries while processing the current pending signals. + */ + + sigdeliver = rtcb->xcp.sigdeliver; + rtcb->xcp.sigdeliver = NULL; + + /* Then restore the task interrupt state */ + + up_irq_restore((irqstate_t)regs[REG_INT_CTX]); + + /* Deliver the signals */ + + sigdeliver(rtcb); + + /* Output any debug messages BEFORE restoring errno (because they may + * alter errno), then disable interrupts again and restore the original + * errno that is needed by the user logic (it is probably EINTR). + */ + + sinfo("Resuming EPC: %08x INT_CTX: %08x\n", regs[REG_EPC], regs[REG_INT_CTX]); + + (void)up_irq_save(); + rtcb->pterrno = saved_errno; + + /* Then restore the correct state for this thread of + * execution. + */ + + board_autoled_off(LED_SIGNAL); + up_fullcontextrestore(regs); + + /* up_fullcontextrestore() should not return but could if the software + * interrupts are disabled. + */ + + PANIC(); +} + +#endif /* !CONFIG_DISABLE_SIGNALS */ diff --git a/arch/misoc/src/lm32/lm32_vectors.S b/arch/misoc/src/lm32/lm32_vectors.S index 4cc83a39197..45407f0db7d 100644 --- a/arch/misoc/src/lm32/lm32_vectors.S +++ b/arch/misoc/src/lm32/lm32_vectors.S @@ -208,7 +208,6 @@ _do_reset: sw (sp+REG_X23), r23 sw (sp+REG_X24), r24 sw (sp+REG_X25), r25 - sw (sp+REG_GP), r26 sw (sp+REG_FP), r27 @@ -217,7 +216,7 @@ _do_reset: addi r1, sp, 136 sw (sp+REG_SP), r1 - /* reg RA done later */ + /* Reg RA done later */ sw (sp+REG_EA), r30 sw (sp+REG_BA), r31 @@ -235,6 +234,10 @@ _do_reset: /* The 2nd argument is the regs pointer */ addi r2, sp, 0 + + /* Move sp away from X0 */ + + addi sp, sp, -4 ret .restore_all_and_eret: diff --git a/configs/misoc/hello/defconfig b/configs/misoc/hello/defconfig index 71aea364a7e..0fd2918d184 100644 --- a/configs/misoc/hello/defconfig +++ b/configs/misoc/hello/defconfig @@ -162,7 +162,7 @@ CONFIG_BOOT_RUNFROMFLASH=y # Boot Memory Configuration # CONFIG_RAM_START=0x40000000 -CONFIG_RAM_SIZE=524288 +CONFIG_RAM_SIZE=67108864 # CONFIG_ARCH_HAVE_SDRAM is not set # @@ -192,12 +192,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y # # RTOS Features # -CONFIG_DISABLE_OS_API=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DISABLE_SIGNALS=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=y +# CONFIG_DISABLE_OS_API is not set # # Clocks and Timers @@ -222,12 +217,18 @@ CONFIG_PREALLOC_TIMERS=0 CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_RR_INTERVAL=0 +CONFIG_RR_INTERVAL=200 # CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=4 +CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 # # Performance Monitoring @@ -254,19 +255,36 @@ CONFIG_NAME_MAX=32 # CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ONEXIT is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=32 +CONFIG_MQ_MAXMSGSIZE=32 # CONFIG_MODULE is not set # # Work queue support # +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_HPWORK is not set +# CONFIG_SCHED_LPWORK is not set # # Stack and heap information # -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=1024 -CONFIG_PTHREAD_STACK_MIN=512 -CONFIG_PTHREAD_STACK_DEFAULT=1024 +CONFIG_IDLETHREAD_STACKSIZE=2048 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_LIB_SYSCALL is not set # @@ -431,7 +449,9 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # CONFIG_FS_READABLE is not set # CONFIG_FS_WRITABLE is not set # CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set +# CONFIG_FS_BINFS is not set # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set @@ -461,9 +481,10 @@ CONFIG_MM_REGIONS=1 # Binary Loader # # CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set # CONFIG_NXFLAT is not set # CONFIG_ELF is not set -# CONFIG_BUILTIN is not set +CONFIG_BUILTIN=y # CONFIG_PIC is not set # CONFIG_SYMTAB_ORDEREDBYNAME is not set @@ -477,6 +498,7 @@ CONFIG_MM_REGIONS=1 CONFIG_STDIO_BUFFER_SIZE=0 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=0 +CONFIG_LIB_HOMEDIR="/" # CONFIG_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set @@ -495,6 +517,7 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set # CONFIG_TIME_EXTENDED is not set CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set @@ -520,6 +543,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Application Configuration # +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + # # CAN Utilities # @@ -548,10 +576,10 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_NRF24L01TERM is not set CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NXFFS is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set @@ -561,6 +589,7 @@ CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8 CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 +CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set @@ -573,6 +602,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -637,6 +667,7 @@ CONFIG_NSH_MAXARGUMENTS=6 CONFIG_NSH_ARGCAT=y CONFIG_NSH_NESTDEPTH=3 # CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y # # Disable Individual commands @@ -741,6 +772,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 From 7f636f2280fe81d94df5b04de37da454c668f92a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Nov 2016 13:33:43 -0600 Subject: [PATCH 34/35] SMP: Add spin_trylock(). Use this in conditions where other CPUs need to stopped but we cannot call enter_critical_section. --- arch/arm/src/armv7-a/arm_assert.c | 5 +++++ arch/arm/src/armv7-a/arm_sigdeliver.c | 3 +++ arch/arm/src/common/up_exit.c | 9 ++++++--- configs/sabre-6quad/README.txt | 5 ----- include/nuttx/spinlock.h | 21 +++++++++++++++++++++ 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index 3c798d33a0d..c6742d2a6a5 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -53,6 +53,7 @@ #include "up_arch.h" #include "sched/sched.h" +#include "irq/irq.h" #include "up_internal.h" /**************************************************************************** @@ -346,6 +347,10 @@ static void _up_assert(int errorcode) if (CURRENT_REGS || this_task()->pid == 0) { (void)up_irq_save(); +#ifdef SMP + (void)spin_trylock(&g_cpu_irqlock); +#endif + for (; ; ) { #ifdef CONFIG_ARCH_LEDS diff --git a/arch/arm/src/armv7-a/arm_sigdeliver.c b/arch/arm/src/armv7-a/arm_sigdeliver.c index 672648a63a5..5d895832820 100644 --- a/arch/arm/src/armv7-a/arm_sigdeliver.c +++ b/arch/arm/src/armv7-a/arm_sigdeliver.c @@ -117,6 +117,9 @@ void up_sigdeliver(void) * on the local CPU. We do not want to call enter_critical_section() * here, however, because we don't want this state to stick after the * call to up_fullcontextrestore(). + * + * I would prefer that all interrupts are disabled when + * up_fullcontextrestore() is called, but that may not be necessary. */ sinfo("Resuming\n"); diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index 4d16f2a8a55..ec5a88498be 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -50,6 +50,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" +#include "irq/irq.h" #include "up_internal.h" /**************************************************************************** @@ -140,11 +141,14 @@ void _exit(int status) { struct tcb_s *tcb; - /* Disable interrupts. They will be restored when the next - * task is started. + /* Disable interrupts. They will be restored when the next task is + * started. */ (void)up_irq_save(); +#ifdef SMP + (void)spin_trylock(&g_cpu_irqlock); +#endif sinfo("TCB=%p exiting\n", this_task()); @@ -177,4 +181,3 @@ void _exit(int status) up_fullcontextrestore(tcb->xcp.regs); } - diff --git a/configs/sabre-6quad/README.txt b/configs/sabre-6quad/README.txt index ec41ee62719..c7d7fc57c7d 100644 --- a/configs/sabre-6quad/README.txt +++ b/configs/sabre-6quad/README.txt @@ -555,11 +555,6 @@ Open Issues: Update: Cache inconsistencies seem to be the root cause of all current SMP issues. -5. Assertions. On a fatal assertions, other CPUs need to be stopped. The SCR, - however, only supports disabling CPUs 1 through 3. Perhaps if the assertion - occurs on CPUn, n > 0, then it should use and SGI to perform the assertion - on CPU0 always. From CPU0, CPU1-3 can be disabled. - Configurations ============== diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 1ad7fef5253..ee6bf65b648 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -179,6 +179,27 @@ void spin_initializer(FAR struct spinlock_s *lock); void spin_lock(FAR volatile spinlock_t *lock); +/**************************************************************************** + * Name: spin_trylock + * + * Description: + * Try once to lock the spinlock. Do not wait if the spinlock is already + * locked. + * + * Input Parameters: + * lock - A reference to the spinlock object to lock. + * + * Returned Value: + * SP_LOCKED - Failure, the spinlock was already locked + * SP_UNLOCKED - Success, the spinlock was successfully locked + * + * Assumptions: + * Not running at the interrupt level. + * + ****************************************************************************/ + +#define spin_trylock(l) up_testset(l) + /**************************************************************************** * Name: spin_lockr * From b08fb33c282d1b4470648ee1afe032ad754bf287 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Nov 2016 17:59:45 -0600 Subject: [PATCH 35/35] SMP: Fix typos in some conditional compilation --- arch/arm/src/armv7-a/arm_assert.c | 13 ++++++++++--- arch/arm/src/common/up_exit.c | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index c6742d2a6a5..72952e0cfaa 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -346,14 +346,21 @@ static void _up_assert(int errorcode) if (CURRENT_REGS || this_task()->pid == 0) { + /* Disable interrupts on this CPU */ + (void)up_irq_save(); -#ifdef SMP - (void)spin_trylock(&g_cpu_irqlock); -#endif for (; ; ) { +#ifdef CONFIG_SMP + /* Try (again) to stop activity on other CPUs */ + + (void)spin_trylock(&g_cpu_irqlock); +#endif + #ifdef CONFIG_ARCH_LEDS + /* FLASH LEDs a 2Hz */ + board_autoled_on(LED_PANIC); up_mdelay(250); board_autoled_off(LED_PANIC); diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index ec5a88498be..50ff85a743b 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -146,7 +146,7 @@ void _exit(int status) */ (void)up_irq_save(); -#ifdef SMP +#ifdef CONFIG_SMP (void)spin_trylock(&g_cpu_irqlock); #endif