Add the option to specify a stack size in the standard demo MessageBuffer tests.

Add stream and message buffer tests into the Zynq demo project.
This commit is contained in:
Richard Barry 2018-06-13 16:50:16 +00:00
parent 4fbcdbf13b
commit d6fcd5dbba
14 changed files with 134 additions and 54 deletions

View file

@ -219,7 +219,7 @@
</matcher>
</filter>
<filter>
<id>1461598461900</id>
<id>1528755597221</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -228,7 +228,7 @@
</matcher>
</filter>
<filter>
<id>1461598461910</id>
<id>1528755597236</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -237,7 +237,7 @@
</matcher>
</filter>
<filter>
<id>1461598461930</id>
<id>1528755597244</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -246,7 +246,7 @@
</matcher>
</filter>
<filter>
<id>1461598461940</id>
<id>1528755597250</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -255,7 +255,7 @@
</matcher>
</filter>
<filter>
<id>1461598461940</id>
<id>1528755597254</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -264,7 +264,7 @@
</matcher>
</filter>
<filter>
<id>1461598461950</id>
<id>1528755597258</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -273,7 +273,7 @@
</matcher>
</filter>
<filter>
<id>1461598461960</id>
<id>1528755597263</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -282,7 +282,7 @@
</matcher>
</filter>
<filter>
<id>1461598461960</id>
<id>1528755597267</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -291,7 +291,7 @@
</matcher>
</filter>
<filter>
<id>1461598461980</id>
<id>1528755597271</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -300,7 +300,7 @@
</matcher>
</filter>
<filter>
<id>1461598461990</id>
<id>1528755597278</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -309,7 +309,7 @@
</matcher>
</filter>
<filter>
<id>1461598461990</id>
<id>1528755597282</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -318,7 +318,7 @@
</matcher>
</filter>
<filter>
<id>1461598462000</id>
<id>1528755597288</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -327,7 +327,7 @@
</matcher>
</filter>
<filter>
<id>1461598462000</id>
<id>1528755597292</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -336,7 +336,7 @@
</matcher>
</filter>
<filter>
<id>1461598462020</id>
<id>1528755597302</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -345,7 +345,7 @@
</matcher>
</filter>
<filter>
<id>1461598462020</id>
<id>1528755597306</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -354,7 +354,7 @@
</matcher>
</filter>
<filter>
<id>1461598462030</id>
<id>1528755597310</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -363,7 +363,7 @@
</matcher>
</filter>
<filter>
<id>1461598462040</id>
<id>1528755597314</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -372,7 +372,7 @@
</matcher>
</filter>
<filter>
<id>1461598462040</id>
<id>1528755597318</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -381,7 +381,7 @@
</matcher>
</filter>
<filter>
<id>1461598462050</id>
<id>1528755597321</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
@ -389,6 +389,42 @@
<arguments>1.0-name-matches-false-false-AbortDelay.c</arguments>
</matcher>
</filter>
<filter>
<id>1528755597325</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-MessageBufferAMP.c</arguments>
</matcher>
</filter>
<filter>
<id>1528755597330</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-MessageBufferDemo.c</arguments>
</matcher>
</filter>
<filter>
<id>1528755597334</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-StreamBufferDemo.c</arguments>
</matcher>
</filter>
<filter>
<id>1528755597338</id>
<name>src/Full_Demo/Standard-Demo-Tasks/Minimal</name>
<type>5</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-StreamBufferInterrupt.c</arguments>
</matcher>
</filter>
<filter>
<id>1461598705091</id>
<name>src/lwIP_Demo/lwip-1.4.0/src/core</name>

View file

@ -78,7 +78,7 @@
#define configUSE_TICK_HOOK 1
#define configMAX_PRIORITIES ( 7 )
#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. */
#define configTOTAL_HEAP_SIZE ( 90 * 1024 )
#define configTOTAL_HEAP_SIZE ( 125 * 1024 )
#define configMAX_TASK_NAME_LEN ( 10 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0

View file

@ -110,6 +110,10 @@
#include "IntSemTest.h"
#include "StaticAllocation.h"
#include "AbortDelay.h"
#include "MessageBufferDemo.h"
#include "StreamBufferDemo.h"
#include "StreamBufferInterrupt.h"
#include "MessageBufferAMP.h"
/* Priorities for the demo application tasks. */
@ -149,6 +153,9 @@ purpose of ensuring parameters are passed into tasks correctly. */
/* The base period used by the timer test tasks. */
#define mainTIMER_TEST_PERIOD ( 50 )
/* Base stack size of tasks created in the message buffer demos. */
#define mainMESSAGE_BUFFER_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 )
/*-----------------------------------------------------------*/
@ -221,6 +228,10 @@ void main_full( void )
vStartInterruptSemaphoreTasks();
vStartStaticallyAllocatedTasks();
vCreateAbortDelayTasks();
vStartMessageBufferTasks( mainMESSAGE_BUFFER_STACK_SIZE );
vStartStreamBufferTasks();
vStartStreamBufferInterruptDemo();
vStartMessageBufferAMPTasks( mainMESSAGE_BUFFER_STACK_SIZE );
/* Start the tasks that implements the command console on the UART, as
described above. */
@ -372,17 +383,37 @@ unsigned long ulErrorFound = pdFALSE;
ulErrorFound |= 1UL << 16UL;
}
if( xAreStreamBufferTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 17UL;
}
if( xAreMessageBufferTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 18UL;
}
if( xIsInterruptStreamBufferDemoStillRunning() != pdPASS )
{
ulErrorFound |= 1UL << 19UL;
}
if( xAreMessageBufferAMPTasksStillRunning() != pdPASS )
{
ulErrorFound |= 1UL << 20UL;
}
/* Check that the register test 1 task is still running. */
if( ulLastRegTest1Value == ulRegTest1LoopCounter )
{
ulErrorFound |= 1UL << 17UL;
ulErrorFound |= 1UL << 21UL;
}
ulLastRegTest1Value = ulRegTest1LoopCounter;
/* Check that the register test 2 task is still running. */
if( ulLastRegTest2Value == ulRegTest2LoopCounter )
{
ulErrorFound |= 1UL << 18UL;
ulErrorFound |= 1UL << 22UL;
}
ulLastRegTest2Value = ulRegTest2LoopCounter;

View file

@ -76,6 +76,8 @@
#include "EventGroupsDemo.h"
#include "TaskNotify.h"
#include "IntSemTest.h"
#include "StreamBufferInterrupt.h"
#include "StreamBufferDemo.h"
/* Xilinx includes. */
#include "platform.h"
@ -293,6 +295,14 @@ void vApplicationTickHook( void )
/* Use mutexes from interrupts. */
vInterruptSemaphorePeriodicTest();
/* Writes to stream buffer byte by byte to test the stream buffer trigger
level functionality. */
vPeriodicStreamBufferProcessing();
/* Writes a string to a string buffer four bytes at a time to demonstrate
a stream being sent from an interrupt to a task. */
vBasicStreamBufferSendFromISR();
/* Test flop alignment in interrupts - calling printf from an interrupt
is BAD! */
#if( configASSERT_DEFINED == 1 )