mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 05:39:47 +08:00
arm: New function
Add and use function _ARMV7M_Set_exception_priority_and_handler(). Use ARMV7M_EXCEPTION_PRIORITY_LOWEST define.
This commit is contained in:
@@ -27,6 +27,7 @@ libscorecpu_a_SOURCES += armv7m-context-switch.c
|
||||
libscorecpu_a_SOURCES += armv7m-exception-handler-get.c
|
||||
libscorecpu_a_SOURCES += armv7m-exception-handler-set.c
|
||||
libscorecpu_a_SOURCES += armv7m-exception-priority-get.c
|
||||
libscorecpu_a_SOURCES += armv7m-exception-priority-handler.c
|
||||
libscorecpu_a_SOURCES += armv7m-exception-priority-set.c
|
||||
libscorecpu_a_SOURCES += armv7m-initialize.c
|
||||
libscorecpu_a_SOURCES += armv7m-isr-dispatch.c
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Sebastian Huber. 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
|
||||
|
||||
#include <rtems/score/armv7m.h>
|
||||
|
||||
void _ARMV7M_Set_exception_priority_and_handler(
|
||||
int index,
|
||||
int priority,
|
||||
ARMV7M_Exception_handler handler
|
||||
)
|
||||
{
|
||||
_ARMV7M_Set_exception_priority( index, priority );
|
||||
_ARMV7M_Set_exception_handler( index, handler );
|
||||
}
|
||||
|
||||
#endif /* ARM_MULTILIB_ARCH_V7M */
|
||||
@@ -31,14 +31,14 @@ void _CPU_Initialize( void )
|
||||
* also "ARMv7-M Architecture Reference Manual, Issue D" section B1.5.4
|
||||
* "Exception priorities and preemption".
|
||||
*/
|
||||
_ARMV7M_Set_exception_priority( ARMV7M_VECTOR_SVC, 0xff );
|
||||
_ARMV7M_Set_exception_priority( ARMV7M_VECTOR_PENDSV, 0xff );
|
||||
_ARMV7M_Set_exception_handler(
|
||||
_ARMV7M_Set_exception_priority_and_handler(
|
||||
ARMV7M_VECTOR_SVC,
|
||||
ARMV7M_EXCEPTION_PRIORITY_LOWEST,
|
||||
_ARMV7M_Supervisor_call
|
||||
);
|
||||
_ARMV7M_Set_exception_handler(
|
||||
_ARMV7M_Set_exception_priority_and_handler(
|
||||
ARMV7M_VECTOR_PENDSV,
|
||||
ARMV7M_EXCEPTION_PRIORITY_LOWEST,
|
||||
_ARMV7M_Pendable_service_call
|
||||
);
|
||||
}
|
||||
|
||||
@@ -459,6 +459,12 @@ void _ARMV7M_Set_exception_handler(
|
||||
ARMV7M_Exception_handler handler
|
||||
);
|
||||
|
||||
void _ARMV7M_Set_exception_priority_and_handler(
|
||||
int index,
|
||||
int priority,
|
||||
ARMV7M_Exception_handler handler
|
||||
);
|
||||
|
||||
void _ARMV7M_Interrupt_service_enter( void );
|
||||
|
||||
void _ARMV7M_Interrupt_service_leave( void );
|
||||
|
||||
Reference in New Issue
Block a user