summaryrefslogtreecommitdiff
path: root/FreeRTOS/Demo/WIN32-MSVC
diff options
context:
space:
mode:
Diffstat (limited to 'FreeRTOS/Demo/WIN32-MSVC')
-rw-r--r--FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h2
-rw-r--r--FreeRTOS/Demo/WIN32-MSVC/WIN32.suobin64000 -> 65024 bytes
-rw-r--r--FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj2
-rw-r--r--FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters6
-rw-r--r--FreeRTOS/Demo/WIN32-MSVC/main.c10
5 files changed, 13 insertions, 7 deletions
diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h
index 31bb3115e..d0c1f9368 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h
@@ -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
diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.suo b/FreeRTOS/Demo/WIN32-MSVC/WIN32.suo
index 4e80022d3..3a7a73946 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.suo
+++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.suo
Binary files differ
diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj
index 5429533dc..6ea0af09d 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj
+++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj
@@ -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" />
diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters
index bbd24de02..1c628ea6a 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters
+++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters
@@ -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">
diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c
index 2cc0a9b04..9b0164233 100644
--- a/FreeRTOS/Demo/WIN32-MSVC/main.c
+++ b/FreeRTOS/Demo/WIN32-MSVC/main.c
@@ -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();
}
/*-----------------------------------------------------------*/