From 9edd7e905cb8f73678ac2277f44b801a9431c81d Mon Sep 17 00:00:00 2001 From: rtel Date: Wed, 9 Aug 2017 16:57:35 +0000 Subject: [PATCH] Update TriCore port to work with latest GCC compiler. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2516 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/portable/GCC/TriCore_1782/port.c | 14 +++++++------- .../Source/portable/GCC/TriCore_1782/portmacro.h | 6 +++--- .../Source/portable/GCC/TriCore_1782/porttrap.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c index 33b2b7e64..80fd58add 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c @@ -167,7 +167,7 @@ uint32_t *pulLowerCSA = NULL; _dsync(); /* Consume two free CSAs. */ - pulLowerCSA = portCSA_TO_ADDRESS( _mfcr( $FCX ) ); + pulLowerCSA = portCSA_TO_ADDRESS( __MFCR( $FCX ) ); if( NULL != pulLowerCSA ) { /* The Lower Links to the Upper. */ @@ -261,7 +261,7 @@ uint32_t *pulLowerCSA = NULL; /* Clear the PSW.CDC to enable the use of an RFE without it generating an exception because this code is not genuinely in an exception. */ - ulMFCR = _mfcr( $PSW ); + ulMFCR = __MFCR( $PSW ); ulMFCR &= portRESTORE_PSW_MASK; _dsync(); _mtcr( $PSW, ulMFCR ); @@ -388,7 +388,7 @@ int32_t lYieldRequired; enabled/disabled. */ _disable(); _dsync(); - xUpperCSA = _mfcr( $PCXI ); + xUpperCSA = __MFCR( $PCXI ); pxUpperCSA = portCSA_TO_ADDRESS( xUpperCSA ); *pxCurrentTCB = pxUpperCSA[ 0 ]; vTaskSwitchContext(); @@ -458,7 +458,7 @@ uint32_t *pulNextCSA; { /* Look up the current free CSA head. */ _dsync(); - pxFreeCSA = _mfcr( $FCX ); + pxFreeCSA = __MFCR( $FCX ); /* Join the current Free onto the Tail of what is being reclaimed. */ portCSA_TO_ADDRESS( pxTailCSA )[ 0 ] = pxFreeCSA; @@ -508,7 +508,7 @@ extern volatile uint32_t *pxCurrentTCB; enabled/disabled. */ _disable(); _dsync(); - xUpperCSA = _mfcr( $PCXI ); + xUpperCSA = __MFCR( $PCXI ); pxUpperCSA = portCSA_TO_ADDRESS( xUpperCSA ); *pxCurrentTCB = pxUpperCSA[ 0 ]; vTaskSwitchContext(); @@ -555,7 +555,7 @@ extern volatile uint32_t *pxCurrentTCB; enabled/disabled. */ _disable(); _dsync(); - xUpperCSA = _mfcr( $PCXI ); + xUpperCSA = __MFCR( $PCXI ); pxUpperCSA = portCSA_TO_ADDRESS( xUpperCSA ); *pxCurrentTCB = pxUpperCSA[ 0 ]; vTaskSwitchContext(); @@ -570,7 +570,7 @@ uint32_t uxPortSetInterruptMaskFromISR( void ) uint32_t uxReturn = 0UL; _disable(); - uxReturn = _mfcr( $ICR ); + uxReturn = __MFCR( $ICR ); _mtcr( $ICR, ( ( uxReturn & ~portCCPN_MASK ) | configMAX_SYSCALL_INTERRUPT_PRIORITY ) ); _isync(); _enable(); diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h index 90119f3fb..f4c3f607e 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h @@ -155,7 +155,7 @@ extern void vTaskExitCritical( void ); #define portDISABLE_INTERRUPTS() { \ uint32_t ulICR; \ _disable(); \ - ulICR = _mfcr( $ICR ); /* Get current ICR value. */ \ + ulICR = __MFCR( $ICR ); /* Get current ICR value. */ \ ulICR &= ~portCCPN_MASK; /* Clear down mask bits. */ \ ulICR |= configMAX_SYSCALL_INTERRUPT_PRIORITY; /* Set mask bits to required priority mask. */ \ _mtcr( $ICR, ulICR ); /* Write back updated ICR. */ \ @@ -167,7 +167,7 @@ extern void vTaskExitCritical( void ); #define portENABLE_INTERRUPTS() { \ uint32_t ulICR; \ _disable(); \ - ulICR = _mfcr( $ICR ); /* Get current ICR value. */ \ + ulICR = __MFCR( $ICR ); /* Get current ICR value. */ \ ulICR &= ~portCCPN_MASK; /* Clear down mask bits. */ \ _mtcr( $ICR, ulICR ); /* Write back updated ICR. */ \ _isync(); \ @@ -178,7 +178,7 @@ extern void vTaskExitCritical( void ); #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedMaskValue ) { \ uint32_t ulICR; \ _disable(); \ - ulICR = _mfcr( $ICR ); /* Get current ICR value. */ \ + ulICR = __MFCR( $ICR ); /* Get current ICR value. */ \ ulICR &= ~portCCPN_MASK; /* Clear down mask bits. */ \ ulICR |= uxSavedMaskValue; /* Set mask bits to previously saved mask value. */ \ _mtcr( $ICR, ulICR ); /* Write back updated ICR. */ \ diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c index 10a335351..830d2d40b 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c @@ -234,7 +234,7 @@ void vInternalProtectionTrap( int iTrapIdentification ) default: - pxCurrentTCB[ 0 ] = _mfcr( $PCXI ); + pxCurrentTCB[ 0 ] = __MFCR( $PCXI ); _debug(); break; } -- 2.39.5