mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Complete testing of changes that allow xQueueOverwrite() to be used on a queue that is part of a queue set.
Fix some compiler warnings in stream_buffer.c. Update the MingW/Eclipse project so it also includes static allocation tests.
This commit is contained in:
parent
f9bef06ec0
commit
c156522695
|
@ -624,7 +624,7 @@ const UBaseType_t xLengthOfOne = ( UBaseType_t ) 1;
|
||||||
/* Add an item to the queue then ensure the queue set correctly
|
/* Add an item to the queue then ensure the queue set correctly
|
||||||
indicates that one item is available, and that that item is indeed the
|
indicates that one item is available, and that that item is indeed the
|
||||||
queue written to. */
|
queue written to. */
|
||||||
xQueueSend( xQueueHandle, ( void * ) &ulValueToSend, 0 );
|
xQueueOverwrite( xQueueHandle, ( void * ) &ulValueToSend );
|
||||||
if( uxQueueMessagesWaiting( xQueueSet ) != ( UBaseType_t ) 1 )
|
if( uxQueueMessagesWaiting( xQueueSet ) != ( UBaseType_t ) 1 )
|
||||||
{
|
{
|
||||||
/* Expected one item in the queue set. */
|
/* Expected one item in the queue set. */
|
||||||
|
|
|
@ -600,7 +600,7 @@ BaseType_t xNonBlockingReceiveError = pdFALSE;
|
||||||
xBytesToSend = xStringLength - xNextChar;
|
xBytesToSend = xStringLength - xNextChar;
|
||||||
|
|
||||||
/* Attempt to send right up to the end of the string. */
|
/* Attempt to send right up to the end of the string. */
|
||||||
xBytesActuallySent = xStreamBufferSend( xStreamBuffer, ( void * ) &( pc55ByteString[ xNextChar ] ), xBytesToSend, xTicksToWait );
|
xBytesActuallySent = xStreamBufferSend( xStreamBuffer, ( const void * ) &( pc55ByteString[ xNextChar ] ), xBytesToSend, xTicksToWait );
|
||||||
configASSERT( xBytesActuallySent <= xBytesToSend );
|
configASSERT( xBytesActuallySent <= xBytesToSend );
|
||||||
|
|
||||||
/* Move the index up the string to the next character to be sent,
|
/* Move the index up the string to the next character to be sent,
|
||||||
|
@ -661,7 +661,7 @@ BaseType_t xNonBlockingReceiveError = pdFALSE;
|
||||||
} while( xReceivedLength == 0 );
|
} while( xReceivedLength == 0 );
|
||||||
|
|
||||||
/* Ensure the received string matches the expected string. */
|
/* Ensure the received string matches the expected string. */
|
||||||
configASSERT( memcmp( ( void * ) cRxString, ( void * ) &( pc55ByteString[ xNextChar ] ), xReceivedLength ) == 0 );
|
configASSERT( memcmp( ( void * ) cRxString, ( const void * ) &( pc55ByteString[ xNextChar ] ), xReceivedLength ) == 0 );
|
||||||
|
|
||||||
/* Move the index into the string up to the end of the bytes
|
/* Move the index into the string up to the end of the bytes
|
||||||
received so far - wrapping if the end of the string has been
|
received so far - wrapping if the end of the string has been
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239">
|
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239">
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239" moduleId="org.eclipse.cdt.core.settings" name="Debug_Full">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
|
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="Everything Enabled" id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239" name="Debug_Full" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
|
||||||
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239." name="/" resourcePath="">
|
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239." name="/" resourcePath="">
|
||||||
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1619684599" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
|
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1619684599" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
|
||||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1827277435" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
|
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1827277435" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
|
||||||
|
@ -64,16 +64,6 @@
|
||||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.500696043" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
|
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.500696043" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.396692239.363521217" name="/" resourcePath="FreeRTOS+Trace Recorder/streamports">
|
|
||||||
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.2001714173" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug" unusedChildren="">
|
|
||||||
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.484223068" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2050893079"/>
|
|
||||||
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1176918279" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base.867063893"/>
|
|
||||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1512464009" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1190873987"/>
|
|
||||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.666862055" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1285167012"/>
|
|
||||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1503833368" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2080839343"/>
|
|
||||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.2108315890" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.500696043"/>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="FreeRTOS+Trace Recorder/streamports" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="FreeRTOS+Trace Recorder/streamports" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948166</id>
|
<id>1520280722235</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948169</id>
|
<id>1520280722238</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948172</id>
|
<id>1520280722242</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948176</id>
|
<id>1520280722245</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948179</id>
|
<id>1520280722248</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948183</id>
|
<id>1520280722252</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948186</id>
|
<id>1520280722255</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948190</id>
|
<id>1520280722260</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948195</id>
|
<id>1520280722266</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948199</id>
|
<id>1520280722269</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948202</id>
|
<id>1520280722274</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948213</id>
|
<id>1520280722279</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948216</id>
|
<id>1520280722282</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948224</id>
|
<id>1520280722286</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948228</id>
|
<id>1520280722289</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948231</id>
|
<id>1520280722292</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948235</id>
|
<id>1520280722296</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948237</id>
|
<id>1520280722342</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948240</id>
|
<id>1520280722367</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -227,7 +227,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948242</id>
|
<id>1520280722370</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -236,7 +236,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948269</id>
|
<id>1520280722374</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948274</id>
|
<id>1520280722380</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948277</id>
|
<id>1520280722384</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948281</id>
|
<id>1520280722388</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1519407948286</id>
|
<id>1520280722391</id>
|
||||||
<name>Standard_Demo_Tasks</name>
|
<name>Standard_Demo_Tasks</name>
|
||||||
<type>5</type>
|
<type>5</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
|
@ -280,6 +280,15 @@
|
||||||
<arguments>1.0-name-matches-false-false-MessageBufferAMP.c</arguments>
|
<arguments>1.0-name-matches-false-false-MessageBufferAMP.c</arguments>
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1520280722395</id>
|
||||||
|
<name>Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-StaticAllocation.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<id>0</id>
|
<id>0</id>
|
||||||
<name>FreeRTOS_Source/portable</name>
|
<name>FreeRTOS_Source/portable</name>
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
#define configUSE_ALTERNATIVE_API 0
|
#define configUSE_ALTERNATIVE_API 0
|
||||||
#define configUSE_QUEUE_SETS 1
|
#define configUSE_QUEUE_SETS 1
|
||||||
#define configUSE_TASK_NOTIFICATIONS 1
|
#define configUSE_TASK_NOTIFICATIONS 1
|
||||||
#define configSUPPORT_STATIC_ALLOCATION 0
|
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||||
|
|
||||||
/* Software timer related configuration options. */
|
/* Software timer related configuration options. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
|
@ -114,7 +114,7 @@ uses the same semantics as the standard C assert() macro. */
|
||||||
extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName );
|
extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName );
|
||||||
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __LINE__, __FILE__ )
|
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __LINE__, __FILE__ )
|
||||||
|
|
||||||
#define configINCLUDE_MESSAGE_BUFFER_AMP_DEMO 1
|
#define configINCLUDE_MESSAGE_BUFFER_AMP_DEMO 0
|
||||||
#if ( configINCLUDE_MESSAGE_BUFFER_AMP_DEMO == 1 )
|
#if ( configINCLUDE_MESSAGE_BUFFER_AMP_DEMO == 1 )
|
||||||
extern void vGenerateCoreBInterrupt( void * xUpdatedMessageBuffer );
|
extern void vGenerateCoreBInterrupt( void * xUpdatedMessageBuffer );
|
||||||
#define sbSEND_COMPLETED( pxStreamBuffer ) vGenerateCoreBInterrupt( pxStreamBuffer )
|
#define sbSEND_COMPLETED( pxStreamBuffer ) vGenerateCoreBInterrupt( pxStreamBuffer )
|
||||||
|
|
|
@ -75,9 +75,9 @@ that make up the total heap. heap_5 is only used for test and example purposes
|
||||||
as this demo could easily create one large heap region instead of multiple
|
as this demo could easily create one large heap region instead of multiple
|
||||||
smaller heap regions - in which case heap_4.c would be the more appropriate
|
smaller heap regions - in which case heap_4.c would be the more appropriate
|
||||||
choice. See http://www.freertos.org/a00111.html for an explanation. */
|
choice. See http://www.freertos.org/a00111.html for an explanation. */
|
||||||
#define mainREGION_1_SIZE 7201
|
#define mainREGION_1_SIZE 8201
|
||||||
#define mainREGION_2_SIZE 29905
|
#define mainREGION_2_SIZE 29905
|
||||||
#define mainREGION_3_SIZE 6407
|
#define mainREGION_3_SIZE 6007
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -111,6 +111,8 @@ void vApplicationMallocFailedHook( void );
|
||||||
void vApplicationIdleHook( void );
|
void vApplicationIdleHook( void );
|
||||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
|
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
|
||||||
void vApplicationTickHook( void );
|
void vApplicationTickHook( void );
|
||||||
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
|
||||||
|
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Writes trace data to a disk file when the trace recording is stopped.
|
* Writes trace data to a disk file when the trace recording is stopped.
|
||||||
|
@ -118,6 +120,15 @@ void vApplicationTickHook( void );
|
||||||
*/
|
*/
|
||||||
static void prvSaveTraceFile( void );
|
static void prvSaveTraceFile( void );
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* When configSUPPORT_STATIC_ALLOCATION is set to 1 the application writer can
|
||||||
|
use a callback function to optionally provide the memory required by the idle
|
||||||
|
and timer tasks. This is the stack that will be used by the timer task. It is
|
||||||
|
declared here, as a global, so it can be checked by a test that is implemented
|
||||||
|
in a different file. */
|
||||||
|
StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
|
||||||
|
|
||||||
/* Notes if the trace is running or not. */
|
/* Notes if the trace is running or not. */
|
||||||
static BaseType_t xTraceRunning = pdTRUE;
|
static BaseType_t xTraceRunning = pdTRUE;
|
||||||
|
|
||||||
|
@ -341,3 +352,52 @@ const HeapRegion_t xHeapRegions[] =
|
||||||
vPortDefineHeapRegions( xHeapRegions );
|
vPortDefineHeapRegions( xHeapRegions );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an
|
||||||
|
implementation of vApplicationGetIdleTaskMemory() to provide the memory that is
|
||||||
|
used by the Idle task. */
|
||||||
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
|
||||||
|
{
|
||||||
|
/* If the buffers to be provided to the Idle task are declared inside this
|
||||||
|
function then they must be declared static - otherwise they will be allocated on
|
||||||
|
the stack and so not exists after this function exits. */
|
||||||
|
static StaticTask_t xIdleTaskTCB;
|
||||||
|
static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
|
||||||
|
|
||||||
|
/* Pass out a pointer to the StaticTask_t structure in which the Idle task's
|
||||||
|
state will be stored. */
|
||||||
|
*ppxIdleTaskTCBBuffer = &xIdleTaskTCB;
|
||||||
|
|
||||||
|
/* Pass out the array that will be used as the Idle task's stack. */
|
||||||
|
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
|
||||||
|
|
||||||
|
/* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer.
|
||||||
|
Note that, as the array is necessarily of type StackType_t,
|
||||||
|
configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
||||||
|
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
|
||||||
|
application must provide an implementation of vApplicationGetTimerTaskMemory()
|
||||||
|
to provide the memory that is used by the Timer service task. */
|
||||||
|
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize )
|
||||||
|
{
|
||||||
|
/* If the buffers to be provided to the Timer task are declared inside this
|
||||||
|
function then they must be declared static - otherwise they will be allocated on
|
||||||
|
the stack and so not exists after this function exits. */
|
||||||
|
static StaticTask_t xTimerTaskTCB;
|
||||||
|
|
||||||
|
/* Pass out a pointer to the StaticTask_t structure in which the Timer
|
||||||
|
task's state will be stored. */
|
||||||
|
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
|
||||||
|
|
||||||
|
/* Pass out the array that will be used as the Timer task's stack. */
|
||||||
|
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
|
||||||
|
|
||||||
|
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
|
||||||
|
Note that, as the array is necessarily of type StackType_t,
|
||||||
|
configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
||||||
|
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,10 @@
|
||||||
|
|
||||||
/* Kernel includes. */
|
/* Kernel includes. */
|
||||||
#include <FreeRTOS.h>
|
#include <FreeRTOS.h>
|
||||||
#include "task.h"
|
#include <task.h>
|
||||||
#include "queue.h"
|
#include <queue.h>
|
||||||
#include "timers.h"
|
#include <timers.h>
|
||||||
#include "semphr.h"
|
#include <semphr.h>
|
||||||
|
|
||||||
/* Standard demo includes. */
|
/* Standard demo includes. */
|
||||||
#include "BlockQ.h"
|
#include "BlockQ.h"
|
||||||
|
@ -98,6 +98,7 @@
|
||||||
#include "IntSemTest.h"
|
#include "IntSemTest.h"
|
||||||
#include "TaskNotify.h"
|
#include "TaskNotify.h"
|
||||||
#include "QueueSetPolling.h"
|
#include "QueueSetPolling.h"
|
||||||
|
#include "StaticAllocation.h"
|
||||||
#include "blocktim.h"
|
#include "blocktim.h"
|
||||||
#include "AbortDelay.h"
|
#include "AbortDelay.h"
|
||||||
#include "MessageBufferDemo.h"
|
#include "MessageBufferDemo.h"
|
||||||
|
@ -209,6 +210,12 @@ int main_full( void )
|
||||||
vStartStreamBufferInterruptDemo();
|
vStartStreamBufferInterruptDemo();
|
||||||
vStartMessageBufferAMPTasks();
|
vStartMessageBufferAMPTasks();
|
||||||
|
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
{
|
||||||
|
vStartStaticallyAllocatedTasks();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if( configUSE_PREEMPTION != 0 )
|
#if( configUSE_PREEMPTION != 0 )
|
||||||
{
|
{
|
||||||
/* Don't expect these tasks to pass when preemption is not used. */
|
/* Don't expect these tasks to pass when preemption is not used. */
|
||||||
|
@ -577,6 +584,7 @@ char *pcTaskName;
|
||||||
static portBASE_TYPE xPerformedOneShotTests = pdFALSE;
|
static portBASE_TYPE xPerformedOneShotTests = pdFALSE;
|
||||||
TaskHandle_t xTestTask;
|
TaskHandle_t xTestTask;
|
||||||
TaskStatus_t xTaskInfo;
|
TaskStatus_t xTaskInfo;
|
||||||
|
extern StackType_t uxTimerTaskStack[];
|
||||||
|
|
||||||
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and
|
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and
|
||||||
xTaskGetIdleTaskHandle() functions. Also try using the function that sets
|
xTaskGetIdleTaskHandle() functions. Also try using the function that sets
|
||||||
|
@ -637,6 +645,7 @@ TaskStatus_t xTaskInfo;
|
||||||
if( ( xTaskInfo.eCurrentState != eBlocked ) ||
|
if( ( xTaskInfo.eCurrentState != eBlocked ) ||
|
||||||
( strcmp( xTaskInfo.pcTaskName, "Tmr Svc" ) != 0 ) ||
|
( strcmp( xTaskInfo.pcTaskName, "Tmr Svc" ) != 0 ) ||
|
||||||
( xTaskInfo.uxCurrentPriority != configTIMER_TASK_PRIORITY ) ||
|
( xTaskInfo.uxCurrentPriority != configTIMER_TASK_PRIORITY ) ||
|
||||||
|
( xTaskInfo.pxStackBase != uxTimerTaskStack ) ||
|
||||||
( xTaskInfo.xHandle != xTimerTaskHandle ) )
|
( xTaskInfo.xHandle != xTimerTaskHandle ) )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: vTaskGetInfo() returned incorrect information about the timer task";
|
pcStatusMessage = "Error: vTaskGetInfo() returned incorrect information about the timer task";
|
||||||
|
|
Loading…
Reference in a new issue