X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FGCC%2FRISC-V%2Fportmacro.h;h=8e185d6f68e13c30254dac7be85e8118b18c4151;hb=e1bec754ec5a7501af5dd1de2a8c325d418680d6;hp=c43cd92e17ae501678a05e8d7cf411885b410485;hpb=87c1213e45a8d47f4c8023bc302808c3d34c925b;p=freertos diff --git a/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h b/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h index c43cd92e1..8e185d6f6 100644 --- a/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h @@ -1,5 +1,5 @@ /* - * FreeRTOS Kernel V10.2.0 + * FreeRTOS Kernel V10.2.1 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -45,10 +45,11 @@ extern "C" { /* Type definitions. */ #if __riscv_xlen == 64 - #define portSTACK_TYPE uint64_t - #define portBASE_TYPE int64_t - #define portUBASE_TYPE uint64_t - #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffUL + #define portSTACK_TYPE uint64_t + #define portBASE_TYPE int64_t + #define portUBASE_TYPE uint64_t + #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffUL + #define portPOINTER_SIZE_TYPE uint64_t #elif __riscv_xlen == 32 #define portSTACK_TYPE uint32_t #define portBASE_TYPE int32_t @@ -64,6 +65,13 @@ typedef portBASE_TYPE BaseType_t; typedef portUBASE_TYPE UBaseType_t; typedef portUBASE_TYPE TickType_t; +/* Legacy type definitions. */ +#define portCHAR char +#define portFLOAT float +#define portDOUBLE double +#define portLONG long +#define portSHORT short + /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do not need to be guarded with a critical section. */ #define portTICK_TYPE_IS_ATOMIC 1 @@ -76,7 +84,7 @@ not need to be guarded with a critical section. */ #error This is the RV32 port that has not yet been adapted for 64. #define portBYTE_ALIGNMENT 16 #else - #define portBYTE_ALIGNMENT 8 + #define portBYTE_ALIGNMENT 16 #endif /*-----------------------------------------------------------*/ @@ -144,6 +152,8 @@ not necessary for to use this port. They are defined so the common demo files #define portFORCE_INLINE inline __attribute__(( always_inline)) #endif +#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" ) + #ifdef __cplusplus } #endif