mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Demo project only:
Add the new IntSem test/demo code into the MSVC demo project.
This commit is contained in:
parent
b6e4854f26
commit
4f03f7d1bb
|
@ -83,7 +83,7 @@
|
||||||
#define configUSE_TICK_HOOK 1
|
#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 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 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 ) ( 21 * 1024 ) )
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22 * 1024 ) )
|
||||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
#define configMAX_TASK_NAME_LEN ( 12 )
|
||||||
#define configUSE_TRACE_FACILITY 1
|
#define configUSE_TRACE_FACILITY 1
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
|
|
@ -143,6 +143,7 @@
|
||||||
<ClCompile Include="..\Common\Minimal\flop.c" />
|
<ClCompile Include="..\Common\Minimal\flop.c" />
|
||||||
<ClCompile Include="..\Common\Minimal\GenQTest.c" />
|
<ClCompile Include="..\Common\Minimal\GenQTest.c" />
|
||||||
<ClCompile Include="..\Common\Minimal\integer.c" />
|
<ClCompile Include="..\Common\Minimal\integer.c" />
|
||||||
|
<ClCompile Include="..\Common\Minimal\IntSemTest.c" />
|
||||||
<ClCompile Include="..\Common\Minimal\PollQ.c" />
|
<ClCompile Include="..\Common\Minimal\PollQ.c" />
|
||||||
<ClCompile Include="..\Common\Minimal\QPeek.c" />
|
<ClCompile Include="..\Common\Minimal\QPeek.c" />
|
||||||
<ClCompile Include="..\Common\Minimal\QueueOverwrite.c" />
|
<ClCompile Include="..\Common\Minimal\QueueOverwrite.c" />
|
||||||
|
|
|
@ -136,6 +136,9 @@
|
||||||
<ClCompile Include="..\..\Source\portable\MemMang\heap_5.c">
|
<ClCompile Include="..\..\Source\portable\MemMang\heap_5.c">
|
||||||
<Filter>FreeRTOS Source\Source\Portable</Filter>
|
<Filter>FreeRTOS Source\Source\Portable</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Common\Minimal\IntSemTest.c">
|
||||||
|
<Filter>Demo App Source\Common Demo Tasks</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="FreeRTOSConfig.h">
|
<ClInclude Include="FreeRTOSConfig.h">
|
||||||
|
|
|
@ -112,7 +112,7 @@ that make up the total heap. This is only done to provide an example of heap_5
|
||||||
being used as this demo could easily create one large heap region instead of
|
being used as this demo could easily create one large heap region instead of
|
||||||
multiple smaller heap regions - in which case heap_4.c would be the more
|
multiple smaller heap regions - in which case heap_4.c would be the more
|
||||||
appropriate choice. */
|
appropriate choice. */
|
||||||
#define mainREGION_1_SIZE 2001
|
#define mainREGION_1_SIZE 3001
|
||||||
#define mainREGION_2_SIZE 18005
|
#define mainREGION_2_SIZE 18005
|
||||||
#define mainREGION_3_SIZE 1007
|
#define mainREGION_3_SIZE 1007
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,7 @@
|
||||||
#include "QueueSet.h"
|
#include "QueueSet.h"
|
||||||
#include "QueueOverwrite.h"
|
#include "QueueOverwrite.h"
|
||||||
#include "EventGroupsDemo.h"
|
#include "EventGroupsDemo.h"
|
||||||
|
#include "IntSemTest.h"
|
||||||
|
|
||||||
/* Priorities at which the tasks are created. */
|
/* Priorities at which the tasks are created. */
|
||||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||||
|
@ -209,6 +210,7 @@ int main_full( void )
|
||||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||||
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||||
vStartEventGroupTasks();
|
vStartEventGroupTasks();
|
||||||
|
vStartInterruptSemaphoreTasks();
|
||||||
|
|
||||||
#if( configUSE_PREEMPTION != 0 )
|
#if( configUSE_PREEMPTION != 0 )
|
||||||
{
|
{
|
||||||
|
@ -263,7 +265,11 @@ const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( xAreEventGroupTasksStillRunning() != pdTRUE )
|
if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: IntSem";
|
||||||
|
}
|
||||||
|
else if( xAreEventGroupTasksStillRunning() != pdTRUE )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: EventGroup";
|
pcStatusMessage = "Error: EventGroup";
|
||||||
}
|
}
|
||||||
|
@ -403,7 +409,7 @@ void vFullDemoTickHookFunction( void )
|
||||||
vPeriodicEventGroupsProcessing();
|
vPeriodicEventGroupsProcessing();
|
||||||
|
|
||||||
/* Exercise giving mutexes from an interrupt. */
|
/* Exercise giving mutexes from an interrupt. */
|
||||||
vMutexISRInteractionTest();
|
vInterruptSemaphorePeriodicTest();
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue