From b7d33d4ae11422f57dc58ab799a313401d7f943c Mon Sep 17 00:00:00 2001 From: rtel Date: Fri, 12 Sep 2014 11:32:47 +0000 Subject: [PATCH] Demo project only: Add the new IntSem test/demo code into the MSVC demo project. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2304 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h | 2 +- FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj | 1 + FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters | 3 +++ FreeRTOS/Demo/WIN32-MSVC/main.c | 2 +- FreeRTOS/Demo/WIN32-MSVC/main_full.c | 10 ++++++++-- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h index ae567c196..2f8243118 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h @@ -83,7 +83,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 ) ( 21 * 1024 ) ) +#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj index 91df9d922..5e65e3e17 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj +++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj @@ -143,6 +143,7 @@ + diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters index 7d9549818..debd11c01 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters +++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters @@ -136,6 +136,9 @@ FreeRTOS Source\Source\Portable + + Demo App Source\Common Demo Tasks + diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c index 6b1b9554d..064c91375 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main.c @@ -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 multiple smaller heap regions - in which case heap_4.c would be the more appropriate choice. */ -#define mainREGION_1_SIZE 2001 +#define mainREGION_1_SIZE 3001 #define mainREGION_2_SIZE 18005 #define mainREGION_3_SIZE 1007 diff --git a/FreeRTOS/Demo/WIN32-MSVC/main_full.c b/FreeRTOS/Demo/WIN32-MSVC/main_full.c index 4a5cb5bc4..74fc3f29e 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main_full.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main_full.c @@ -133,6 +133,7 @@ #include "QueueSet.h" #include "QueueOverwrite.h" #include "EventGroupsDemo.h" +#include "IntSemTest.h" /* Priorities at which the tasks are created. */ #define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 ) @@ -209,6 +210,7 @@ int main_full( void ) vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); vStartEventGroupTasks(); + vStartInterruptSemaphoreTasks(); #if( configUSE_PREEMPTION != 0 ) { @@ -263,7 +265,11 @@ const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS; } #endif - if( xAreEventGroupTasksStillRunning() != pdTRUE ) + if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE ) + { + pcStatusMessage = "Error: IntSem"; + } + else if( xAreEventGroupTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: EventGroup"; } @@ -403,7 +409,7 @@ void vFullDemoTickHookFunction( void ) vPeriodicEventGroupsProcessing(); /* Exercise giving mutexes from an interrupt. */ - vMutexISRInteractionTest(); + vInterruptSemaphorePeriodicTest(); } /*-----------------------------------------------------------*/ -- 2.39.5