]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/WIN32-MingW/FreeRTOSConfig.h
Import the code coverage test additions from the (unpublished) Visual Studio project...
[freertos] / FreeRTOS / Demo / WIN32-MingW / FreeRTOSConfig.h
index b73d975247457cc6cfbbfc01100e35f9d9b8e983..f66e45389c7cf0427bed0094b381375d50d0a08e 100644 (file)
@@ -47,7 +47,7 @@
 #define configUSE_DAEMON_TASK_STARTUP_HOOK             1\r
 #define configTICK_RATE_HZ                                             ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */\r
 #define configMINIMAL_STACK_SIZE                               ( ( unsigned short ) 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */\r
-#define configTOTAL_HEAP_SIZE                                  ( ( size_t ) ( 45 * 1024 ) )\r
+#define configTOTAL_HEAP_SIZE                                  ( ( size_t ) ( 65 * 1024 ) )\r
 #define configMAX_TASK_NAME_LEN                                        ( 12 )\r
 #define configUSE_TRACE_FACILITY                               1\r
 #define configUSE_16_BIT_TICKS                                 0\r
@@ -56,7 +56,6 @@
 #define configCHECK_FOR_STACK_OVERFLOW                 0\r
 #define configUSE_RECURSIVE_MUTEXES                            1\r
 #define configQUEUE_REGISTRY_SIZE                              20\r
-#define configUSE_MALLOC_FAILED_HOOK                   1\r
 #define configUSE_APPLICATION_TASK_TAG                 1\r
 #define configUSE_COUNTING_SEMAPHORES                  1\r
 #define configUSE_ALTERNATIVE_API                              0\r
 #define configUSE_TASK_NOTIFICATIONS                   1\r
 #define configSUPPORT_STATIC_ALLOCATION                        1\r
 \r
-/* Software timer related configuration options. */\r
+/* Software timer related configuration options.  The maximum possible task\r
+priority is configMAX_PRIORITIES - 1.  The priority of the timer task is\r
+deliberately set higher to ensure it is correctly capped back to\r
+configMAX_PRIORITIES - 1. */\r
 #define configUSE_TIMERS                                               1\r
 #define configTIMER_TASK_PRIORITY                              ( configMAX_PRIORITIES - 1 )\r
 #define configTIMER_QUEUE_LENGTH                               20\r
@@ -80,14 +82,18 @@ void vConfigureTimerForRunTimeStats( void );        /* Prototype of function that initi
 #define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()\r
 \r
 /* Co-routine related configuration options. */\r
-#define configUSE_CO_ROUTINES                                  1\r
+#define configUSE_CO_ROUTINES                                  0\r
 #define configMAX_CO_ROUTINE_PRIORITIES                        ( 2 )\r
 \r
-/* This demo makes use of one or more example stats formatting functions.  These\r
+/* This demo can use of one or more example stats formatting functions.  These\r
 format the raw data provided by the uxTaskGetSystemState() function in to human\r
 readable ASCII form.  See the notes in the implementation of vTaskList() within\r
 FreeRTOS/Source/tasks.c for limitations. */\r
-#define configUSE_STATS_FORMATTING_FUNCTIONS   1\r
+#define configUSE_STATS_FORMATTING_FUNCTIONS   0\r
+\r
+/* Enables the test whereby a stack larger than the total heap size is\r
+requested. */\r
+#define configSTACK_DEPTH_TYPE uint32_t\r
 \r
 /* Set the following definitions to 1 to include the API function, or zero\r
 to exclude the API function.  In most cases the linker will remove unused\r
@@ -116,11 +122,24 @@ functions anyway. */
 #endif /* configINCLUDE_MESSAGE_BUFFER_AMP_DEMO */\r
 \r
 extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName );\r
-#define configCOVERAGE_TEST 1\r
-#if( configCOVERAGE_TEST == 1 )\r
+\r
+/* projCOVERAGE_TEST should be defined on the command line so this file can be\r
+used with multiple project configurations.  If it is\r
+ */\r
+#ifndef projCOVERAGE_TEST\r
+       #error projCOVERAGE_TEST should be defined to 1 or 0 on the command line.\r
+#endif\r
+\r
+#if( projCOVERAGE_TEST == 1 )\r
        /* Insert NOPs in empty decision paths to ensure both true and false paths\r
        are being tested. */\r
        #define mtCOVERAGE_TEST_MARKER() __asm volatile( "NOP" )\r
+\r
+       /* Ensure the tick count overflows during the coverage test. */\r
+       #define configINITIAL_TICK_COUNT 0xffffd800UL\r
+\r
+       /* Allows tests of trying to allocate more than the heap has free. */\r
+       #define configUSE_MALLOC_FAILED_HOOK                    0\r
 #else\r
        /* It is a good idea to define configASSERT() while developing.  configASSERT()\r
        uses the same semantics as the standard C assert() macro.  Don't define\r
@@ -128,9 +147,12 @@ extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
        intended to asserts() to fail, some some code is intended not to run if no\r
        errors are present. */\r
        #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __LINE__, __FILE__ )\r
+\r
+       #define configUSE_MALLOC_FAILED_HOOK                    1\r
+\r
+       /* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */\r
+       #include "trcRecorder.h"\r
 #endif\r
 \r
-/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */\r
-#include "trcRecorder.h"\r
 \r
 #endif /* FREERTOS_CONFIG_H */\r