</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461900</id>\r
+ <id>1528755597221</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461910</id>\r
+ <id>1528755597236</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461930</id>\r
+ <id>1528755597244</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461940</id>\r
+ <id>1528755597250</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461940</id>\r
+ <id>1528755597254</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461950</id>\r
+ <id>1528755597258</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461960</id>\r
+ <id>1528755597263</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461960</id>\r
+ <id>1528755597267</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461980</id>\r
+ <id>1528755597271</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461990</id>\r
+ <id>1528755597278</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598461990</id>\r
+ <id>1528755597282</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462000</id>\r
+ <id>1528755597288</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462000</id>\r
+ <id>1528755597292</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462020</id>\r
+ <id>1528755597302</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462020</id>\r
+ <id>1528755597306</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462030</id>\r
+ <id>1528755597310</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462040</id>\r
+ <id>1528755597314</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462040</id>\r
+ <id>1528755597318</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
</matcher>\r
</filter>\r
<filter>\r
- <id>1461598462050</id>\r
+ <id>1528755597321</id>\r
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
<type>5</type>\r
<matcher>\r
<arguments>1.0-name-matches-false-false-AbortDelay.c</arguments>\r
</matcher>\r
</filter>\r
+ <filter>\r
+ <id>1528755597325</id>\r
+ <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
+ <type>5</type>\r
+ <matcher>\r
+ <id>org.eclipse.ui.ide.multiFilter</id>\r
+ <arguments>1.0-name-matches-false-false-MessageBufferAMP.c</arguments>\r
+ </matcher>\r
+ </filter>\r
+ <filter>\r
+ <id>1528755597330</id>\r
+ <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
+ <type>5</type>\r
+ <matcher>\r
+ <id>org.eclipse.ui.ide.multiFilter</id>\r
+ <arguments>1.0-name-matches-false-false-MessageBufferDemo.c</arguments>\r
+ </matcher>\r
+ </filter>\r
+ <filter>\r
+ <id>1528755597334</id>\r
+ <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
+ <type>5</type>\r
+ <matcher>\r
+ <id>org.eclipse.ui.ide.multiFilter</id>\r
+ <arguments>1.0-name-matches-false-false-StreamBufferDemo.c</arguments>\r
+ </matcher>\r
+ </filter>\r
+ <filter>\r
+ <id>1528755597338</id>\r
+ <name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>\r
+ <type>5</type>\r
+ <matcher>\r
+ <id>org.eclipse.ui.ide.multiFilter</id>\r
+ <arguments>1.0-name-matches-false-false-StreamBufferInterrupt.c</arguments>\r
+ </matcher>\r
+ </filter>\r
<filter>\r
<id>1461598705091</id>\r
<name>src/lwIP_Demo/lwip-1.4.0/src/core</name>\r
#define configUSE_TICK_HOOK 1\r
#define configMAX_PRIORITIES ( 7 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 ) /* Large in case configUSE_TASK_FPU_SUPPORT is 2 in which case all tasks have an FPU context. */\r
-#define configTOTAL_HEAP_SIZE ( 90 * 1024 )\r
+#define configTOTAL_HEAP_SIZE ( 125 * 1024 )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#define configUSE_TRACE_FACILITY 1\r
#define configUSE_16_BIT_TICKS 0\r
#include "IntSemTest.h"\r
#include "StaticAllocation.h"\r
#include "AbortDelay.h"\r
+#include "MessageBufferDemo.h"\r
+#include "StreamBufferDemo.h"\r
+#include "StreamBufferInterrupt.h"\r
+#include "MessageBufferAMP.h"\r
\r
\r
/* Priorities for the demo application tasks. */\r
/* The base period used by the timer test tasks. */\r
#define mainTIMER_TEST_PERIOD ( 50 )\r
\r
+/* Base stack size of tasks created in the message buffer demos. */\r
+#define mainMESSAGE_BUFFER_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )\r
+\r
/*-----------------------------------------------------------*/\r
\r
\r
vStartInterruptSemaphoreTasks();\r
vStartStaticallyAllocatedTasks();\r
vCreateAbortDelayTasks();\r
+ vStartMessageBufferTasks( mainMESSAGE_BUFFER_STACK_SIZE );\r
+ vStartStreamBufferTasks();\r
+ vStartStreamBufferInterruptDemo();\r
+ vStartMessageBufferAMPTasks( mainMESSAGE_BUFFER_STACK_SIZE );\r
\r
/* Start the tasks that implements the command console on the UART, as\r
described above. */\r
ulErrorFound |= 1UL << 16UL;\r
}\r
\r
+ if( xAreStreamBufferTasksStillRunning() != pdTRUE )\r
+ {\r
+ ulErrorFound |= 1UL << 17UL;\r
+ }\r
+\r
+ if( xAreMessageBufferTasksStillRunning() != pdTRUE )\r
+ {\r
+ ulErrorFound |= 1UL << 18UL;\r
+ }\r
+\r
+ if( xIsInterruptStreamBufferDemoStillRunning() != pdPASS )\r
+ {\r
+ ulErrorFound |= 1UL << 19UL;\r
+ }\r
+\r
+ if( xAreMessageBufferAMPTasksStillRunning() != pdPASS )\r
+ {\r
+ ulErrorFound |= 1UL << 20UL;\r
+ }\r
+\r
/* Check that the register test 1 task is still running. */\r
if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
{\r
- ulErrorFound |= 1UL << 17UL;\r
+ ulErrorFound |= 1UL << 21UL;\r
}\r
ulLastRegTest1Value = ulRegTest1LoopCounter;\r
\r
/* Check that the register test 2 task is still running. */\r
if( ulLastRegTest2Value == ulRegTest2LoopCounter )\r
{\r
- ulErrorFound |= 1UL << 18UL;\r
+ ulErrorFound |= 1UL << 22UL;\r
}\r
ulLastRegTest2Value = ulRegTest2LoopCounter;\r
\r
#include "EventGroupsDemo.h"\r
#include "TaskNotify.h"\r
#include "IntSemTest.h"\r
+#include "StreamBufferInterrupt.h"\r
+#include "StreamBufferDemo.h"\r
\r
/* Xilinx includes. */\r
#include "platform.h"\r
/* Use mutexes from interrupts. */\r
vInterruptSemaphorePeriodicTest();\r
\r
+ /* Writes to stream buffer byte by byte to test the stream buffer trigger\r
+ level functionality. */\r
+ vPeriodicStreamBufferProcessing();\r
+\r
+ /* Writes a string to a string buffer four bytes at a time to demonstrate\r
+ a stream being sent from an interrupt to a task. */\r
+ vBasicStreamBufferSendFromISR();\r
+\r
/* Test flop alignment in interrupts - calling printf from an interrupt\r
is BAD! */\r
#if( configASSERT_DEFINED == 1 )\r
vStartQueuePeekTasks();\r
vStartQueueSetTasks();\r
vStartEventGroupTasks();\r
- vStartMessageBufferTasks();\r
+ vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );\r
vStartStreamBufferTasks();\r
\r
/* Exclude some tasks if using the kickstart version to ensure we stay within\r
or not the correct/expected number of tasks are running at any given time. */\r
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
\r
- /* Uncomment the following line to configure the high frequency interrupt \r
- used to measure the interrupt jitter time. \r
+ /* Uncomment the following line to configure the high frequency interrupt\r
+ used to measure the interrupt jitter time.\r
vSetupHighFrequencyTimer(); */\r
\r
/* Start the scheduler. */\r
function then they must be declared static - otherwise they will be allocated on\r
the stack and so not exists after this function exits. */\r
static StaticTask_t xTimerTaskTCB;\r
-static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; \r
+static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];\r
\r
/* Pass out a pointer to the StaticTask_t structure in which the Timer\r
task's state will be stored. */\r
vStartTaskNotifyTask();\r
vStartInterruptSemaphoreTasks();\r
vStartStreamBufferTasks();\r
- vStartMessageBufferTasks();\r
+ vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );\r
\r
/* Create the register check tasks, as described at the top of this file */\r
xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL );\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartMessageBufferAMPTasks( void )\r
+void vStartMessageBufferAMPTasks( configSTACK_DEPTH_TYPE xStackSize )\r
{\r
BaseType_t x;\r
\r
xControlMessageBuffer = xMessageBufferCreate( mbaCONTROL_MESSAGE_BUFFER_SIZE );\r
\r
- xTaskCreate( prvCoreATask, /* The function that implements the task. */\r
- "AMPCoreA", /* Human readable name for the task. */\r
- configMINIMAL_STACK_SIZE, /* Stack size (in words!). */\r
- NULL, /* Task parameter is not used. */\r
- tskIDLE_PRIORITY, /* The priority at which the task is created. */\r
- NULL ); /* No use for the task handle. */\r
+ xTaskCreate( prvCoreATask, /* The function that implements the task. */\r
+ "AMPCoreA", /* Human readable name for the task. */\r
+ xStackSize, /* Stack size (in words!). */\r
+ NULL, /* Task parameter is not used. */\r
+ tskIDLE_PRIORITY, /* The priority at which the task is created. */\r
+ NULL ); /* No use for the task handle. */\r
\r
for( x = 0; x < mbaNUMBER_OF_CORE_B_TASKS; x++ )\r
{\r
ulCycleCounters and xCoreBMessageBuffers arrays. */\r
xTaskCreate( prvCoreBTasks,\r
"AMPCoreB1",\r
- configMINIMAL_STACK_SIZE,\r
+ xStackSize,\r
( void * ) x,\r
tskIDLE_PRIORITY + 1,\r
NULL );\r
/* A block time of 0 means "don't block". */\r
#define mbDONT_BLOCK ( 0 )\r
\r
-/* The size of the stack allocated to the tasks that run as part of this demo/\r
-test. The stack size is over generous in most cases. */\r
-#define mbSTACK_SIZE ( configMINIMAL_STACK_SIZE + ( configMINIMAL_STACK_SIZE >> 1 ) )\r
/*-----------------------------------------------------------*/\r
\r
/*\r
message buffer to test writing different lengths at different offsets. */\r
static const char *pc55ByteString = "One two three four five six seven eight nine ten eleve";\r
\r
+/* Remember the required stack size so tasks can be created at run time (after\r
+initialisation time. */\r
+static configSTACK_DEPTH_TYPE xBlockingStackSize = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartMessageBufferTasks( void )\r
+void vStartMessageBufferTasks( configSTACK_DEPTH_TYPE xStackSize )\r
{\r
MessageBufferHandle_t xMessageBuffer;\r
\r
+ xBlockingStackSize = ( xStackSize + ( xStackSize >> 1U ) );\r
+\r
/* The echo servers sets up the message buffers before creating the echo\r
client tasks. One set of tasks has the server as the higher priority, and\r
the other has the client as the higher priority. */\r
- xTaskCreate( prvEchoServer, "1EchoServer", mbSTACK_SIZE, NULL, mbHIGHER_PRIORITY, NULL );\r
- xTaskCreate( prvEchoServer, "2EchoServer", mbSTACK_SIZE, NULL, mbLOWER_PRIORITY, NULL );\r
+ xTaskCreate( prvEchoServer, "1EchoServer", xBlockingStackSize, NULL, mbHIGHER_PRIORITY, NULL );\r
+ xTaskCreate( prvEchoServer, "2EchoServer", xBlockingStackSize, NULL, mbLOWER_PRIORITY, NULL );\r
\r
/* The non blocking tasks run continuously and will interleave with each\r
other, so must be created at the lowest priority. The message buffer they\r
use is created and passed in using the task's parameter. */\r
xMessageBuffer = xMessageBufferCreate( mbMESSAGE_BUFFER_LENGTH_BYTES );\r
- xTaskCreate( prvNonBlockingReceiverTask, "NonBlkRx", configMINIMAL_STACK_SIZE, ( void * ) xMessageBuffer, tskIDLE_PRIORITY, NULL );\r
- xTaskCreate( prvNonBlockingSenderTask, "NonBlkTx", configMINIMAL_STACK_SIZE, ( void * ) xMessageBuffer, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( prvNonBlockingReceiverTask, "NonBlkRx", xStackSize, ( void * ) xMessageBuffer, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( prvNonBlockingSenderTask, "NonBlkTx", xStackSize, ( void * ) xMessageBuffer, tskIDLE_PRIORITY, NULL );\r
\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
{\r
/* The sender tasks set up the message buffers before creating the\r
receiver tasks. Priorities must be 0 and 1 as the priority is used to\r
index into the xStaticMessageBuffers and ucBufferStorage arrays. */\r
- xTaskCreate( prvSenderTask, "1Sender", mbSTACK_SIZE, NULL, mbHIGHER_PRIORITY, NULL );\r
- xTaskCreate( prvSenderTask, "2Sender", mbSTACK_SIZE, NULL, mbLOWER_PRIORITY, NULL );\r
+ xTaskCreate( prvSenderTask, "1Sender", xBlockingStackSize, NULL, mbHIGHER_PRIORITY, NULL );\r
+ xTaskCreate( prvSenderTask, "2Sender", xBlockingStackSize, NULL, mbLOWER_PRIORITY, NULL );\r
}\r
#endif /* configSUPPORT_STATIC_ALLOCATION */\r
}\r
/* Here prvSingleTaskTests() performs various tests on a message buffer\r
that was created statically. */\r
prvSingleTaskTests( xMessageBuffer );\r
- xTaskCreate( prvReceiverTask, "MsgReceiver", mbSTACK_SIZE, ( void * ) xMessageBuffer, mbHIGHER_PRIORITY, NULL );\r
+ xTaskCreate( prvReceiverTask, "MsgReceiver", xBlockingStackSize, ( void * ) xMessageBuffer, mbHIGHER_PRIORITY, NULL );\r
}\r
else\r
{\r
- xTaskCreate( prvReceiverTask, "MsgReceiver", mbSTACK_SIZE, ( void * ) xMessageBuffer, mbLOWER_PRIORITY, NULL );\r
+ xTaskCreate( prvReceiverTask, "MsgReceiver", xBlockingStackSize, ( void * ) xMessageBuffer, mbLOWER_PRIORITY, NULL );\r
}\r
\r
for( ;; )\r
\r
static void prvReceiverTask( void *pvParameters )\r
{\r
- StreamBufferHandle_t * const pxStreamBuffer = ( StreamBufferHandle_t * ) pvParameters;\r
+ StreamBufferHandle_t const pxStreamBuffer = ( StreamBufferHandle_t ) pvParameters;\r
char cRxString[ 12 ]; /* Large enough to hold a 32-bit number in ASCII. */\r
const TickType_t xTicksToWait = pdMS_TO_TICKS( 5UL );\r
const size_t xStringLength = strlen( pc55ByteString );\r
#ifndef MESSAGE_BUFFER_AMP_H\r
#define MESSAGE_BUFFER_AMP_H\r
\r
-void vStartMessageBufferAMPTasks( void );\r
+void vStartMessageBufferAMPTasks( configSTACK_DEPTH_TYPE xStackSize );\r
BaseType_t xAreMessageBufferAMPTasksStillRunning( void );\r
void vGenerateCoreBInterrupt( void * xUpdatedMessageBuffer );\r
\r
#ifndef MESSAGE_BUFFER_TEST_H\r
#define MESSAGE_BUFFER_TEST_H\r
\r
-void vStartMessageBufferTasks( void );\r
+void vStartMessageBufferTasks( configSTACK_DEPTH_TYPE xStackSize );\r
BaseType_t xAreMessageBufferTasksStillRunning( void );\r
\r
#endif /* MESSAGE_BUFFER_TEST_H */\r
xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
\r
- vStartMessageBufferTasks();\r
+ vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );\r
vStartStreamBufferTasks();\r
vStartStreamBufferInterruptDemo();\r
- vStartMessageBufferAMPTasks();\r
+ vStartMessageBufferAMPTasks( configMINIMAL_STACK_SIZE );\r
\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
{\r
xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
\r
- vStartMessageBufferTasks();\r
+ vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );\r
vStartStreamBufferTasks();\r
vStartStreamBufferInterruptDemo();\r
- vStartMessageBufferAMPTasks();\r
+ vStartMessageBufferAMPTasks( configMINIMAL_STACK_SIZE );\r
\r
#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
{\r
extern "C" {\r
#endif\r
\r
+#include "task.h"\r
\r
/**\r
* Type by which queues are referenced. For example, a call to xQueueCreate()\r