From f07f3c51110e8a0f717d544e75132b688a4e9d4d Mon Sep 17 00:00:00 2001 From: kar-rahul-aws Date: Wed, 2 Aug 2023 17:55:47 +0530 Subject: [PATCH 1/3] Update MPU wrapper for pcTaskGetName --- include/mpu_prototypes.h | 2 +- include/mpu_wrappers.h | 2 +- .../GCC/ARM_CM23/mpu_wrappers_v2_asm.c | 29 -------- .../GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c | 29 -------- .../GCC/ARM_CM33/mpu_wrappers_v2_asm.c | 28 -------- .../GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c | 28 -------- .../IAR/ARM_CM23/mpu_wrappers_v2_asm.S | 22 ------ .../IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S | 22 ------ .../IAR/ARM_CM33/mpu_wrappers_v2_asm.S | 21 ------ .../IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S | 21 ------ portable/Common/mpu_wrappers_v2.c | 70 +++++++++---------- .../ARM_CM23/non_secure/mpu_wrappers_v2_asm.c | 29 -------- .../non_secure/mpu_wrappers_v2_asm.c | 29 -------- .../ARM_CM33/non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c | 28 -------- .../GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c | 28 -------- .../ARM_CM55/non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../ARM_CM85/non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../non_secure/mpu_wrappers_v2_asm.c | 28 -------- .../ARM_CM23/non_secure/mpu_wrappers_v2_asm.S | 22 ------ .../non_secure/mpu_wrappers_v2_asm.S | 22 ------ .../ARM_CM33/non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S | 21 ------ .../ARM_CM55/non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../ARM_CM85/non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../non_secure/mpu_wrappers_v2_asm.S | 21 ------ .../RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c | 23 ------ 35 files changed, 36 insertions(+), 832 deletions(-) diff --git a/include/mpu_prototypes.h b/include/mpu_prototypes.h index 2b6b6cb82f8..239e640bd7e 100644 --- a/include/mpu_prototypes.h +++ b/include/mpu_prototypes.h @@ -53,7 +53,6 @@ void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend ) FREERTOS_SYSTEM_CALL; void MPU_vTaskResume( TaskHandle_t xTaskToResume ) FREERTOS_SYSTEM_CALL; TickType_t MPU_xTaskGetTickCount( void ) FREERTOS_SYSTEM_CALL; UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) FREERTOS_SYSTEM_CALL; -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) FREERTOS_SYSTEM_CALL; UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; configSTACK_DEPTH_TYPE MPU_uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, @@ -118,6 +117,7 @@ void MPU_vTaskPrioritySet( TaskHandle_t xTask, TaskHandle_t MPU_xTaskGetHandle( const char * pcNameToQuery ) PRIVILEGED_FUNCTION; BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void * pvParameter ) PRIVILEGED_FUNCTION; +char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t * pxCreatedTask ) PRIVILEGED_FUNCTION; BaseType_t MPU_xTaskCreateRestrictedStatic( const TaskParameters_t * const pxTaskDefinition, diff --git a/include/mpu_wrappers.h b/include/mpu_wrappers.h index a0ebf6030a6..7770f239f89 100644 --- a/include/mpu_wrappers.h +++ b/include/mpu_wrappers.h @@ -57,7 +57,6 @@ #define vTaskResume MPU_vTaskResume #define xTaskGetTickCount MPU_xTaskGetTickCount #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks - #define pcTaskGetName MPU_pcTaskGetName #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark #define uxTaskGetStackHighWaterMark2 MPU_uxTaskGetStackHighWaterMark2 #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag @@ -92,6 +91,7 @@ #define vTaskPrioritySet MPU_vTaskPrioritySet #define xTaskGetHandle MPU_xTaskGetHandle #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook + #define pcTaskGetName MPU_pcTaskGetName #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) #define xTaskCreateRestricted MPU_xTaskCreateRestricted diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c index 795f2195c22..f6fb0e77812 100644 --- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c +++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c @@ -407,35 +407,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0, r1} \n" - " mrs r0, control \n" - " movs r1, #1 \n" - " tst r0, r1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0, r1} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0, r1} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c index 795f2195c22..f6fb0e77812 100644 --- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c +++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c @@ -407,35 +407,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0, r1} \n" - " mrs r0, control \n" - " movs r1, #1 \n" - " tst r0, r1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0, r1} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0, r1} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c +++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c +++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/mpu_wrappers_v2_asm.S b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/mpu_wrappers_v2_asm.S index f2098b57da5..5300a99ec90 100644 --- a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/mpu_wrappers_v2_asm.S +++ b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/mpu_wrappers_v2_asm.S @@ -243,24 +243,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0, r1} - mrs r0, control - movs r1, #1 - tst r0, r1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0, r1} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0, r1} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0, r1} @@ -1370,10 +1352,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S index f2098b57da5..5300a99ec90 100644 --- a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S +++ b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S @@ -243,24 +243,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0, r1} - mrs r0, control - movs r1, #1 - tst r0, r1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0, r1} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0, r1} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0, r1} @@ -1370,10 +1352,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/mpu_wrappers_v2_asm.S b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/mpu_wrappers_v2_asm.S +++ b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S +++ b/portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/Common/mpu_wrappers_v2.c b/portable/Common/mpu_wrappers_v2.c index 91a2e7055f5..b2851637eea 100644 --- a/portable/Common/mpu_wrappers_v2.c +++ b/portable/Common/mpu_wrappers_v2.c @@ -91,16 +91,16 @@ /** * @brief Checks whether an external index is valid or not. */ - #define IS_EXTERNAL_INDEX_VALID( lIndex ) \ - ( ( ( lIndex ) >= INDEX_OFFSET ) && \ - ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE + INDEX_OFFSET ) ) ) + #define IS_EXTERNAL_INDEX_VALID( lIndex ) \ + ( ( ( lIndex ) >= INDEX_OFFSET ) && \ + ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE + INDEX_OFFSET ) ) ) /** * @brief Checks whether an internal index is valid or not. */ #define IS_INTERNAL_INDEX_VALID( lIndex ) \ - ( ( ( lIndex ) >= 0 ) && \ - ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE ) ) ) + ( ( ( lIndex ) >= 0 ) && \ + ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE ) ) ) /** * @brief Converts an internal index into external. @@ -646,37 +646,6 @@ } /*-----------------------------------------------------------*/ - char * MPU_pcTaskGetNameImpl( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; - - char * MPU_pcTaskGetNameImpl( TaskHandle_t xTaskToQuery ) /* PRIVILEGED_FUNCTION */ - { - char * pcReturn = NULL; - int32_t lIndex; - TaskHandle_t xInternalTaskHandle = NULL; - - if( xTaskToQuery == NULL ) - { - pcReturn = pcTaskGetName( xTaskToQuery ); - } - else - { - lIndex = ( int32_t ) xTaskToQuery; - - if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE ) - { - xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) ); - - if( xInternalTaskHandle != NULL ) - { - pcReturn = pcTaskGetName( xInternalTaskHandle ); - } - } - } - - return pcReturn; - } -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounterImpl( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION; @@ -1646,6 +1615,35 @@ #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ /*-----------------------------------------------------------*/ + char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* PRIVILEGED_FUNCTION */ + { + char * pcReturn = NULL; + int32_t lIndex; + TaskHandle_t xInternalTaskHandle = NULL; + + if( xTaskToQuery == NULL ) + { + pcReturn = pcTaskGetName( xTaskToQuery ); + } + else + { + lIndex = ( int32_t ) xTaskToQuery; + + if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE ) + { + xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) ); + + if( xInternalTaskHandle != NULL ) + { + pcReturn = pcTaskGetName( xInternalTaskHandle ); + } + } + } + + return pcReturn; + } +/*-----------------------------------------------------------*/ + #if ( INCLUDE_uxTaskPriorityGet == 1 ) UBaseType_t MPU_uxTaskPriorityGetFromISR( const TaskHandle_t xTask ) /* PRIVILEGED_FUNCTION */ diff --git a/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c index 795f2195c22..f6fb0e77812 100644 --- a/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c @@ -407,35 +407,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0, r1} \n" - " mrs r0, control \n" - " movs r1, #1 \n" - " tst r0, r1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0, r1} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0, r1} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c index 795f2195c22..f6fb0e77812 100644 --- a/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c @@ -407,35 +407,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0, r1} \n" - " mrs r0, control \n" - " movs r1, #1 \n" - " tst r0, r1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0, r1} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0, r1} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c index d9aa1a3fd38..76c6029af48 100644 --- a/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c index d9aa1a3fd38..76c6029af48 100644 --- a/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c index 9e1b9ed8587..2d1218a95b4 100644 --- a/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c +++ b/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c @@ -396,34 +396,6 @@ UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREE } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; - -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ -{ - __asm volatile - ( - " .syntax unified \n" - " .extern MPU_pcTaskGetNameImpl \n" - " \n" - " push {r0} \n" - " mrs r0, control \n" - " tst r0, #1 \n" - " bne MPU_pcTaskGetName_Unpriv \n" - " MPU_pcTaskGetName_Priv: \n" - " pop {r0} \n" - " b MPU_pcTaskGetNameImpl \n" - " MPU_pcTaskGetName_Unpriv: \n" - " pop {r0} \n" - " svc %0 \n" - " bl MPU_pcTaskGetNameImpl \n" - " svc %1 \n" - " bx lr \n" - " \n" - : : "i" ( portSVC_SYSTEM_CALL_ENTER ), "i" ( portSVC_SYSTEM_CALL_EXIT ) : "memory" - ); -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__ (( naked )) FREERTOS_SYSTEM_CALL; diff --git a/portable/IAR/ARM_CM23/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM23/non_secure/mpu_wrappers_v2_asm.S index f2098b57da5..5300a99ec90 100644 --- a/portable/IAR/ARM_CM23/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM23/non_secure/mpu_wrappers_v2_asm.S @@ -243,24 +243,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0, r1} - mrs r0, control - movs r1, #1 - tst r0, r1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0, r1} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0, r1} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0, r1} @@ -1370,10 +1352,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S index f2098b57da5..5300a99ec90 100644 --- a/portable/IAR/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S @@ -243,24 +243,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0, r1} - mrs r0, control - movs r1, #1 - tst r0, r1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0, r1} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0, r1} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0, r1} @@ -1370,10 +1352,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM33/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM33/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM33/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM33/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S index f18d7410e74..8d88af63027 100644 --- a/portable/IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S @@ -236,23 +236,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1303,10 +1286,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM55/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM55/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM55/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM55/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM85/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM85/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM85/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM85/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S b/portable/IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S index 9cb9a9d725e..1005dad3360 100644 --- a/portable/IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S +++ b/portable/IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S @@ -232,23 +232,6 @@ MPU_uxTaskGetNumberOfTasks: bx lr /*-----------------------------------------------------------*/ - PUBLIC MPU_pcTaskGetName -MPU_pcTaskGetName: - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv - MPU_pcTaskGetName_Priv: - pop {r0} - b MPU_pcTaskGetNameImpl - MPU_pcTaskGetName_Unpriv: - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -/*-----------------------------------------------------------*/ - PUBLIC MPU_ulTaskGetRunTimeCounter MPU_ulTaskGetRunTimeCounter: push {r0} @@ -1299,10 +1282,6 @@ MPU_xTaskGetTickCountImpl: MPU_uxTaskGetNumberOfTasksImpl: b MPU_uxTaskGetNumberOfTasksImpl - PUBWEAK MPU_pcTaskGetNameImpl -MPU_pcTaskGetNameImpl: - b MPU_pcTaskGetNameImpl - PUBWEAK MPU_ulTaskGetRunTimeCounterImpl MPU_ulTaskGetRunTimeCounterImpl: b MPU_ulTaskGetRunTimeCounterImpl diff --git a/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c b/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c index 0de1b53bf4a..e9d0d34a0c3 100644 --- a/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c +++ b/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c @@ -341,29 +341,6 @@ MPU_uxTaskGetNumberOfTasks_Unpriv } /*-----------------------------------------------------------*/ -char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) FREERTOS_SYSTEM_CALL; - -__asm char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* FREERTOS_SYSTEM_CALL */ -{ - PRESERVE8 - extern MPU_pcTaskGetNameImpl - - push {r0} - mrs r0, control - tst r0, #1 - bne MPU_pcTaskGetName_Unpriv -MPU_pcTaskGetName_Priv - pop {r0} - b MPU_pcTaskGetNameImpl -MPU_pcTaskGetName_Unpriv - pop {r0} - svc #portSVC_SYSTEM_CALL_ENTER - bl MPU_pcTaskGetNameImpl - svc #portSVC_SYSTEM_CALL_EXIT - bx lr -} -/*-----------------------------------------------------------*/ - #if ( configGENERATE_RUN_TIME_STATS == 1 ) configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; From 0b8a042582e001d6e102cddb876aad58c20ad319 Mon Sep 17 00:00:00 2001 From: kar-rahul-aws Date: Wed, 2 Aug 2023 18:13:20 +0530 Subject: [PATCH 2/3] Fix Formatting --- portable/Common/mpu_wrappers_v2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/portable/Common/mpu_wrappers_v2.c b/portable/Common/mpu_wrappers_v2.c index b2851637eea..3cebd56c7f6 100644 --- a/portable/Common/mpu_wrappers_v2.c +++ b/portable/Common/mpu_wrappers_v2.c @@ -91,16 +91,16 @@ /** * @brief Checks whether an external index is valid or not. */ - #define IS_EXTERNAL_INDEX_VALID( lIndex ) \ - ( ( ( lIndex ) >= INDEX_OFFSET ) && \ - ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE + INDEX_OFFSET ) ) ) + #define IS_EXTERNAL_INDEX_VALID( lIndex ) \ + ( ( ( lIndex ) >= INDEX_OFFSET ) && \ + ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE + INDEX_OFFSET ) ) ) /** * @brief Checks whether an internal index is valid or not. */ #define IS_INTERNAL_INDEX_VALID( lIndex ) \ - ( ( ( lIndex ) >= 0 ) && \ - ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE ) ) ) + ( ( ( lIndex ) >= 0 ) && \ + ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE ) ) ) /** * @brief Converts an internal index into external. From b5ac4715583fbaf67d97c3f71474ce99906b7e15 Mon Sep 17 00:00:00 2001 From: kar-rahul-aws Date: Thu, 3 Aug 2023 22:22:17 +0530 Subject: [PATCH 3/3] Fix mpu wrappers V1 --- include/mpu_wrappers.h | 2 +- portable/Common/mpu_wrappers.c | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/include/mpu_wrappers.h b/include/mpu_wrappers.h index 7770f239f89..9d1d867e2c9 100644 --- a/include/mpu_wrappers.h +++ b/include/mpu_wrappers.h @@ -91,9 +91,9 @@ #define vTaskPrioritySet MPU_vTaskPrioritySet #define xTaskGetHandle MPU_xTaskGetHandle #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook - #define pcTaskGetName MPU_pcTaskGetName #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) + #define pcTaskGetName MPU_pcTaskGetName #define xTaskCreateRestricted MPU_xTaskCreateRestricted #define xTaskCreateRestrictedStatic MPU_xTaskCreateRestrictedStatic #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions diff --git a/portable/Common/mpu_wrappers.c b/portable/Common/mpu_wrappers.c index e877dcea9a5..a0d7ee0aa09 100644 --- a/portable/Common/mpu_wrappers.c +++ b/portable/Common/mpu_wrappers.c @@ -477,30 +477,6 @@ } /*-----------------------------------------------------------*/ - char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) /* FREERTOS_SYSTEM_CALL */ - { - char * pcReturn; - - if( portIS_PRIVILEGED() == pdFALSE ) - { - portRAISE_PRIVILEGE(); - portMEMORY_BARRIER(); - - pcReturn = pcTaskGetName( xTaskToQuery ); - portMEMORY_BARRIER(); - - portRESET_PRIVILEGE(); - portMEMORY_BARRIER(); - } - else - { - pcReturn = pcTaskGetName( xTaskToQuery ); - } - - return pcReturn; - } -/*-----------------------------------------------------------*/ - #if ( INCLUDE_xTaskGetHandle == 1 ) TaskHandle_t MPU_xTaskGetHandle( const char * pcNameToQuery ) /* FREERTOS_SYSTEM_CALL */ {