typedef portUBASE_TYPE UBaseType_t;\r
typedef portUBASE_TYPE TickType_t;\r
\r
+/* Legacy type definitions. */\r
+#define portCHAR char\r
+#define portFLOAT float\r
+#define portDOUBLE double\r
+#define portLONG long\r
+#define portSHORT short\r
+\r
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
not need to be guarded with a critical section. */\r
#define portTICK_TYPE_IS_ATOMIC 1\r
#error This is the RV32 port that has not yet been adapted for 64.\r
#define portBYTE_ALIGNMENT 16\r
#else\r
- #define portBYTE_ALIGNMENT 8\r
+ #define portBYTE_ALIGNMENT 16\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#endif\r
\r
#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )\r
+/*-----------------------------------------------------------*/\r
+\r
+\r
+/* configCLINT_BASE_ADDRESS is a legacy definition that was replaced by the\r
+configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRESS definitions. For\r
+backward compatibility derive the newer definitions from the old if the old\r
+definition is found. */\r
+#if defined( configCLINT_BASE_ADDRESS ) && !defined( configMTIME_BASE_ADDRESS ) && ( configCLINT_BASE_ADDRESS == 0 )\r
+ /* Legacy case where configCLINT_BASE_ADDRESS was defined as 0 to indicate\r
+ there was no CLINT. Equivalent now is to set the MTIME and MTIMECMP\r
+ addresses to 0. */\r
+ #define configMTIME_BASE_ADDRESS ( 0 )\r
+ #define configMTIMECMP_BASE_ADDRESS ( 0 )\r
+#elif defined( configCLINT_BASE_ADDRESS ) && !defined( configMTIME_BASE_ADDRESS )\r
+ /* Legacy case where configCLINT_BASE_ADDRESS was set to the base address of\r
+ the CLINT. Equivalent now is to derive the MTIME and MTIMECMP addresses\r
+ from the CLINT address. */\r
+ #define configMTIME_BASE_ADDRESS ( ( configCLINT_BASE_ADDRESS ) + 0xBFF8UL )\r
+ #define configMTIMECMP_BASE_ADDRESS ( ( configCLINT_BASE_ADDRESS ) + 0x4000UL )\r
+#elif !defined( configMTIME_BASE_ADDRESS ) || !defined( configMTIMECMP_BASE_ADDRESS )\r
+ #error configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRESS must be defined in FreeRTOSConfig.h. Set them to zero if there is no MTIME (machine time) clock. See https://www.freertos.org/Using-FreeRTOS-on-RISC-V.html\r
+#endif\r
+\r
+\r
\r
#ifdef __cplusplus\r
}\r