forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new QEMU test project to improve stream/message buffer tests (Fre…
…eRTOS#168) * Add Eclipse/GCC project that targets the LM3S8962 QEMU model. * Get the Cortex-M QEMU project working. * Continue working on making stream buffer demo more robust and QEMU project. * Rename directory CORTEX_LM3S8986_QEMU to CORTEX_LM3S6965_QEMU. Work on making the Stream Buffer tests more robust. Check in before adding in the trace recorder. * Rename CORTEX_LM3S6969_QEMU to CORTEX_LM3S6969_GCC_QEMU. * Make the StreamBufferDemo.c common demo file (test file) more robust to other test tasks running at an equally high priority. * Work in progress checkin only - comments in main.c are incorrect. * Correct comments at the top of FreeRTOS/Demo/CORTEX_LM3S6965_GCC_QEMU/main.c Make the message buffer tests more robust in the case the a message buffer becomes full when prvSenderTask() has a higher priority than the reader task. * Disable trace recorder in the LM3S6965 QEMU demo. * I'm dropping FreeRTOS-Kernel reference update, since this seems to break the CMBC CI. Co-authored-by: Yuhui Zheng <[email protected]>
- Loading branch information
1 parent
157a7fc
commit 0e0edd9
Showing
23 changed files
with
4,139 additions
and
28 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>RTOSDemo</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<triggers>clean,full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
</natures> | ||
<linkedResources> | ||
<link> | ||
<name>CommonDemoFiles</name> | ||
<type>2</type> | ||
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/Minimal</locationURI> | ||
</link> | ||
<link> | ||
<name>FreeRTOS+Trace Recorder</name> | ||
<type>2</type> | ||
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace</locationURI> | ||
</link> | ||
<link> | ||
<name>FreeRTOS_Source</name> | ||
<type>2</type> | ||
<locationURI>FREERTOS_ROOT/FreeRTOS/Source</locationURI> | ||
</link> | ||
<link> | ||
<name>LegacyDrivers</name> | ||
<type>2</type> | ||
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/drivers/LuminaryMicro</locationURI> | ||
</link> | ||
<link> | ||
<name>CommonDemoFiles/include</name> | ||
<type>2</type> | ||
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/include</locationURI> | ||
</link> | ||
</linkedResources> | ||
<filteredResources> | ||
<filter> | ||
<id>1595186095257</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-IntQueue.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095263</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-recmutex.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095270</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-blocktim.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095276</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-semtest.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095310</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-QPeek.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095317</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-QueueSet.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095323</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-EventGroupsDemo.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595186095329</id> | ||
<name>CommonDemoFiles</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>1595186095335</id> | ||
<name>CommonDemoFiles</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>1595186095356</id> | ||
<name>CommonDemoFiles</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-death.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595791773655</id> | ||
<name>FreeRTOS+Trace Recorder</name> | ||
<type>9</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-Include</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595791773708</id> | ||
<name>FreeRTOS+Trace Recorder</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-trcKernelPort.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1595791773801</id> | ||
<name>FreeRTOS+Trace Recorder</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-trcSnapshotRecorder.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1590288652117</id> | ||
<name>FreeRTOS_Source</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-*.c</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1590288057189</id> | ||
<name>FreeRTOS_Source/portable</name> | ||
<type>9</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-GCC</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1590288057198</id> | ||
<name>FreeRTOS_Source/portable</name> | ||
<type>9</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-MemMang</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1590288101945</id> | ||
<name>FreeRTOS_Source/portable/GCC</name> | ||
<type>9</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-ARM_CM3</arguments> | ||
</matcher> | ||
</filter> | ||
<filter> | ||
<id>1590288021187</id> | ||
<name>FreeRTOS_Source/portable/MemMang</name> | ||
<type>5</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-name-matches-false-false-heap_4.c</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
<variableList> | ||
<variable> | ||
<name>FREERTOS_ROOT</name> | ||
<value>$%7BPARENT-3-PROJECT_LOC%7D</value> | ||
</variable> | ||
</variableList> | ||
</projectDescription> |
14 changes: 14 additions & 0 deletions
14
FreeRTOS/Demo/CORTEX_LM3S6965_GCC_QEMU/.settings/language.settings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<project> | ||
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1614661343" name="Debug"> | ||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> | ||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> | ||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> | ||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> | ||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-920242998058162869" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> | ||
<language-scope id="org.eclipse.cdt.core.gcc"/> | ||
<language-scope id="org.eclipse.cdt.core.g++"/> | ||
</provider> | ||
</extension> | ||
</configuration> | ||
</project> |
123 changes: 123 additions & 0 deletions
123
FreeRTOS/Demo/CORTEX_LM3S6965_GCC_QEMU/FreeRTOSConfig.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* | ||
* FreeRTOS Kernel V10.3.0 | ||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
* this software and associated documentation files (the "Software"), to deal in | ||
* the Software without restriction, including without limitation the rights to | ||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
* the Software, and to permit persons to whom the Software is furnished to do so, | ||
* subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* http://www.FreeRTOS.org | ||
* http://aws.amazon.com/freertos | ||
* | ||
* 1 tab == 4 spaces! | ||
*/ | ||
|
||
#ifndef FREERTOS_CONFIG_H | ||
#define FREERTOS_CONFIG_H | ||
|
||
/*----------------------------------------------------------- | ||
* Application specific definitions. | ||
* | ||
* These definitions should be adjusted for your particular hardware and | ||
* application requirements. | ||
* | ||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE | ||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. | ||
* | ||
* See http://www.freertos.org/a00110.html | ||
*----------------------------------------------------------*/ | ||
|
||
#define configUSE_PREEMPTION 1 | ||
#define configUSE_IDLE_HOOK 0 | ||
#define configUSE_TICK_HOOK 1 | ||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) | ||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) | ||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) | ||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) ) | ||
#define configMAX_TASK_NAME_LEN ( 12 ) | ||
#define configUSE_TRACE_FACILITY 1 | ||
#define configUSE_16_BIT_TICKS 0 | ||
#define configIDLE_SHOULD_YIELD 0 | ||
#define configUSE_CO_ROUTINES 0 | ||
#define configUSE_MUTEXES 1 | ||
#define configUSE_RECURSIVE_MUTEXES 1 | ||
#define configCHECK_FOR_STACK_OVERFLOW 2 | ||
#define configUSE_QUEUE_SETS 1 | ||
#define configUSE_COUNTING_SEMAPHORES 1 | ||
|
||
#define configMAX_PRIORITIES ( 6UL ) | ||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) | ||
#define configQUEUE_REGISTRY_SIZE 10 | ||
#define configSUPPORT_STATIC_ALLOCATION 1 | ||
|
||
/* Timer related defines. */ | ||
#define configUSE_TIMERS 1 | ||
#define configTIMER_TASK_PRIORITY 2 | ||
#define configTIMER_QUEUE_LENGTH 20 | ||
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) | ||
|
||
/* Set the following definitions to 1 to include the API function, or zero | ||
to exclude the API function. */ | ||
|
||
#define INCLUDE_vTaskPrioritySet 1 | ||
#define INCLUDE_uxTaskPriorityGet 1 | ||
#define INCLUDE_vTaskDelete 1 | ||
#define INCLUDE_vTaskCleanUpResources 0 | ||
#define INCLUDE_vTaskSuspend 1 | ||
#define INCLUDE_vTaskDelayUntil 1 | ||
#define INCLUDE_vTaskDelay 1 | ||
#define INCLUDE_uxTaskGetStackHighWaterMark 1 | ||
#define INCLUDE_xTaskGetSchedulerState 1 | ||
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1 | ||
#define INCLUDE_xTaskGetIdleTaskHandle 1 | ||
#define INCLUDE_xSemaphoreGetMutexHolder 1 | ||
#define INCLUDE_eTaskGetState 1 | ||
#define INCLUDE_xTimerPendFunctionCall 1 | ||
|
||
/* This demo makes use of one or more example stats formatting functions. These | ||
format the raw data provided by the uxTaskGetSystemState() function in to human | ||
readable ASCII form. See the notes in the implementation of vTaskList() within | ||
FreeRTOS/Source/tasks.c for limitations. */ | ||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1 | ||
|
||
#define configKERNEL_INTERRUPT_PRIORITY ( 255 ) /* All eight bits as QEMU doesn't model the priority bits. */ | ||
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! | ||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ | ||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 5 ) | ||
|
||
/* Use the Cortex-M3 optimised task selection rather than the generic C code | ||
version. */ | ||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 | ||
|
||
/* The test that checks the trigger level on stream buffers requires an | ||
allowable margin of error on slower processors (slower than the Win32 | ||
machine on which the test is developed). */ | ||
#define configSTREAM_BUFFER_TRIGGER_LEVEL_TEST_MARGIN ( 1 ) | ||
|
||
/* Override locally defined test task stack sizes as appropriate for this | ||
demo. */ | ||
#define configMESSAGE_BUFFER_BLOCK_TASK_STACK_SIZE ( 110 ) | ||
#define configSTREAM_BUFFER_SENDER_TASK_STACK_SIZE ( 180 ) | ||
#define configSTREAM_BUFFER_SMALLER_TASK_STACK_SIZE ( 110 ) | ||
|
||
void vAssertCalled( const char *pcFile, unsigned long ulLine ); | ||
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ ); | ||
|
||
/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. See the comments | ||
at the top of main.c for enabling the trace recorder. | ||
#include "trcRecorder.h" */ | ||
|
||
#endif /* FREERTOS_CONFIG_H */ |
Oops, something went wrong.