#define configUSE_TRACE_FACILITY 0\r
#define configCHECK_FOR_STACK_OVERFLOW 2\r
#define configUSE_COUNTING_SEMAPHORES 1\r
+#define configUSE_APPLICATION_TASK_TAG 0\r
+#define configUSE_FPU 0\r
\r
\r
/* Co-routine definitions. */\r
#define configUSE_RECURSIVE_MUTEXES 1\r
\r
\r
+#if configUSE_FPU == 1\r
+ /* Include the header that define the traceTASK_SWITCHED_IN() and\r
+ traceTASK_SWITCHED_OUT() macros to save and restore the floating\r
+ point registers for tasks that have requested this behaviour. */\r
+ #include "FPU_Macros.h"\r
+#endif\r
+\r
#endif /* FREERTOS_CONFIG_H */\r
+\r
+\r
#include "partest.h"\r
#include "countsem.h"\r
#include "recmutex.h"\r
+#include "flop.h"\r
+#include "flop-reg-test.h"\r
\r
/* Priorities assigned to the demo tasks. */\r
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )\r
vStartCountingSemaphoreTasks();\r
vStartRecursiveMutexTasks();\r
\r
+ #if ( configUSE_FPU == 1 )\r
+ {\r
+ /* To use floating point:\r
+ \r
+ 0) Add the files contained in the RTOSDemo/flop directory to the \r
+ build.\r
+ 1) Your FPGA hardware design needs to add the APU FPU. This should\r
+ then also make the compiler options change to include the option\r
+ -mfpu=sp_full, but best to check.\r
+ 2) Set configUSE_FPU to 1 in FreeRTOSConfig.h.\r
+ 3) Set configUSE_APPLICATION_TASK_TAG to 1 in FreeRTOSConfig.h.\r
+ 4) Ensure #include "FPU_Macros.h" is contained within \r
+ FreeRTOSConfig.h (as per this example). */\r
+ vStartMathTasks( mainFLOP_PRIORITY );\r
+ vStartFlopRegTests();\r
+ }\r
+ #endif\r
+\r
/* Create the tasks defined within this file. */\r
xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
lReturn = pdFAIL;\r
}\r
\r
+ #if ( configUSE_FPU == 1 )\r
+ if( xAreMathsTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreFlopRegisterTestsStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ #endif\r
+\r
/* Have the register test tasks found any errors? */\r
if( xRegTestStatus != pdPASS )\r
{\r