]> git.sur5r.net Git - freertos/commitdiff
Ensure eTaskGetState() is brought in automatically if INCLUDE_xTaskAbortDelay is...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 8 Feb 2019 01:18:08 +0000 (01:18 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 8 Feb 2019 01:18:08 +0000 (01:18 +0000)
Added the portTASK_FUNCTION_PROTO macros around the timer task, as the macros are already used by the idle task.
Add a PDF of the RISC-V documentation into the repo as the web page is not yet live.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2626 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml
FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/.settings/language.settings.xml
FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/blinky_demo/main_blinky.c
FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/projects/RTOSDemo_ri5cy/full_demo/main_full.c
FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/.settings/language.settings.xml
FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/full_demo/main_full.c
FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf [new file with mode: 0644]
FreeRTOS/Source/portable/GCC/RISC-V-RV32/port.c
FreeRTOS/Source/tasks.c
FreeRTOS/Source/timers.c

index 8ae7de9840d751b273e7f9cffe7ef66c50afbea1..7c565872e534febe93f1d9206b993b2e9ea770d2 100644 (file)
@@ -5,7 +5,7 @@
                        <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
                        <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
                        <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
-                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-838616105515603833" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
+                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-368533891008049209" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
                                <language-scope id="org.eclipse.cdt.core.gcc"/>\r
                                <language-scope id="org.eclipse.cdt.core.g++"/>\r
                        </provider>\r
@@ -16,7 +16,7 @@
                        <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
                        <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
                        <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
-                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-834701673310394435" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
+                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-364619458802839811" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
                                <language-scope id="org.eclipse.cdt.core.gcc"/>\r
                                <language-scope id="org.eclipse.cdt.core.g++"/>\r
                        </provider>\r
index de3b5289a3b2d7d7da3259dca77d1e7ffe72f4b8..ea282ff86968f68c5b363e8f5550a1234e963cf0 100644 (file)
@@ -5,7 +5,7 @@
                        <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
                        <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
                        <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
-                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1838490515881353792" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
+                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-636747711401044766" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
                                <language-scope id="org.eclipse.cdt.core.gcc"/>\r
                                <language-scope id="org.eclipse.cdt.core.g++"/>\r
                        </provider>\r
index 7688ed8c719ef87af8adbc696deefe2197ae7792..2c49c05db40c809e2cc5e8c8eb4350361c966d68 100644 (file)
@@ -121,7 +121,7 @@ void main_blinky( void )
                file. */\r
                xTaskCreate( prvQueueReceiveTask,                               /* The function that implements the task. */\r
                                        "Rx",                                                           /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
-                                       configMINIMAL_STACK_SIZE * 2U,                  /* The size of the stack to allocate to the task. */\r
+                                       configMINIMAL_STACK_SIZE * 2U,          /* The size of the stack to allocate to the task. */\r
                                        NULL,                                                           /* The parameter passed to the task - not used in this case. */\r
                                        mainQUEUE_RECEIVE_TASK_PRIORITY,        /* The priority assigned to the task. */\r
                                        NULL );                                                         /* The task handle is not required, so NULL is passed. */\r
index cb6ebb1cafbc894576d02f2f2a171070a77b6020..9e68df4f226fb334b58ca943857beddf8a4c7f1a 100644 (file)
@@ -150,13 +150,6 @@ void vFullDemoTickHook( void );
 \r
 /*-----------------------------------------------------------*/\r
 \r
-/* Timers used to exercise external interrupt processing. */\r
-//static timer_instance_t g_timer0, g_timer1;\r
-\r
-/* Variables incremented by the peripheral timers used to exercise external\r
-interrupts. */\r
-volatile uint32_t ulTimer0Interrupts = 0, ulTimer1Interrupts = 0;\r
-\r
 /* The following two variables are used to communicate the status of the\r
 register check tasks to the check task.  If the variables keep incrementing,\r
 then the register check tasks have not discovered any errors.  If a variable\r
@@ -224,7 +217,6 @@ static void prvCheckTask( void *pvParameters )
 TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
 TickType_t xLastExecutionTime;\r
 uint32_t ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
-uint32_t ulLastTimer0Interrupts = 0, ulLastTimer1Interrupts = 0;\r
 char * const pcPassMessage = ".";\r
 char * pcStatusMessage = pcPassMessage;\r
 extern void vSendString( const char * const pcString );\r
@@ -259,17 +251,17 @@ extern void vToggleLED( void );
                        pcStatusMessage = "ERROR: Dynamic priority demo/tests.\r\n";\r
                }\r
 \r
-               if ( xAreBlockTimeTestTasksStillRunning() == pdFALSE )\r
+               if( xAreBlockTimeTestTasksStillRunning() == pdFALSE )\r
                {\r
                        pcStatusMessage = "ERROR: Block time demo/tests.\r\n";\r
                }\r
 \r
-               if ( xAreGenericQueueTasksStillRunning() == pdFALSE )\r
+               if( xAreGenericQueueTasksStillRunning() == pdFALSE )\r
                {\r
                        pcStatusMessage = "ERROR: Generic queue demo/tests.\r\n";\r
                }\r
 \r
-               if ( xAreRecursiveMutexTasksStillRunning() == pdFALSE )\r
+               if( xAreRecursiveMutexTasksStillRunning() == pdFALSE )\r
                {\r
                        pcStatusMessage = "ERROR: Recursive mutex demo/tests.\r\n";\r
                }\r
@@ -333,19 +325,6 @@ extern void vToggleLED( void );
                }\r
                ulLastRegTest2Value = ulRegTest2LoopCounter;\r
 \r
-               /* Check interrupts from the peripheral timers are being handled. */\r
-               if( ulLastTimer0Interrupts == ulTimer0Interrupts )\r
-               {\r
-//                     pcStatusMessage = "ERROR: Peripheral timer 0.\r\n";\r
-               }\r
-               ulLastTimer0Interrupts = ulTimer0Interrupts;\r
-\r
-               if( ulLastTimer1Interrupts == ulTimer1Interrupts )\r
-               {\r
-//                     pcStatusMessage = "ERROR: Peripheral timer 1.\r\n";\r
-               }\r
-               ulLastTimer1Interrupts = ulTimer1Interrupts;\r
-\r
                /* Write the status message to the UART. */\r
                vToggleLED();\r
                vSendString( pcStatusMessage );\r
@@ -426,17 +405,3 @@ static void prvSetupPeripheralTimers( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-/*Core Timer 0 Interrupt Handler*/\r
-uint8_t External_30_IRQHandler( void )\r
-{\r
-       ulTimer0Interrupts++;\r
-       return 0;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-/*Core Timer 1 Interrupt Handler*/\r
-uint8_t External_31_IRQHandler( void )\r
-{\r
-       ulTimer1Interrupts++;\r
-       return 0;\r
-}\r
index eb590e9eaad353afa039c9d34c73b1771e481653..7f0bcb6f7489b5381f9872f516b151a6c1e2f75d 100644 (file)
@@ -11,7 +11,7 @@
                                \r
             <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
                                \r
-            <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1808514278280795297" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
+            <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1054471101704245543" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
                                                \r
                 <language-scope id="org.eclipse.cdt.core.gcc"/>\r
                                                \r
index dc7d76863504d40f54c347cbed97b8b44ef48379..b9b9df43c173bf84ac2164fb3a3b9333615afa57 100644 (file)
@@ -261,17 +261,17 @@ extern void vToggleLED( void );
                        pcStatusMessage = "ERROR: Dynamic priority demo/tests.\r\n";\r
                }\r
 \r
-               if ( xAreBlockTimeTestTasksStillRunning() == pdFALSE )\r
+               if( xAreBlockTimeTestTasksStillRunning() == pdFALSE )\r
                {\r
                        pcStatusMessage = "ERROR: Block time demo/tests.\r\n";\r
                }\r
 \r
-               if ( xAreGenericQueueTasksStillRunning() == pdFALSE )\r
+               if( xAreGenericQueueTasksStillRunning() == pdFALSE )\r
                {\r
                        pcStatusMessage = "ERROR: Generic queue demo/tests.\r\n";\r
                }\r
 \r
-               if ( xAreRecursiveMutexTasksStillRunning() == pdFALSE )\r
+               if( xAreRecursiveMutexTasksStillRunning() == pdFALSE )\r
                {\r
                        pcStatusMessage = "ERROR: Recursive mutex demo/tests.\r\n";\r
                }\r
diff --git a/FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf b/FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf
new file mode 100644 (file)
index 0000000..7576907
Binary files /dev/null and b/FreeRTOS/Source/portable/GCC/RISC-V-RV32/FreeRTOS for RISC-V RV32.pdf differ
index 8793ee6fc54ad723b498d7137ddc1e2041f6513e..8e32f81be7efe4282616d3ed93400eb037d3a239 100644 (file)
@@ -35,7 +35,7 @@
 #include "portmacro.h"\r
 \r
 #ifndef configCLINT_BASE_ADDRESS\r
-       #warning configCLINT_BASE_ADDRESS must be defined in FreeRTOSConfig.h.  If the target chip includes a Core Local Interrupter (CLINT) then set configCLINT_BASE_ADDRESS to the CLINT's base address.  Otherwise set configCLINT_BASE_ADDRESS to 0.\r
+       #warning configCLINT_BASE_ADDRESS must be defined in FreeRTOSConfig.h.  If the target chip includes a Core Local Interrupter (CLINT) then set configCLINT_BASE_ADDRESS to the CLINT base address.  Otherwise set configCLINT_BASE_ADDRESS to 0.\r
 #endif\r
 \r
 /* Let the user override the pre-loading of the initial LR with the address of\r
index c8c5ef389545b36a8bce5d511f745cc56c4b6296..2842d9e7bdfde1005e76cbbbb2e8db6e1184ab96 100644 (file)
@@ -1352,7 +1352,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
 #endif /* INCLUDE_vTaskDelay */\r
 /*-----------------------------------------------------------*/\r
 \r
-#if( ( INCLUDE_eTaskGetState == 1 ) || ( configUSE_TRACE_FACILITY == 1 ) )\r
+#if( ( INCLUDE_eTaskGetState == 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_xTaskAbortDelay == 1 ) )\r
 \r
        eTaskState eTaskGetState( TaskHandle_t xTask )\r
        {\r
index 837fe3d14d1684faf3272dc268aa270a733ea530..3c0b4626727571f288d946a2ac07f1301f2ac156 100644 (file)
@@ -166,7 +166,7 @@ static void prvCheckForValidListAndQueue( void ) PRIVILEGED_FUNCTION;
  * task.  Other tasks communicate with the timer service task using the\r
  * xTimerQueue queue.\r
  */\r
-static void prvTimerTask( void *pvParameters ) PRIVILEGED_FUNCTION;\r
+static portTASK_FUNCTION_PROTO( prvTimerTask, pvParameters ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Called by the timer service task to interpret and process a command it\r
@@ -520,7 +520,7 @@ Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTi
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvTimerTask( void *pvParameters )\r
+static portTASK_FUNCTION( prvTimerTask, pvParameters )\r
 {\r
 TickType_t xNextExpireTime;\r
 BaseType_t xListWasEmpty;\r