Adjusted the wrap checks in the QueueSet test task.

Added the QueueSet test to the Rowlay Stellaris and SAM4S-EK Studio demos.
Updated the MSVC demo to use heap_4.c.
This commit is contained in:
Richard Barry 2013-02-12 14:30:12 +00:00
parent 0262f4a6cd
commit 9b26071eb8
13 changed files with 92 additions and 60 deletions

View file

@ -85,7 +85,7 @@
#define configUSE_TICK_HOOK 1
#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. */
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 50 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */
#define configTOTAL_HEAP_SIZE ( ( size_t ) 0 ) /* This parameter has no effect when heap_3.c is included in the project. */
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 20 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 12 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0

Binary file not shown.

View file

@ -129,7 +129,7 @@
<ClCompile Include="..\..\..\FreeRTOS-Plus\FreeRTOS-Plus-Trace\trcKernel.c" />
<ClCompile Include="..\..\..\FreeRTOS-Plus\FreeRTOS-Plus-Trace\trcPort.c" />
<ClCompile Include="..\..\..\FreeRTOS-Plus\FreeRTOS-Plus-Trace\trcUser.c" />
<ClCompile Include="..\..\Source\portable\MemMang\heap_3.c" />
<ClCompile Include="..\..\Source\portable\MemMang\heap_4.c" />
<ClCompile Include="..\..\Source\timers.c" />
<ClCompile Include="..\Common\Minimal\BlockQ.c" />
<ClCompile Include="..\Common\Minimal\blocktim.c" />

View file

@ -49,9 +49,6 @@
<ClCompile Include="..\..\Source\tasks.c">
<Filter>FreeRTOS Source\Source</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\portable\MemMang\heap_3.c">
<Filter>FreeRTOS Source\Source</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\portable\MSVC-MingW\port.c">
<Filter>FreeRTOS Source\Source\Portable</Filter>
</ClCompile>
@ -115,6 +112,9 @@
<ClCompile Include="Run-time-stats-utils.c">
<Filter>Demo App Source</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\portable\MemMang\heap_4.c">
<Filter>FreeRTOS Source\Source\Portable</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="FreeRTOSConfig.h">

View file

@ -96,6 +96,7 @@
/* Standard includes. */
#include <stdio.h>
#include <stdlib.h>
/* Kernel includes. */
#include <FreeRTOS.h>
@ -292,6 +293,7 @@ const unsigned long ulMSToSleep = 15;
xTaskHandle xIdleTaskHandle, xTimerTaskHandle, xTestTask;
signed char *pcTaskName;
const unsigned char ucConstQueueNumber = 0xaaU, ucConstTaskNumber = 0x55U;
void *pvAllocated;
/* These three functions are only meant for use by trace code, and not for
direct use from application code, hence their prototypes are not in queue.h. */
@ -386,13 +388,17 @@ extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask );
}
}
}
/* Exercise heap_4 a bit. The malloc failed hook will trap failed
allocations so there is no need to test here. */
pvAllocated = pvPortMalloc( ( rand() % 100 ) + 1 );
vPortFree( pvAllocated );
}
/*-----------------------------------------------------------*/
void vApplicationMallocFailedHook( void )
{
/* Can be implemented if required, but probably not required in this
environment and running this demo. */
vAssertCalled();
}
/*-----------------------------------------------------------*/