]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/RISC-V/portASM.S
Update version number in readiness for V10.3.0 release. Sync SVN with reviewed releas...
[freertos] / FreeRTOS / Source / portable / GCC / RISC-V / portASM.S
index a28942a09fa6775496236b9d8630cdd2c9aa72eb..fb9825bd626d9c5b28b4b3785d32a26f50ff4577 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * FreeRTOS Kernel V10.2.1\r
- * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ * FreeRTOS Kernel V10.3.0\r
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
  * this software and associated documentation files (the "Software"), to deal in\r
 \r
 /* Check the freertos_risc_v_chip_specific_extensions.h and/or command line\r
 definitions. */\r
-#ifndef portasmHAS_CLINT\r
-       #error freertos_risc_v_chip_specific_extensions.h must define portasmHAS_CLINT to either 1 (CLINT present) or 0 (clint not present).\r
+#if defined( portasmHAS_CLINT ) && defined( portasmHAS_MTIME )\r
+       #error The portasmHAS_CLINT constant has been deprecated.  Please replace it with portasmHAS_MTIME.  portasmHAS_CLINT and portasmHAS_MTIME cannot both be defined at once.  See https://www.freertos.org/Using-FreeRTOS-on-RISC-V.html\r
+#endif\r
+\r
+#ifdef portasmHAS_CLINT\r
+       #warning The portasmHAS_CLINT constant has been deprecated.  Please replace it with portasmHAS_MTIME and portasmHAS_SIFIVE_CLINT.  For now portasmHAS_MTIME and portasmHAS_SIFIVE_CLINT are derived from portasmHAS_CLINT.  See https://www.freertos.org/Using-FreeRTOS-on-RISC-V.html\r
+       #define portasmHAS_MTIME portasmHAS_CLINT\r
+       #define portasmHAS_SIFIVE_CLINT portasmHAS_CLINT\r
+#endif\r
+\r
+#ifndef portasmHAS_MTIME\r
+       #error freertos_risc_v_chip_specific_extensions.h must define portasmHAS_MTIME to either 1 (MTIME clock present) or 0 (MTIME clock not present).  See https://www.freertos.org/Using-FreeRTOS-on-RISC-V.html\r
 #endif\r
 \r
 #ifndef portasmHANDLE_INTERRUPT\r
-       #error portasmHANDLE_INTERRUPT must be defined to the function to be called to handle external/peripheral interrupts.  portasmHANDLE_INTERRUPT can be defined on the assmbler command line or in the appropriate freertos_risc_v_chip_specific_extensions.h header file.\r
+       #error portasmHANDLE_INTERRUPT must be defined to the function to be called to handle external/peripheral interrupts.  portasmHANDLE_INTERRUPT can be defined on the assembler command line or in the appropriate freertos_risc_v_chip_specific_extensions.h header file.  https://www.freertos.org/Using-FreeRTOS-on-RISC-V.html\r
+#endif\r
+\r
+#ifndef portasmHAS_SIFIVE_CLINT\r
+       #define portasmHAS_SIFIVE_CLINT 0\r
 #endif\r
 \r
 /* Only the standard core registers are stored by default.  Any additional\r
@@ -153,7 +167,7 @@ test_if_asynchronous:
 \r
 handle_asynchronous:\r
 \r
-#if( portasmHAS_CLINT != 0 )\r
+#if( portasmHAS_MTIME != 0 )\r
 \r
        test_if_mtimer:                                         /* If there is a CLINT then the mtimer is used to generate the tick interrupt. */\r
 \r
@@ -205,7 +219,7 @@ handle_asynchronous:
                addi t1, t1, 4                                  /* 0x80000007 + 4 = 0x8000000b == Machine external interrupt. */\r
                bne a0, t1, as_yet_unhandled    /* Something as yet unhandled. */\r
 \r
-#endif /* portasmHAS_CLINT */\r
+#endif /* portasmHAS_MTIME */\r
 \r
        load_x sp, xISRStackTop                         /* Switch to ISR stack before function call. */\r
        jal portasmHANDLE_INTERRUPT                     /* Jump to the interrupt handler if there is no CLINT or if there is a CLINT and it has been determined that an external interrupt is pending. */\r
@@ -284,7 +298,7 @@ processed_source:
 .func\r
 xPortStartFirstTask:\r
 \r
-#if( portasmHAS_CLINT != 0 )\r
+#if( portasmHAS_SIFIVE_CLINT != 0 )\r
        /* If there is a clint then interrupts can branch directly to the FreeRTOS\r
        trap handler.  Otherwise the interrupt controller will need to be configured\r
        outside of this file. */\r