diff --git a/portable/GCC/RISC-V/port.c b/portable/GCC/RISC-V/port.c index 8fe7a25d5..44f6ab384 100644 --- a/portable/GCC/RISC-V/port.c +++ b/portable/GCC/RISC-V/port.c @@ -54,7 +54,7 @@ #ifdef configTASK_RETURN_ADDRESS #define portTASK_RETURN_ADDRESS configTASK_RETURN_ADDRESS #else - #define portTASK_RETURN_ADDRESS 0 + #define portTASK_RETURN_ADDRESS NULL #endif /* The stack used by interrupt service routines. Set configISR_STACK_SIZE_WORDS @@ -99,7 +99,7 @@ size_t xCriticalNesting = ( size_t ) 0xaaaaaaaa; size_t * pxCriticalNesting = &xCriticalNesting; /* Used to catch tasks that attempt to return from their implementing function. */ -size_t xTaskReturnAddress = ( size_t ) portTASK_RETURN_ADDRESS; +ReturnFunctionType_t xTaskReturnAddress = ( ReturnFunctionType_t ) portTASK_RETURN_ADDRESS; /* Set configCHECK_FOR_STACK_OVERFLOW to 3 to add ISR stack checking to task * stack checking. A problem in the ISR stack will trigger an assert, not call diff --git a/portable/GCC/RISC-V/portmacro.h b/portable/GCC/RISC-V/portmacro.h index f7d2f3ef1..eaa7a99a9 100644 --- a/portable/GCC/RISC-V/portmacro.h +++ b/portable/GCC/RISC-V/portmacro.h @@ -66,6 +66,7 @@ typedef portSTACK_TYPE StackType_t; typedef portBASE_TYPE BaseType_t; typedef portUBASE_TYPE UBaseType_t; typedef portUBASE_TYPE TickType_t; +typedef void (*ReturnFunctionType_t)( void ); /* Legacy type definitions. */ #define portCHAR char