forked from Imagelibrary/rtems
arm: Add _CPU_Thread_Idle_body for ARMv7-M
This commit is contained in:
@@ -33,6 +33,7 @@ libscorecpu_a_SOURCES += armv7m-isr-level-get.c
|
||||
libscorecpu_a_SOURCES += armv7m-isr-level-set.c
|
||||
libscorecpu_a_SOURCES += armv7m-isr-vector-install.c
|
||||
libscorecpu_a_SOURCES += armv7m-multitasking-start-stop.c
|
||||
libscorecpu_a_SOURCES += armv7m-thread-idle.c
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
include $(top_srcdir)/automake/local.am
|
||||
|
||||
30
cpukit/score/cpu/arm/armv7m-thread-idle.c
Normal file
30
cpukit/score/cpu/arm/armv7m-thread-idle.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Obere Lagerstr. 30
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <rtems/score/cpu.h>
|
||||
|
||||
#ifdef ARM_MULTILIB_ARCH_V7M
|
||||
|
||||
void *_CPU_Thread_Idle_body( uintptr_t ignored )
|
||||
{
|
||||
while ( true ) {
|
||||
__asm__ volatile ("wfi");
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* ARM_MULTILIB_ARCH_V7M */
|
||||
@@ -147,7 +147,11 @@
|
||||
|
||||
#define CPU_USE_DEFERRED_FP_SWITCH FALSE
|
||||
|
||||
#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
|
||||
#if defined(ARM_MULTILIB_ARCH_V7M)
|
||||
#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
|
||||
#else
|
||||
#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
|
||||
#endif
|
||||
|
||||
#define CPU_STACK_GROWS_UP FALSE
|
||||
|
||||
@@ -461,6 +465,10 @@ static inline uint16_t CPU_swap_u16( uint16_t value )
|
||||
#endif
|
||||
}
|
||||
|
||||
#if CPU_PROVIDES_IDLE_THREAD_BODY == TRUE
|
||||
void *_CPU_Thread_Idle_body( uintptr_t ignored );
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#if defined(ARM_MULTILIB_ARCH_V4)
|
||||
|
||||
Reference in New Issue
Block a user