#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 )\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. See https://www.freertos.org/Using-FreeRTOS-on-RISC-V.html\r
+#endif\r
+\r
+\r
\r
#ifdef __cplusplus\r
}\r