copy %COMMON_SOURCE%\recmutex.c src\Common-Demo-Source\r
copy %COMMON_SOURCE%\countsem.c src\Common-Demo-Source\r
copy %COMMON_SOURCE%\integer.c src\Common-Demo-Source\r
+ copy %COMMON_SOURCE%\QueueSet.c src\Common-Demo-Source\r
\r
REM Copy the common demo file headers.\r
copy %COMMON_INCLUDE%\*.h src\Common-Demo-Source\include\r
<Name>$(MSBuildProjectName)</Name>\r
<AssemblyName>$(MSBuildProjectName)</AssemblyName>\r
<RootNamespace>$(MSBuildProjectName)</RootNamespace>\r
- <AsfVersion>3.1.3</AsfVersion>\r
+ <AsfVersion>2.11.1</AsfVersion>\r
<AsfFrameworkConfig>\r
<framework-data>\r
<options>\r
<avrtoolinterface>JTAG</avrtoolinterface>\r
<avrtool>com.atmel.avrdbg.tool.samice</avrtool>\r
<com_atmel_avrdbg_tool_samice>\r
- <ToolType xmlns="">com.atmel.avrdbg.tool.samice</ToolType>\r
- <ToolName xmlns="">SAM-ICE</ToolName>\r
- <ToolNumber xmlns="">000158000789</ToolNumber>\r
- <KeepTimersRunning xmlns="">true</KeepTimersRunning>\r
- <OverrideVtor xmlns="">false</OverrideVtor>\r
- <OverrideVtorValue xmlns="">\r
+ <ToolType>com.atmel.avrdbg.tool.samice</ToolType>\r
+ <ToolName>J-Link</ToolName>\r
+ <ToolNumber>000158008149</ToolNumber>\r
+ <KeepTimersRunning>true</KeepTimersRunning>\r
+ <OverrideVtor>false</OverrideVtor>\r
+ <OverrideVtorValue>\r
</OverrideVtorValue>\r
- <Channel xmlns="">\r
+ <Channel>\r
<host>127.0.0.1</host>\r
- <port>3166</port>\r
+ <port>1637</port>\r
<ssl>False</ssl>\r
</Channel>\r
- <ToolOptions xmlns="">\r
+ <ToolOptions>\r
<InterfaceName>JTAG</InterfaceName>\r
<InterfaceProperties>\r
<JtagDbgClock>4000000</JtagDbgClock>\r
<Compile Include="src\Common-Demo-Source\include\demo_serial.h">\r
<SubType>compile</SubType>\r
</Compile>\r
+ <Compile Include="src\Common-Demo-Source\QueueSet.c">\r
+ <SubType>compile</SubType>\r
+ </Compile>\r
<Compile Include="src\serial.c">\r
<SubType>compile</SubType>\r
</Compile>\r
/*\r
FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT \r
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
FreeRTOS WEB site.\r
\r
1 tab == 4 spaces!\r
- \r
+\r
***************************************************************************\r
* *\r
* Having a problem? Start by reading the FAQ "My application does *\r
* *\r
***************************************************************************\r
\r
- \r
- http://www.FreeRTOS.org - Documentation, training, latest versions, license \r
- and contact details. \r
- \r
+\r
+ http://www.FreeRTOS.org - Documentation, training, latest versions, license\r
+ and contact details.\r
+\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool.\r
\r
- Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell \r
- the code with commercial support, indemnification, and middleware, under \r
+ Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell\r
+ the code with commercial support, indemnification, and middleware, under\r
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also\r
- provide a safety engineered and independently SIL3 certified version under \r
+ provide a safety engineered and independently SIL3 certified version under\r
the SafeRTOS brand: http://www.SafeRTOS.com.\r
*/\r
\r
#ifndef FREERTOS_CONFIG_H\r
#define FREERTOS_CONFIG_H\r
\r
-/* \r
+/*\r
* The following #error directive is to remind users that a batch file must be\r
- * executed prior to this project being built. Once it has been executed \r
+ * executed prior to this project being built. Once it has been executed\r
* remove the #error line below.\r
*/\r
-#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.\r
+//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.\r
\r
/*-----------------------------------------------------------\r
* Application specific definitions.\r
\r
#define configUSE_PREEMPTION 1\r
#define configUSE_IDLE_HOOK 0\r
-#define configUSE_TICK_HOOK 0\r
+#define configUSE_TICK_HOOK 1\r
#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )\r
#define configUSE_MALLOC_FAILED_HOOK 1\r
#define configUSE_APPLICATION_TASK_TAG 0\r
#define configUSE_COUNTING_SEMAPHORES 1\r
+#define configUSE_QUEUE_SETS 1\r
#define configGENERATE_RUN_TIME_STATS 0\r
\r
/* Co-routine definitions. */\r
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!\r
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */\r
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
- \r
+\r
/* Normal assert() semantics without relying on the provision of an assert.h\r
header file. */\r
-#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } \r
- \r
+#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }\r
+\r
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS\r
standard names. */\r
#define vPortSVCHandler SVC_Handler\r
/*\r
FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT \r
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
FreeRTOS WEB site.\r
\r
1 tab == 4 spaces!\r
- \r
+\r
***************************************************************************\r
* *\r
* Having a problem? Start by reading the FAQ "My application does *\r
* *\r
***************************************************************************\r
\r
- \r
- http://www.FreeRTOS.org - Documentation, training, latest versions, license \r
- and contact details. \r
- \r
+\r
+ http://www.FreeRTOS.org - Documentation, training, latest versions, license\r
+ and contact details.\r
+\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool.\r
\r
- Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell \r
- the code with commercial support, indemnification, and middleware, under \r
+ Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell\r
+ the code with commercial support, indemnification, and middleware, under\r
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also\r
- provide a safety engineered and independently SIL3 certified version under \r
+ provide a safety engineered and independently SIL3 certified version under\r
the SafeRTOS brand: http://www.SafeRTOS.com.\r
*/\r
\r
*/\r
static void prvSetupHardware( void );\r
\r
-/* \r
+/*\r
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
- * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0. \r
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
*/\r
extern void main_blinky( void );\r
extern void main_full( void );\r
\r
/* Ensure all priority bits are assigned as preemption priority bits. */\r
NVIC_SetPriorityGrouping( 0 );\r
- \r
+\r
/* Atmel library function to setup for the evaluation kit being used. */\r
board_init();\r
\r
- /* Perform any configuration necessary to use the ParTest LED output \r
+ /* Perform any configuration necessary to use the ParTest LED output\r
functions. */\r
vParTestInitialise();\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationTickHook( void )\r
-{\r
- /* This function will be called by each tick interrupt if \r
- configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be\r
- added here, but the tick hook is called from an interrupt context, so\r
- code must not attempt to block, and only the interrupt safe FreeRTOS API\r
- functions can be used (those that end in FromISR()). */\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
}\r
/*-----------------------------------------------------------*/\r
\r
+void vApplicationTickHook( void )\r
+{\r
+ /* This function will be called by each tick interrupt if\r
+ configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be\r
+ added here, but the tick hook is called from an interrupt context, so\r
+ code must not attempt to block, and only the interrupt safe FreeRTOS API\r
+ functions can be used (those that end in FromISR()). */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
/*\r
FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT \r
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
FreeRTOS WEB site.\r
\r
1 tab == 4 spaces!\r
- \r
+\r
***************************************************************************\r
* *\r
* Having a problem? Start by reading the FAQ "My application does *\r
* *\r
***************************************************************************\r
\r
- \r
- http://www.FreeRTOS.org - Documentation, training, latest versions, license \r
- and contact details. \r
- \r
+\r
+ http://www.FreeRTOS.org - Documentation, training, latest versions, license\r
+ and contact details.\r
+\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool.\r
\r
- Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell \r
- the code with commercial support, indemnification, and middleware, under \r
+ Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell\r
+ the code with commercial support, indemnification, and middleware, under\r
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also\r
- provide a safety engineered and independently SIL3 certified version under \r
+ provide a safety engineered and independently SIL3 certified version under\r
the SafeRTOS brand: http://www.SafeRTOS.com.\r
*/\r
\r
******************************************************************************\r
*\r
* main_full() creates all the demo application tasks and a software timer, then\r
- * starts the scheduler. The web documentation provides more details of the \r
- * standard demo application tasks, which provide no particular functionality, \r
+ * starts the scheduler. The web documentation provides more details of the\r
+ * standard demo application tasks, which provide no particular functionality,\r
* but do provide a good example of how to use the FreeRTOS API.\r
*\r
* In addition to the standard demo tasks, the following tasks and tests are\r
*\r
* "Check" timer - The check software timer period is initially set to three\r
* seconds. The callback function associated with the check software timer\r
- * checks that all the standard demo tasks are not only still executing, but \r
- * are executing without reporting any errors. If the check software timer \r
- * discovers that a task has either stalled, or reported an error, then it \r
- * changes its own execution period from the initial three seconds, to just \r
- * 200ms. The check software timer callback function also toggles the green \r
- * LED each time it is called. This provides a visual indication of the system \r
- * status: If the green LED toggles every three seconds, then no issues have \r
- * been discovered. If the green LED toggles every 200ms, then an issue has \r
+ * checks that all the standard demo tasks are not only still executing, but\r
+ * are executing without reporting any errors. If the check software timer\r
+ * discovers that a task has either stalled, or reported an error, then it\r
+ * changes its own execution period from the initial three seconds, to just\r
+ * 200ms. The check software timer callback function also toggles the green\r
+ * LED each time it is called. This provides a visual indication of the system\r
+ * status: If the green LED toggles every three seconds, then no issues have\r
+ * been discovered. If the green LED toggles every 200ms, then an issue has\r
* been discovered with at least one task.\r
*\r
* See the documentation page for this demo on the FreeRTOS.org web site for\r
- * full information, including hardware setup requirements. \r
+ * full information, including hardware setup requirements.\r
*/\r
\r
/* Standard includes. */\r
#include "flash_timer.h"\r
#include "partest.h"\r
#include "comtest2.h"\r
-\r
+#include "QueueSet.h"\r
\r
/* Atmel library includes. */\r
#include "asf.h"\r
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
vStartLEDFlashTimers( mainNUMBER_OF_FLASH_TIMERS_LEDS );\r
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );\r
- \r
+ vStartQueueSetTasks();\r
+\r
/* Create the software timer that performs the 'check' functionality,\r
as described at the top of this file. */\r
xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
- ); \r
- \r
+ );\r
+\r
if( xCheckTimer != NULL )\r
{\r
xTimerStart( xCheckTimer, mainDONT_BLOCK );\r
}\r
\r
- /* The set of tasks created by the following function call have to be \r
- created last as they keep account of the number of tasks they expect to see \r
+ /* The set of tasks created by the following function call have to be\r
+ created last as they keep account of the number of tasks they expect to see\r
running. */\r
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
\r
/* Start the scheduler. */\r
vTaskStartScheduler();\r
- \r
+\r
/* If all is well, the scheduler will now be running, and the following line\r
will never be reached. If the following line does execute, then there was\r
insufficient FreeRTOS heap memory available for the idle and/or timer tasks\r
to be created. See the memory management section on the FreeRTOS web site\r
for more details. */\r
- for( ;; ); \r
+ for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
ulErrorFound = pdTRUE;\r
}\r
- \r
+\r
if( xAreComTestTasksStillRunning() != pdTRUE )\r
{\r
ulErrorFound = pdTRUE;\r
}\r
\r
+ if( xAreQueueSetTasksStillRunning() != pdPASS )\r
+ {\r
+ ulErrorFound = pdTRUE;\r
+ }\r
+\r
/* Toggle the check LED to give an indication of the system status. If\r
the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then\r
everything is ok. A faster toggle indicates an error. */\r
vParTestToggleLED( mainCHECK_LED );\r
- \r
+\r
/* Have any errors been latch in ulErrorFound? If so, shorten the\r
period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds.\r
This will result in an increase in the rate at which mainCHECK_LED\r
if( lChangedTimerPeriodAlready == pdFALSE )\r
{\r
lChangedTimerPeriodAlready = pdTRUE;\r
- \r
+\r
/* This call to xTimerChangePeriod() uses a zero block time.\r
Functions called from inside of a timer callback function must\r
*never* attempt to block. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
+void vApplicationTickHook( void )\r
+{\r
+ /* This function will be called by each tick interrupt if\r
+ configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be\r
+ added here, but the tick hook is called from an interrupt context, so\r
+ code must not attempt to block, and only the interrupt safe FreeRTOS API\r
+ functions can be used (those that end in FromISR()). In this case the tick\r
+ hook is used as part of the queue set test. */\r
+ vQueueSetWriteToQueueFromISR();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r