ARMv7M: Adjust implemented priority bit assertions (#665)

Adjust assertions related to the CMSIS __NVIC_PRIO_BITS and FreeRTOS
configPRIO_BITS configuration macros such that these macros specify the
minimum number of implemented priority bits supported by a config
build rather than the exact number of implemented priority bits.

Related to Qemu issue #1122
This commit is contained in:
Paul Bartell 2023-04-19 22:24:54 -07:00 committed by GitHub
parent aa987a3443
commit 686b6e62eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 200 additions and 136 deletions

View file

@ -287,19 +287,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -306,19 +306,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -330,19 +330,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -453,19 +453,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -373,19 +373,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -496,19 +496,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried
* from hardware is at least as many as specified in the
* CMSIS __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried
* from hardware is at least as many as specified in the
* FreeRTOS configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -361,19 +361,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -279,19 +279,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -317,19 +317,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -431,19 +431,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -305,19 +305,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -367,19 +367,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -332,19 +332,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -398,19 +398,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -491,19 +491,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif

View file

@ -382,19 +382,23 @@ BaseType_t xPortStartScheduler( void )
#ifdef __NVIC_PRIO_BITS
{
/* Check the CMSIS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == __NVIC_PRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the CMSIS
* __NVIC_PRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= __NVIC_PRIO_BITS );
}
#endif
#ifdef configPRIO_BITS
{
/* Check the FreeRTOS configuration that defines the number of
* priority bits matches the number of priority bits actually queried
* from the hardware. */
configASSERT( ulImplementedPrioBits == configPRIO_BITS );
/*
* Check that the number of implemented priority bits queried from
* hardware is at least as many as specified in the FreeRTOS
* configPRIO_BITS configuration macro.
*/
configASSERT( ulImplementedPrioBits >= configPRIO_BITS );
}
#endif