Update TriCore port to work with latest GCC compiler.
diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c
index 33b2b7e..80fd58a 100644
--- a/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c
+++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c
@@ -167,7 +167,7 @@
_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 @@
/* 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 @@
enabled/disabled. */
_disable();
_dsync();
- xUpperCSA = _mfcr( $PCXI );
+ xUpperCSA = __MFCR( $PCXI );
pxUpperCSA = portCSA_TO_ADDRESS( xUpperCSA );
*pxCurrentTCB = pxUpperCSA[ 0 ];
vTaskSwitchContext();
@@ -458,7 +458,7 @@
{
/* 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 @@
enabled/disabled. */
_disable();
_dsync();
- xUpperCSA = _mfcr( $PCXI );
+ xUpperCSA = __MFCR( $PCXI );
pxUpperCSA = portCSA_TO_ADDRESS( xUpperCSA );
*pxCurrentTCB = pxUpperCSA[ 0 ];
vTaskSwitchContext();
@@ -555,7 +555,7 @@
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 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 90119f3..f4c3f60 100644
--- a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h
+++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h
@@ -155,7 +155,7 @@
#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 @@
#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 @@
#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 10a3353..830d2d4 100644
--- a/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c
+++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/porttrap.c
@@ -234,7 +234,7 @@
default:
- pxCurrentTCB[ 0 ] = _mfcr( $PCXI );
+ pxCurrentTCB[ 0 ] = __MFCR( $PCXI );
_debug();
break;
}