git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7747 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
014976ee10
commit
2fd2d1efb9
|
@ -51,13 +51,15 @@
|
|||
/* Module interrupt handlers. */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if !CORTEX_ALTERNATE_SWITCH || defined(__DOXYGEN__)
|
||||
#if (CORTEX_ALTERNATE_SWITCH == FALSE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief NMI vector.
|
||||
* @details The NMI vector is used for exception mode re-entering after a
|
||||
* context switch.
|
||||
*/
|
||||
/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
|
||||
void NMI_Handler(void) {
|
||||
/*lint -restore*/
|
||||
|
||||
/* The port_extctx structure is pointed by the PSP register.*/
|
||||
struct port_extctx *ctxp = (struct port_extctx *)__get_PSP();
|
||||
|
@ -74,13 +76,15 @@ void NMI_Handler(void) {
|
|||
}
|
||||
#endif /* !CORTEX_ALTERNATE_SWITCH */
|
||||
|
||||
#if CORTEX_ALTERNATE_SWITCH || defined(__DOXYGEN__)
|
||||
#if (CORTEX_ALTERNATE_SWITCH == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief PendSV vector.
|
||||
* @details The PendSV vector is used for exception mode re-entering after a
|
||||
* context switch.
|
||||
*/
|
||||
/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
|
||||
void PendSV_Handler(void) {
|
||||
/*lint -restore*/
|
||||
|
||||
/* The port_extctx structure is pointed by the PSP register.*/
|
||||
struct port_extctx *ctxp = (struct port_extctx *)__get_PSP();
|
||||
|
@ -105,7 +109,7 @@ void PendSV_Handler(void) {
|
|||
*/
|
||||
void _port_irq_epilogue(regarm_t lr) {
|
||||
|
||||
if (lr != (regarm_t)0xFFFFFFF1) {
|
||||
if (lr != (regarm_t)0xFFFFFFF1U) {
|
||||
struct port_extctx *ctxp;
|
||||
|
||||
port_lock_from_isr();
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
/**
|
||||
* @brief Port-specific information string.
|
||||
*/
|
||||
#if !CORTEX_ALTERNATE_SWITCH || defined(__DOXYGEN__)
|
||||
#if (CORTEX_ALTERNATE_SWITCH == FALSE) || defined(__DOXYGEN__)
|
||||
#define PORT_INFO "Preemption through NMI"
|
||||
#else
|
||||
#define PORT_INFO "Preemption through PendSV"
|
||||
|
@ -134,7 +134,7 @@
|
|||
/**
|
||||
* @brief Maximum usable priority for normal ISRs.
|
||||
*/
|
||||
#if CORTEX_ALTERNATE_SWITCH || defined(__DOXYGEN__)
|
||||
#if (CORTEX_ALTERNATE_SWITCH == TRUE) || defined(__DOXYGEN__)
|
||||
#define CORTEX_MAX_KERNEL_PRIORITY 1
|
||||
#else
|
||||
#define CORTEX_MAX_KERNEL_PRIORITY 0
|
||||
|
@ -246,7 +246,7 @@ struct port_intctx {
|
|||
* @param[in] ntp the thread to be switched in
|
||||
* @param[in] otp the thread to be switched out
|
||||
*/
|
||||
#if !CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__)
|
||||
#if (CH_DBG_ENABLE_STACK_CHECK == FALSE) || defined(__DOXYGEN__)
|
||||
#define port_switch(ntp, otp) _port_switch(ntp, otp)
|
||||
#else
|
||||
#define port_switch(ntp, otp) { \
|
||||
|
@ -306,7 +306,7 @@ static inline syssts_t port_get_irq_status(void) {
|
|||
*/
|
||||
static inline bool port_irq_enabled(syssts_t sts) {
|
||||
|
||||
return (sts & 1) == 0;
|
||||
return (sts & (syssts_t)1) == (syssts_t)0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -318,7 +318,7 @@ static inline bool port_irq_enabled(syssts_t sts) {
|
|||
*/
|
||||
static inline bool port_is_isr_context(void) {
|
||||
|
||||
return (bool)((__get_IPSR() & 0x1FF) != 0);
|
||||
return (bool)((__get_IPSR() & 0x1FFU) != 0U);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -393,7 +393,7 @@ static inline void port_enable(void) {
|
|||
*/
|
||||
static inline void port_wait_for_interrupt(void) {
|
||||
|
||||
#if CORTEX_ENABLE_WFI_IDLE
|
||||
#if CORTEX_ENABLE_WFI_IDLE == TRUE
|
||||
__WFI();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -397,12 +397,12 @@ static inline void port_init(void) {
|
|||
* @return The interrupts status.
|
||||
*/
|
||||
static inline syssts_t port_get_irq_status(void) {
|
||||
uint32_t sts;
|
||||
syssts_t sts;
|
||||
|
||||
#if CORTEX_SIMPLIFIED_PRIORITY == FALSE
|
||||
sts = __get_BASEPRI();
|
||||
sts = (syssts_t)__get_BASEPRI();
|
||||
#else /* CORTEX_SIMPLIFIED_PRIORITY */
|
||||
sts = __get_PRIMASK();
|
||||
sts = (syssts_t)__get_PRIMASK();
|
||||
#endif /* CORTEX_SIMPLIFIED_PRIORITY */
|
||||
return sts;
|
||||
}
|
||||
|
@ -419,9 +419,9 @@ static inline syssts_t port_get_irq_status(void) {
|
|||
static inline bool port_irq_enabled(syssts_t sts) {
|
||||
|
||||
#if CORTEX_SIMPLIFIED_PRIORITY == FALSE
|
||||
return sts == CORTEX_BASEPRI_DISABLED;
|
||||
return sts == (syssts_t)CORTEX_BASEPRI_DISABLED;
|
||||
#else /* CORTEX_SIMPLIFIED_PRIORITY */
|
||||
return (sts & 1) == 0;
|
||||
return (sts & (syssts_t)1) == (syssts_t)0;
|
||||
#endif /* CORTEX_SIMPLIFIED_PRIORITY */
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void _tm_init(void) {
|
|||
/* Time Measurement subsystem calibration, it does a null measurement
|
||||
and calculates the call overhead which is subtracted to real
|
||||
measurements.*/
|
||||
ch.tm.offset = 0;
|
||||
ch.tm.offset = (rtcnt_t)0;
|
||||
chTMObjectInit(&tm);
|
||||
chTMStartMeasurementX(&tm);
|
||||
chTMStopMeasurementX(&tm);
|
||||
|
@ -150,7 +150,7 @@ NOINLINE void chTMChainMeasurementToX(time_measurement_t *tmp1,
|
|||
tmp2->last = chSysGetRealtimeCounterX();
|
||||
|
||||
/* Stops previous measurement using the same time stamp.*/
|
||||
tm_stop(tmp1, tmp2->last, 0);
|
||||
tm_stop(tmp1, tmp2->last, (rtcnt_t)0);
|
||||
}
|
||||
|
||||
#endif /* CH_CFG_USE_TM == TRUE */
|
||||
|
|
|
@ -6,6 +6,24 @@
|
|||
+libh(core_cm4.h)
|
||||
+libh(stm32f4xx.h)
|
||||
|
||||
/* Reinforcing type checking for some critical types even if not required by
|
||||
MISRA.*/
|
||||
-strong(AJX, systime_t)
|
||||
-strong(AJX, rtcnt_t)
|
||||
-strong(AJX, rttime_t)
|
||||
-strong(AJX, syssts_t)
|
||||
-strong(AJX, msg_t)
|
||||
-strong(AJX, tmode_t)
|
||||
-strong(AJX, tstate_t)
|
||||
-strong(AJX, trefs_t)
|
||||
-strong(AJX, tslices_t)
|
||||
-strong(AJX, tprio_t)
|
||||
-strong(AJX, cnt_t)
|
||||
-strong(AJX, ucnt_t)
|
||||
-strong(AJX, eventid_t)
|
||||
-strong(AJX, eventmask_t)
|
||||
-strong(AJX, eventflags_t)
|
||||
|
||||
/* Permitting anonymous unions.*/
|
||||
+fan
|
||||
|
||||
|
@ -50,7 +68,7 @@
|
|||
header files, the guard is present, suppressing the noise.*/
|
||||
-e451
|
||||
|
||||
/* Waiver Rule 2.2, PCLint marks as pure functions that contain just arm
|
||||
/* Waiver Rule 2.2, PCLint marks as pure functions that contain just asm
|
||||
code, this does not mean that those functions do nothing.*/
|
||||
-e522
|
||||
|
||||
|
@ -59,7 +77,7 @@
|
|||
license URL and cannot be removed.*/
|
||||
-e9059
|
||||
|
||||
/* Waiver Rule 8.7, the static analyzer has no visibility of functions called
|
||||
/* Waiver Rule 8.7, the static analyser has no visibility of functions called
|
||||
from asm modules.*/
|
||||
-e765
|
||||
|
||||
|
@ -69,7 +87,7 @@
|
|||
|
||||
/* Waiver Rule 11.3, casts among different types are required by system
|
||||
design.*/
|
||||
-e740 /* Wrongly marked as 1.3 in PCLint 9-0L.*/
|
||||
-e740 /* Wrongly marked as 1.3 in PCLint 9.00L.*/
|
||||
-e9087
|
||||
|
||||
/* Waiver Rule 11.6, cast from integer to pointer is very commonly used
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
-elib(*) /* No checks on library files. */
|
||||
+libclass(angle,ansi)
|
||||
+libh(core_cm4.h)
|
||||
+libh(stm32f4xx.h)
|
||||
+libh(stm32*.h)
|
||||
+libh(*_lld.h)
|
||||
|
||||
/* Reinforcing type checking for some critical types even if not required by
|
||||
|
@ -69,7 +69,7 @@
|
|||
header files, the guard is present, suppressing the noise.*/
|
||||
-e451
|
||||
|
||||
/* Waiver Rule 2.2, PCLint marks as pure functions that contain just arm
|
||||
/* Waiver Rule 2.2, PCLint marks as pure functions that contain just asm
|
||||
code, this does not mean that those functions do nothing.*/
|
||||
-e522
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
|||
license URL and cannot be removed.*/
|
||||
-e9059
|
||||
|
||||
/* Waiver Rule 8.7, the static analyzer has no visibility of functions called
|
||||
/* Waiver Rule 8.7, the static analyser has no visibility of functions called
|
||||
from asm modules.*/
|
||||
-e765
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
|
||||
/* Waiver Rule 11.3, casts among different types are required by system
|
||||
design.*/
|
||||
-e740 /* Wrongly marked as 1.3 in PCLint 9-0L.*/
|
||||
-e740 /* Wrongly marked as 1.3 in PCLint 9.00L.*/
|
||||
-e9087
|
||||
|
||||
/* Waiver Rule 11.6, cast from integer to pointer is very commonly used
|
||||
|
|
Loading…
Reference in New Issue