Add the queue set test to the SAM4S-EK Atmel Studio code.

This commit is contained in:
Richard Barry 2013-02-08 16:10:13 +00:00
parent 232a5b3433
commit d328ae3bfc
7 changed files with 103 additions and 80 deletions

View File

@ -51,6 +51,7 @@ IF EXIST src\asf\thirdparty\FreeRTOS Goto END
copy %COMMON_SOURCE%\recmutex.c src\Common-Demo-Source
copy %COMMON_SOURCE%\countsem.c src\Common-Demo-Source
copy %COMMON_SOURCE%\integer.c src\Common-Demo-Source
copy %COMMON_SOURCE%\QueueSet.c src\Common-Demo-Source
REM Copy the common demo file headers.
copy %COMMON_INCLUDE%\*.h src\Common-Demo-Source\include

View File

@ -7,7 +7,7 @@
<Name>$(MSBuildProjectName)</Name>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<AsfVersion>3.1.3</AsfVersion>
<AsfVersion>2.11.1</AsfVersion>
<AsfFrameworkConfig>
<framework-data>
<options>
@ -154,19 +154,19 @@
<avrtoolinterface>JTAG</avrtoolinterface>
<avrtool>com.atmel.avrdbg.tool.samice</avrtool>
<com_atmel_avrdbg_tool_samice>
<ToolType xmlns="">com.atmel.avrdbg.tool.samice</ToolType>
<ToolName xmlns="">SAM-ICE</ToolName>
<ToolNumber xmlns="">000158000789</ToolNumber>
<KeepTimersRunning xmlns="">true</KeepTimersRunning>
<OverrideVtor xmlns="">false</OverrideVtor>
<OverrideVtorValue xmlns="">
<ToolType>com.atmel.avrdbg.tool.samice</ToolType>
<ToolName>J-Link</ToolName>
<ToolNumber>000158008149</ToolNumber>
<KeepTimersRunning>true</KeepTimersRunning>
<OverrideVtor>false</OverrideVtor>
<OverrideVtorValue>
</OverrideVtorValue>
<Channel xmlns="">
<Channel>
<host>127.0.0.1</host>
<port>3166</port>
<port>1637</port>
<ssl>False</ssl>
</Channel>
<ToolOptions xmlns="">
<ToolOptions>
<InterfaceName>JTAG</InterfaceName>
<InterfaceProperties>
<JtagDbgClock>4000000</JtagDbgClock>
@ -425,6 +425,9 @@
<Compile Include="src\Common-Demo-Source\include\demo_serial.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="src\Common-Demo-Source\QueueSet.c">
<SubType>compile</SubType>
</Compile>
<Compile Include="src\serial.c">
<SubType>compile</SubType>
</Compile>

View File

@ -75,7 +75,7 @@
* executed prior to this project being built. Once it has been executed
* remove the #error line below.
*/
#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
/*-----------------------------------------------------------
* Application specific definitions.
@ -94,7 +94,7 @@ extern uint32_t SystemCoreClock;
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configUSE_TICK_HOOK 1
#define configCPU_CLOCK_HZ ( SystemCoreClock )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
@ -111,6 +111,7 @@ extern uint32_t SystemCoreClock;
#define configUSE_MALLOC_FAILED_HOOK 1
#define configUSE_APPLICATION_TASK_TAG 0
#define configUSE_COUNTING_SEMAPHORES 1
#define configUSE_QUEUE_SETS 1
#define configGENERATE_RUN_TIME_STATS 0
/* Co-routine definitions. */

View File

@ -200,13 +200,3 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName
}
/*-----------------------------------------------------------*/
void vApplicationTickHook( void )
{
/* This function will be called by each tick interrupt if
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
added here, but the tick hook is called from an interrupt context, so
code must not attempt to block, and only the interrupt safe FreeRTOS API
functions can be used (those that end in FromISR()). */
}
/*-----------------------------------------------------------*/

View File

@ -240,3 +240,13 @@ unsigned long ulReceivedValue;
}
/*-----------------------------------------------------------*/
void vApplicationTickHook( void )
{
/* This function will be called by each tick interrupt if
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
added here, but the tick hook is called from an interrupt context, so
code must not attempt to block, and only the interrupt safe FreeRTOS API
functions can be used (those that end in FromISR()). */
}
/*-----------------------------------------------------------*/

View File

@ -125,7 +125,7 @@
#include "flash_timer.h"
#include "partest.h"
#include "comtest2.h"
#include "QueueSet.h"
/* Atmel library includes. */
#include "asf.h"
@ -194,6 +194,7 @@ xTimerHandle xCheckTimer = NULL;
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
vStartLEDFlashTimers( mainNUMBER_OF_FLASH_TIMERS_LEDS );
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
vStartQueueSetTasks();
/* Create the software timer that performs the 'check' functionality,
as described at the top of this file. */
@ -284,6 +285,11 @@ unsigned long ulErrorFound = pdFALSE;
ulErrorFound = pdTRUE;
}
if( xAreQueueSetTasksStillRunning() != pdPASS )
{
ulErrorFound = pdTRUE;
}
/* Toggle the check LED to give an indication of the system status. If
the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then
everything is ok. A faster toggle indicates an error. */
@ -308,3 +314,15 @@ unsigned long ulErrorFound = pdFALSE;
}
/*-----------------------------------------------------------*/
void vApplicationTickHook( void )
{
/* This function will be called by each tick interrupt if
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
added here, but the tick hook is called from an interrupt context, so
code must not attempt to block, and only the interrupt safe FreeRTOS API
functions can be used (those that end in FromISR()). In this case the tick
hook is used as part of the queue set test. */
vQueueSetWriteToQueueFromISR();
}
/*-----------------------------------------------------------*/