From 129b09fb1da6fac94c0472e9934299c9d76b0ee8 Mon Sep 17 00:00:00 2001 From: cui Date: Sat, 4 Apr 2026 06:49:47 +0800 Subject: [PATCH] Correct RISC-V port #endif preprocessor comments (#1395) The comment after vPortSetupTimerInterrupt in GCC and IAR RISC-V port.c duplicated configMTIME_BASE_ADDRESS and omitted configMTIMECMP_BASE_ADDRESS. Align the comment with the matching #if condition. --- portable/GCC/RISC-V/port.c | 2 +- portable/IAR/RISC-V/port.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/portable/GCC/RISC-V/port.c b/portable/GCC/RISC-V/port.c index 8fe7a25d5..e0974d1d0 100644 --- a/portable/GCC/RISC-V/port.c +++ b/portable/GCC/RISC-V/port.c @@ -154,7 +154,7 @@ size_t xTaskReturnAddress = ( size_t ) portTASK_RETURN_ADDRESS; ullNextTime += ( uint64_t ) uxTimerIncrementsForOneTick; } -#endif /* ( configMTIME_BASE_ADDRESS != 0 ) && ( configMTIME_BASE_ADDRESS != 0 ) */ +#endif /* ( configMTIME_BASE_ADDRESS != 0 ) && ( configMTIMECMP_BASE_ADDRESS != 0 ) */ /*-----------------------------------------------------------*/ BaseType_t xPortStartScheduler( void ) diff --git a/portable/IAR/RISC-V/port.c b/portable/IAR/RISC-V/port.c index 820423ec5..ec11fc43b 100644 --- a/portable/IAR/RISC-V/port.c +++ b/portable/IAR/RISC-V/port.c @@ -187,7 +187,7 @@ static void prvTaskExitError( void ) ullNextTime += ( uint64_t ) uxTimerIncrementsForOneTick; } -#endif /* ( configMTIME_BASE_ADDRESS != 0 ) && ( configMTIME_BASE_ADDRESS != 0 ) */ +#endif /* ( configMTIME_BASE_ADDRESS != 0 ) && ( configMTIMECMP_BASE_ADDRESS != 0 ) */ /*-----------------------------------------------------------*/ BaseType_t xPortStartScheduler( void )