<Type>0</Type>
<LineNumber>614</LineNumber>
<EnabledFlag>1</EnabledFlag>
- <Address>23132</Address>
+ <Address>23164</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<Group>
<GroupName>System</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<Group>
<GroupName>application_and_config</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<Group>
<GroupName>FreeRTOS_Source</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
/* For code coverage test purposes it is deleted by the Idle task. */\r
configASSERT( uxTaskGetStackHighWaterMark( NULL ) > 0 );\r
configASSERT( uxTaskGetStackHighWaterMark2( NULL ) > 0 );\r
+ /* Run time stats are not being gathered - this is just to exercise\r
+ API. */\r
+ configASSERT( xTaskGetIdleRunTimeCounter() == 0 ); \r
vTaskSuspend( NULL );\r
}\r
/*-----------------------------------------------------------*/\r
<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="1688908204914985791" 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 "${INPUTS}"" prefer-non-shared="true">\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 "${INPUTS}"" 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
<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="1692822637120195189" 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 "${INPUTS}"" prefer-non-shared="true">\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 "${INPUTS}"" 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
TaskHandle_t xTestTask;\r
TaskStatus_t xTaskInfo;\r
extern StackType_t uxTimerTaskStack[];\r
+static TickType_t xLastIdleExecutionTime = 0;\r
+TickType_t xIdleExecutionTime;\r
\r
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and\r
xTaskGetIdleTaskHandle() functions. Also try using the function that sets\r
}\r
}\r
}\r
+\r
+ xIdleExecutionTime = xTaskGetIdleRunTimeCounter();\r
+ if( xIdleExecutionTime == xLastIdleExecutionTime )\r
+ {\r
+ pcStatusMessage = "Error: Total amount of Idle task execution time did not change";\r
+ }\r
+ xLastIdleExecutionTime = xIdleExecutionTime;\r
}\r
/*-----------------------------------------------------------*/\r
\r
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );\r
TaskHandle_t MPU_xTaskGetIdleTaskHandle( void );\r
UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime );\r
+TickType_t MPU_xTaskGetIdleRunTimeCounter( void );\r
void MPU_vTaskList( char * pcWriteBuffer );\r
void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );\r
BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue );\r
#define uxTaskGetSystemState MPU_uxTaskGetSystemState\r
#define vTaskList MPU_vTaskList\r
#define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats\r
+ #define xTaskGetIdleRunTimeCounter MPU_xTaskGetIdleRunTimeCounter\r
#define xTaskGenericNotify MPU_xTaskGenericNotify\r
#define xTaskNotifyWait MPU_xTaskNotifyWait\r
#define ulTaskNotifyTake MPU_ulTaskNotifyTake\r
*/\r
void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
+/**\r
+* task. h\r
+* <PRE>TickType_t xTaskGetIdleRunTimeCounter( void );</PRE>\r
+*\r
+* configGENERATE_RUN_TIME_STATS and configUSE_STATS_FORMATTING_FUNCTIONS\r
+* must both be defined as 1 for this function to be available. The application\r
+* must also then provide definitions for\r
+* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE()\r
+* to configure a peripheral timer/counter and return the timers current count\r
+* value respectively. The counter should be at least 10 times the frequency of\r
+* the tick count.\r
+*\r
+* Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total\r
+* accumulated execution time being stored for each task. The resolution\r
+* of the accumulated time value depends on the frequency of the timer\r
+* configured by the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro.\r
+* While uxTaskGetSystemState() and vTaskGetRunTimeStats() writes the total\r
+* execution time of each task into a buffer, xTaskGetIdleRunTimeCounter()\r
+* returns the total execution time of just the idle task.\r
+*\r
+* @return The total run time of the idle task. This is the amount of time the\r
+* idle task has actually been executing. The unit of time is dependent on the\r
+* frequency configured using the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and\r
+* portGET_RUN_TIME_COUNTER_VALUE() macros.\r
+*\r
+* \defgroup xTaskGetIdleRunTimeCounter xTaskGetIdleRunTimeCounter\r
+* \ingroup TaskUtils\r
+*/\r
+TickType_t xTaskGetIdleRunTimeCounter( void ) PRIVILEGED_FUNCTION;\r
+\r
/**\r
* task. h\r
* <PRE>BaseType_t xTaskNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction );</PRE>\r
void vTaskStepTick( const TickType_t xTicksToJump ) PRIVILEGED_FUNCTION;\r
\r
/*\r
- * Only avilable when configUSE_TICKLESS_IDLE is set to 1.\r
+ * Only available when configUSE_TICKLESS_IDLE is set to 1.\r
* Provided for use within portSUPPRESS_TICKS_AND_SLEEP() to allow the port\r
* specific sleep function to determine if it is ok to proceed with the sleep,\r
* and if it is ok to proceed, if it is ok to sleep indefinitely.\r
*/\r
TaskHandle_t pvTaskIncrementMutexHeldCount( void ) PRIVILEGED_FUNCTION;\r
\r
-#if( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )\r
- TickType_t xTaskGetIdleRunTimeCounter( void );\r
-#endif\r
-\r
/*\r
* For internal use only. Same as vTaskSetTimeOutState(), but without a critial\r
* section.\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )\r
+ TickType_t MPU_xTaskGetIdleRunTimeCounter( void )\r
+ {\r
+ TickType_t xReturn;\r
+ BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
+\r
+ xReturn = xTaskGetIdleRunTimeCounter();\r
+ vPortResetPrivilege( xRunningPrivileged );\r
+ return xReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if ( configUSE_APPLICATION_TASK_TAG == 1 )\r
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue )\r
{\r
( prvGetMPURegionSizeSetting( ( uint32_t ) __FLASH_segment_end__ - ( uint32_t ) __FLASH_segment_start__ ) ) |\r
( portMPU_REGION_ENABLE );\r
\r
- /* Setup the first 16K for privileged only access (even though less\r
+ /* Setup the first nK for privileged only access (even though less\r
than 10K is actually being used). This is where the kernel code is\r
placed. */\r
portMPU_REGION_BASE_ADDRESS_REG = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */\r
#include "task.h"\r
#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
+#endif\r
+\r
/* Let the user override the pre-loading of the initial LR with the address of\r
prvTaskExitError() in case it messes up unwinding of the stack in the\r
debugger. */\r