From b3e6cff1f2392ceb261ac6e4b61aede2edc1ecf7 Mon Sep 17 00:00:00 2001 From: Ian Thompson <101299961+ianstcdns@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:36:05 -0700 Subject: [PATCH] Xtensa Demos updated and moved to Partner-Supported submodules (#1281) Cadence/Xtensa: Move Tensilica demos to Partner-Supported-Demos submodule Add a README to this deprecated demos directory indicating where to find the latest Tensilica test code. Signed-off-by: Ian Thompson --- .../Tensilica_Simulator_Xplorer_XCC/.project | 382 -------------- .../.settings/targets/xtensa/CommonTarget.bts | 10 - .../.settings/targets/xtensa/Debug.bts | 52 -- .../.xxproject | 21 - .../FreeRTOSConfig.h | 219 -------- .../IntQueueTimer.c | 163 ------ .../IntQueueTimer.h | 36 -- .../Tensilica_Simulator_Xplorer_XCC/main.c | 192 ------- .../main_blinky.c | 249 --------- .../main_full.c | 481 ------------------ .../moved_to_Partner-Supported-Demos | 3 + .../regtest_xtensa.S | 216 -------- .../Demo/ThirdParty/Partner-Supported-Demos | 2 +- FreeRTOS/Source | 2 +- manifest.yml | 4 +- 15 files changed, 7 insertions(+), 2025 deletions(-) delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.project delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/CommonTarget.bts delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/Debug.bts delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.xxproject delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_full.c create mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/moved_to_Partner-Supported-Demos delete mode 100644 FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.project b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.project deleted file mode 100644 index 51db76b71e..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.project +++ /dev/null @@ -1,382 +0,0 @@ - - - RTOSDemo - - - XtensaInfo - - - - com.tensilica.xide.cdt.xtensamanagedbuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - com.tensilica.xide.cdt.XtensaCProjectNature - com.tensilica.xide.cdt.XtensaCProjectExeNature - com.tensilica.xide.cdt.XideManagedProjectNature - - - - CommonDemoTasks - 2 - virtual:/virtual - - - FreeRTOS_Source - 2 - virtual:/virtual - - - CommonDemoTasks/AbortDelay.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/AbortDelay.c - - - CommonDemoTasks/BlockQ.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/BlockQ.c - - - CommonDemoTasks/EventGroupsDemo.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/EventGroupsDemo.c - - - CommonDemoTasks/GenQTest.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/GenQTest.c - - - CommonDemoTasks/IntQueue.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/IntQueue.c - - - CommonDemoTasks/IntSemTest.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/IntSemTest.c - - - CommonDemoTasks/MessageBufferDemo.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/MessageBufferDemo.c - - - CommonDemoTasks/PollQ.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/PollQ.c - - - CommonDemoTasks/QPeek.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/QPeek.c - - - CommonDemoTasks/QueueOverwrite.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/QueueOverwrite.c - - - CommonDemoTasks/QueueSet.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/QueueSet.c - - - CommonDemoTasks/QueueSetPolling.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/QueueSetPolling.c - - - CommonDemoTasks/StaticAllocation.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/StaticAllocation.c - - - CommonDemoTasks/StreamBufferDemo.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/StreamBufferDemo.c - - - CommonDemoTasks/StreamBufferInterrupt.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/StreamBufferInterrupt.c - - - CommonDemoTasks/TaskNotify.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/TaskNotify.c - - - CommonDemoTasks/TimerDemo.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/TimerDemo.c - - - CommonDemoTasks/blocktim.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/blocktim.c - - - CommonDemoTasks/countsem.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/countsem.c - - - CommonDemoTasks/death.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/death.c - - - CommonDemoTasks/flop.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/flop.c - - - CommonDemoTasks/include - 2 - PARENT-1-PROJECT_LOC/Common/include - - - CommonDemoTasks/integer.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/integer.c - - - CommonDemoTasks/recmutex.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/recmutex.c - - - CommonDemoTasks/semtest.c - 1 - PARENT-1-PROJECT_LOC/Common/Minimal/semtest.c - - - FreeRTOS_Source/event_groups.c - 1 - PARENT-2-PROJECT_LOC/Source/event_groups.c - - - FreeRTOS_Source/include - 2 - virtual:/virtual - - - FreeRTOS_Source/list.c - 1 - PARENT-2-PROJECT_LOC/Source/list.c - - - FreeRTOS_Source/portable - 2 - virtual:/virtual - - - FreeRTOS_Source/queue.c - 1 - PARENT-2-PROJECT_LOC/Source/queue.c - - - FreeRTOS_Source/readme.txt - 1 - PARENT-2-PROJECT_LOC/Source/readme.txt - - - FreeRTOS_Source/stream_buffer.c - 1 - PARENT-2-PROJECT_LOC/Source/stream_buffer.c - - - FreeRTOS_Source/tasks.c - 1 - PARENT-2-PROJECT_LOC/Source/tasks.c - - - FreeRTOS_Source/timers.c - 1 - PARENT-2-PROJECT_LOC/Source/timers.c - - - FreeRTOS_Source/include/FreeRTOS.h - 1 - PARENT-2-PROJECT_LOC/Source/include/FreeRTOS.h - - - FreeRTOS_Source/include/event_groups.h - 1 - PARENT-2-PROJECT_LOC/Source/include/event_groups.h - - - FreeRTOS_Source/include/list.h - 1 - PARENT-2-PROJECT_LOC/Source/include/list.h - - - FreeRTOS_Source/include/message_buffer.h - 1 - PARENT-2-PROJECT_LOC/Source/include/message_buffer.h - - - FreeRTOS_Source/include/mpu_prototypes.h - 1 - PARENT-2-PROJECT_LOC/Source/include/mpu_prototypes.h - - - FreeRTOS_Source/include/mpu_wrappers.h - 1 - PARENT-2-PROJECT_LOC/Source/include/mpu_wrappers.h - - - FreeRTOS_Source/include/portable.h - 1 - PARENT-2-PROJECT_LOC/Source/include/portable.h - - - FreeRTOS_Source/include/projdefs.h - 1 - PARENT-2-PROJECT_LOC/Source/include/projdefs.h - - - FreeRTOS_Source/include/queue.h - 1 - PARENT-2-PROJECT_LOC/Source/include/queue.h - - - FreeRTOS_Source/include/semphr.h - 1 - PARENT-2-PROJECT_LOC/Source/include/semphr.h - - - FreeRTOS_Source/include/stream_buffer.h - 1 - PARENT-2-PROJECT_LOC/Source/include/stream_buffer.h - - - FreeRTOS_Source/include/task.h - 1 - PARENT-2-PROJECT_LOC/Source/include/task.h - - - FreeRTOS_Source/include/timers.h - 1 - PARENT-2-PROJECT_LOC/Source/include/timers.h - - - FreeRTOS_Source/portable/MemMang - 2 - virtual:/virtual - - - FreeRTOS_Source/portable/XCC - 2 - virtual:/virtual - - - FreeRTOS_Source/portable/MemMang/heap_4.c - 1 - PARENT-2-PROJECT_LOC/Source/portable/MemMang/heap_4.c - - - FreeRTOS_Source/portable/XCC/port.c - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/port.c - - - FreeRTOS_Source/portable/XCC/portasm.S - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portasm.S - - - FreeRTOS_Source/portable/XCC/portbenchmark.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portbenchmark.h - - - FreeRTOS_Source/portable/XCC/portclib.c - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portclib.c - - - FreeRTOS_Source/portable/XCC/portmacro.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portmacro.h - - - FreeRTOS_Source/portable/XCC/porttrace.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/porttrace.h - - - FreeRTOS_Source/portable/XCC/readme_xtensa.txt - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/readme_xtensa.txt - - - FreeRTOS_Source/portable/XCC/xtensa_api.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_api.h - - - FreeRTOS_Source/portable/XCC/xtensa_config.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_config.h - - - FreeRTOS_Source/portable/XCC/xtensa_context.S - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_context.S - - - FreeRTOS_Source/portable/XCC/xtensa_context.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_context.h - - - FreeRTOS_Source/portable/XCC/xtensa_init.c - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_init.c - - - FreeRTOS_Source/portable/XCC/xtensa_intr.c - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_intr.c - - - FreeRTOS_Source/portable/XCC/xtensa_intr_asm.S - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_intr_asm.S - - - FreeRTOS_Source/portable/XCC/xtensa_overlay_os_hook.c - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_overlay_os_hook.c - - - FreeRTOS_Source/portable/XCC/xtensa_rtos.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_rtos.h - - - FreeRTOS_Source/portable/XCC/xtensa_timer.h - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_timer.h - - - FreeRTOS_Source/portable/XCC/xtensa_vectors.S - 1 - PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S - - - diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/CommonTarget.bts b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/CommonTarget.bts deleted file mode 100644 index 430333b7cb..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/CommonTarget.bts +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/Debug.bts b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/Debug.bts deleted file mode 100644 index 9a6fd1fadc..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.settings/targets/xtensa/Debug.bts +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - Includes - - ${workspace_loc:RTOSDemo/FreeRTOS_Source/include} - ${workspace_loc:RTOSDemo/FreeRTOS_Source/portable/XCC} - ${workspace_loc:RTOSDemo} - - - - - - - - Optimization - - - - Debug - - - - - - - - AssemblerIncludeDebug - - - - AssemblerLongCall - - - - - - - - CreateMinsize - - - - - - - - diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.xxproject b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.xxproject deleted file mode 100644 index 06a21cd9d3..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.xxproject +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h deleted file mode 100644 index 14b24ffed3..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - - -/* Required for configuration-dependent settings. */ -#include "xtensa_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. - *--------------------------------------------------------------------------- - */ - -#define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 0 - -#ifdef SMALL_TEST - #define configUSE_TICK_HOOK 0 -#else - #define configUSE_TICK_HOOK 1 -#endif - -#define configTICK_RATE_HZ ( 1000 ) - -/* Default clock rate for simulator */ -#define configCPU_CLOCK_HZ 10000000 - -/* Max possible priorities. */ -#define configMAX_PRIORITIES ( 7 ) - -/** - * Minimal stack size. This may need to be increased for your application. - * - * @note: The FreeRTOS demos may not work reliably with stack size < 4KB. The - * Xtensa-specific examples should be fine with XT_STACK_MIN_SIZE. - * - * @note: The size is defined in terms of StackType_t units not bytes. - */ -#if !( defined XT_STACK_MIN_SIZE ) - #error XT_STACK_MIN_SIZE not defined, did you include xtensa_config.h ? -#endif - -#ifdef SMALL_TEST - #define configMINIMAL_STACK_SIZE ( XT_STACK_MIN_SIZE / sizeof( StackType_t ) ) -#else - #define configMINIMAL_STACK_SIZE ( XT_STACK_MIN_SIZE > 1024 ? XT_STACK_MIN_SIZE : 1024 ) -#endif - -/** - * The Xtensa port uses a separate interrupt stack. Adjust the stack size to - * suit the needs of your specific application. - * - * @note: the size is defined in bytes. - */ -#ifndef configISR_STACK_SIZE - #define configISR_STACK_SIZE 2048 -#endif - -/** - * Minimal heap size to make sure examples can run on memory limited configs. - * Adjust this to suit your system. - */ -#ifdef SMALL_TEST - #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16 * 1024 ) ) -#else - #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 512 * 1024 ) ) -#endif - -#define configMAX_TASK_NAME_LEN ( 8 ) -#define configUSE_TRACE_FACILITY 0 -#define configUSE_STATS_FORMATTING_FUNCTIONS 0 -#define configUSE_TRACE_FACILITY_2 0 /* Provided by Xtensa port patch. */ -#define configBENCHMARK 0 /* Provided by Xtensa port patch. */ -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 0 -#define configQUEUE_REGISTRY_SIZE 0 - -#ifdef SMALL_TEST - #define configUSE_MUTEXES 1 - #define configUSE_RECURSIVE_MUTEXES 1 - #define configUSE_COUNTING_SEMAPHORES 1 - #define configCHECK_FOR_STACK_OVERFLOW 0 -#else - #define configUSE_MUTEXES 1 - #define configUSE_RECURSIVE_MUTEXES 1 - #define configUSE_COUNTING_SEMAPHORES 1 - #define configCHECK_FOR_STACK_OVERFLOW 2 -#endif - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) - -/** - * 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_xTaskAbortDelay 1 -#define INCLUDE_xTaskGetHandle 1 -#define INCLUDE_xSemaphoreGetMutexHolder 1 - -/** - * The priority at which the tick interrupt runs. This should probably be kept - * at 1. - */ -#define configKERNEL_INTERRUPT_PRIORITY 1 - -/** - * The maximum interrupt priority from which FreeRTOS.org API functions can be - * called. Only API functions that end in ...FromISR() can be used within - * interrupts. - */ -#define configMAX_SYSCALL_INTERRUPT_PRIORITY XCHAL_EXCM_LEVEL - -/** - * XT_USE_THREAD_SAFE_CLIB is defined in xtensa_config.h and can be overridden - * from the compiler/make command line. The small test however always disables C - * lib thread safety to minimize size. - */ -#ifdef SMALL_TEST - #define configUSE_NEWLIB_REENTRANT 0 -#else - #if ( XT_USE_THREAD_SAFE_CLIB > 0u ) - #if XT_HAVE_THREAD_SAFE_CLIB - #define configUSE_NEWLIB_REENTRANT 0 - #else - #error "Error: thread-safe C library support not available for this C library." - #endif - #else - #define configUSE_NEWLIB_REENTRANT 0 - #endif -#endif - -/* Test FreeRTOS timers (with timer task) and more. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 2 ) -#define configTIMER_QUEUE_LENGTH 10 -#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE - -#ifdef SMALL_TEST - #define INCLUDE_xTimerPendFunctionCall 0 - #define INCLUDE_eTaskGetState 0 - #define configUSE_QUEUE_SETS 0 -#else - #define INCLUDE_xTimerPendFunctionCall 1 - #define INCLUDE_eTaskGetState 1 - #define configUSE_QUEUE_SETS 1 -#endif - -/** - * Specific config for XTENSA (these can be deleted and they will take default - * values). - */ -#if ( !defined XT_SIMULATOR ) && ( !defined XT_BOARD ) - #define configXT_SIMULATOR 1 /* Simulator mode. */ - #define configXT_BOARD 0 /* Board mode. */ -#endif - -#ifndef SMALL_TEST - #if ( !defined XT_INTEXC_HOOKS ) - #define configXT_INTEXC_HOOKS 1 /* Exception hooks used by certain tests. */ - #endif - - #if configUSE_TRACE_FACILITY_2 - #define configASSERT_2 1 /* Specific to Xtensa port. */ - #endif -#endif - -/** - * It is a good idea to define configASSERT() while developing. configASSERT() - * uses the same semantics as the standard C assert() macro. - */ -#if !defined __ASSEMBLER__ - extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName ); -#endif -#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __LINE__, __FILE__ ) - -#define configSTREAM_BUFFER_TRIGGER_LEVEL_TEST_MARGIN ( 2 ) /* Used by stream buffer tests. */ - -#endif /* FREERTOS_CONFIG_H */ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c deleted file mode 100644 index 1bd16f6f56..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. If you wish to use our Amazon - * FreeRTOS name, please do so in a fair use way that does not cause confusion. - * - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -/* Scheduler includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Demo includes. */ -#include "IntQueueTimer.h" -#include "IntQueue.h" - -/* Xtensa includes. */ -#include -#include -#include -#include -/*-----------------------------------------------------------*/ - -/* Check if Timer1 is available. */ -#if XCHAL_TIMER1_INTERRUPT != XTHAL_TIMER_UNCONFIGURED - #if XCHAL_INT_LEVEL( XCHAL_TIMER1_INTERRUPT ) <= XCHAL_EXCM_LEVEL - #define SECOND_TIMER_AVAILABLE 1 - #endif -#endif - -#ifndef SECOND_TIMER_AVAILABLE - #define SECOND_TIMER_AVAILABLE 0 -#endif - -/** - * Timer0 is used to drive systick and therefore we use Timer1 - * as second interrupt which runs on a higher priority than - * Timer0. This ensures that systick will get interrupted by - * this timer and hence we can test interrupt nesting. - */ -#define SECOND_TIMER_INDEX 1 - -/** - * Frequency of the second timer - This timer is configured at - * a frequency offset of 17 from the systick timer. - */ -#define SECOND_TIMER_TICK_RATE_HZ ( configTICK_RATE_HZ + 17 ) -#define SECOND_TIMER_TICK_DIVISOR ( configCPU_CLOCK_HZ / SECOND_TIMER_TICK_RATE_HZ ) -/*-----------------------------------------------------------*/ - -/* Defined in main_full.c. */ -extern BaseType_t xTimerForQueueTestInitialized; -/*-----------------------------------------------------------*/ - -/** - * Interrupt handler for timer interrupt. - */ -#if( SECOND_TIMER_AVAILABLE == 1 ) - static void prvTimer2Handler( void *arg ); -#endif /* SECOND_TIMER_AVAILABLE */ -/*-----------------------------------------------------------*/ - -void vInitialiseTimerForIntQueueTest( void ) -{ -unsigned currentCycleCount, firstComparatorValue; - - /* Inform the tick hook function that it can access queues now. */ - xTimerForQueueTestInitialized = pdTRUE; - - #if( SECOND_TIMER_AVAILABLE == 1 ) - { - /* Install the interrupt handler for second timer. */ - xt_set_interrupt_handler( XCHAL_TIMER1_INTERRUPT, prvTimer2Handler, NULL ); - - /* Read the current cycle count. */ - currentCycleCount = xthal_get_ccount(); - - /* Calculate time of the first timer interrupt. */ - firstComparatorValue = currentCycleCount + SECOND_TIMER_TICK_DIVISOR; - - /* Set the comparator. */ - xthal_set_ccompare( SECOND_TIMER_INDEX, firstComparatorValue ); - - /* Enable timer interrupt. */ - xt_ints_on( ( 1 << XCHAL_TIMER1_INTERRUPT ) ); - } - #endif /* SECOND_TIMER_AVAILABLE */ -} -/*-----------------------------------------------------------*/ - -/* - * Xtensa timers work by comparing a cycle counter with a preset value. - * Once the match occurs an interrupt is generated, and the handler has - * to set a new cycle count into the comparator. To avoid clock drift - * due to interrupt latency, the new cycle count is computed from the - * old, not the time the interrupt was serviced. However if a timer - * interrupt is ever serviced more than one tick late, it is necessary - * to process multiple ticks until the new cycle count is in the future, - * otherwise the next timer interrupt would not occur until after the - * cycle counter had wrapped (2^32 cycles later). - -do { - ticks++; - old_ccompare = read_ccompare_i(); - write_ccompare_i( old_ccompare + divisor ); - service one tick; - diff = read_ccount() - old_ccompare; -} while ( diff > divisor ); -*/ -#if( SECOND_TIMER_AVAILABLE == 1 ) - - static void prvTimer2Handler( void *arg ) - { - unsigned oldComparatorValue, newComparatorValue, currentCycleCount; - - /* Unused arguments. */ - ( void )arg; - - do - { - /* Read old comparator value. */ - oldComparatorValue = xthal_get_ccompare( SECOND_TIMER_INDEX ); - - /* Calculate the new comparator value. */ - newComparatorValue = oldComparatorValue + SECOND_TIMER_TICK_DIVISOR; - - /* Update comparator and clear interrupt. */ - xthal_set_ccompare( SECOND_TIMER_INDEX, newComparatorValue ); - - /* Process. */ - portYIELD_FROM_ISR( xSecondTimerHandler() ); - - /* Ensure comparator update is complete. */ - xthal_icache_sync(); - - /* Read current cycle count to check if we need to process more - * ticks to catch up. */ - currentCycleCount = xthal_get_ccount(); - - } while( ( currentCycleCount - oldComparatorValue ) > SECOND_TIMER_TICK_DIVISOR ); - } - -#endif /* SECOND_TIMER_AVAILABLE */ -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h deleted file mode 100644 index 687792e19b..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. If you wish to use our Amazon - * FreeRTOS name, please do so in a fair use way that does not cause confusion. - * - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -#ifndef INT_QUEUE_TIMER_H -#define INT_QUEUE_TIMER_H - -/** - * The function called from interrupt tests to initialise timer. - */ -void vInitialiseTimerForIntQueueTest( void ); - -#endif /* INT_QUEUE_TIMER_H */ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c deleted file mode 100644 index 91f400301b..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c +++ /dev/null @@ -1,192 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -/****************************************************************************** - * This project provides two demo applications: - * - A simple blinky style demo application. - * - A more comprehensive test and demo application. - * The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY macro is used to select between the two. - * - * The simply blinky demo is implemented and described in the file main_blinky.c. - * The more comprehensive test and demo application is implemented and described - * in the file main_full.c. - * - * This file implements the code that is not demo specific, including the FreeRTOS - * hook functions. - * - ******************************************************************************* - */ - -/* Standard includes. */ -#include -#include - -/* FreeRTOS kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/** - * This project provides two demo applications: - * - A simple blinky style demo application. - * - A more comprehensive test and demo application. - * The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY macro is used to select between the two. - * - * If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1 then the blinky demo will be - * built. The blinky demo is implemented and described in main_blinky.c. - * - * If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0 then the comprehensive test - * and demo application will be built. The comprehensive test and demo application - * is implemented and described in main_full.c. - */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 -/*-----------------------------------------------------------*/ - -/** - * The entry function for the blinky demo application. - * - * This is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. - */ -extern void main_blinky( void ); - -/** - * The entry function for the comprehensive test and demo application. - * - * This is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0. - */ -extern void main_full( void ); - -/** - * Prototypes for the standard FreeRTOS application hook (callback) functions - * implemented within this file. - * - * @see http://www.freertos.org/a00016.html - */ -void vApplicationMallocFailedHook( void ); -void vApplicationStackOverflowHook( TaskHandle_t pxTask, - char * pcTaskName ); -void vApplicationTickHook( void ); - -/** - * The function called from the tick hook. - * - * @note Only the comprehensive demo uses application hook (callback) functions. - * - * @see http://www.freertos.org/a00016.html - */ -void vFullDemoTickHookFunction( void ); -/*-----------------------------------------------------------*/ - -int main( void ) -{ - /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top - * of this file. */ - #if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 ) - { - main_blinky(); - } - #else - { - main_full(); - } - #endif - - return 0; -} -/*-----------------------------------------------------------*/ - -void vApplicationMallocFailedHook( void ) -{ - /* vApplicationMallocFailedHook() will only be called if - * configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook - * function that will get called if a call to pvPortMalloc() fails. - * pvPortMalloc() is called internally by the kernel whenever a task, queue, - * timer or semaphore is created. It is also called by various parts of the - * demo application. If heap_1.c, heap_2.c or heap_4.c is being used, then - * the size of the heap available to pvPortMalloc() is defined by - * configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize() - * API function can be used to query the size of free heap space that remains - * (although it does not provide information on how the remaining heap might be - * fragmented). See http://www.freertos.org/a00111.html for more information. - */ - vAssertCalled( __LINE__, __FILE__ ); -} -/*-----------------------------------------------------------*/ - -void vApplicationStackOverflowHook( TaskHandle_t pxTask, - char * pcTaskName ) -{ - ( void ) pcTaskName; - ( void ) pxTask; - - /* Run time stack overflow checking is performed if - * configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook - * function is called if a stack overflow is detected. */ - vAssertCalled( __LINE__, __FILE__ ); -} -/*-----------------------------------------------------------*/ - -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()). */ - #if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1 ) - { - vFullDemoTickHookFunction(); - } - #endif /* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY */ -} -/*-----------------------------------------------------------*/ - -void vAssertCalled( unsigned long ulLine, - const char * const pcFileName ) -{ - static BaseType_t xPrinted = pdFALSE; - volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0; - - /* Called if an assertion passed to configASSERT() fails. See - * https://www.FreeRTOS.org/a00110.html#configASSERT for more information. */ - - /* Parameters are not used. */ - ( void ) ulLine; - ( void ) pcFileName; - - taskENTER_CRITICAL(); - { - /* You can step out of this function to debug the assertion by using - * the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero - * value. */ - while( ulSetToNonZeroInDebuggerToContinue == 0 ) - { - __asm volatile ( "NOP" ); - __asm volatile ( "NOP" ); - } - } - taskEXIT_CRITICAL(); -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c deleted file mode 100644 index a4d932919a..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -/****************************************************************************** - * NOTE: This file only contains the source code that is specific to the - * basic demo. Generic functions, such FreeRTOS hook functions, are defined - * in main.c. - ****************************************************************************** - * - * main_blinky() creates one queue, one software timer, and two tasks. It then - * starts the scheduler. - * - * The Queue Send Task: - * The queue send task is implemented by the prvQueueSendTask() function in - * this file. It uses vTaskDelayUntil() to create a periodic task that sends - * the value 100 to the queue every 200 milliseconds. - * - * The Queue Send Software Timer: - * The timer is an auto-reload timer with a period of two seconds. The timer's - * callback function writes the value 200 to the queue. The callback function - * is implemented by prvQueueSendTimerCallback() within this file. - * - * The Queue Receive Task: - * The queue receive task is implemented by the prvQueueReceiveTask() function - * in this file. prvQueueReceiveTask() waits for data to arrive on the queue. - * When data is received, the task checks the value of the data, then outputs a - * message to indicate if the data came from the queue send task or the queue - * send software timer. - * - * Expected Behavior: - * - The queue send task writes to the queue every 200ms, so every 200ms the - * queue receive task will output a message indicating that data was received - * on the queue from the queue send task. - * - The queue send software timer has a period of two seconds, so every two - * seconds the queue receive task will output a message indicating that data - * was received on the queue from the queue send software timer. - */ - -/* Standard includes. */ -#include - -/* Kernel includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" -#include "semphr.h" - -/** - * Priorities at which the tasks are created. - */ -#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) - -/** - * The rate at which data is sent to the queue. The times are converted from - * milliseconds to ticks using the pdMS_TO_TICKS() macro. - */ -#define mainTASK_SEND_FREQUENCY_MS pdMS_TO_TICKS( 200UL ) -#define mainTIMER_SEND_FREQUENCY_MS pdMS_TO_TICKS( 2000UL ) - -/** - * The number of items the queue can hold at once. - */ -#define mainQUEUE_LENGTH ( 2 ) - -/** - * The values sent to the queue receive task from the queue send task and the - * queue send software timer respectively. - */ -#define mainVALUE_SENT_FROM_TASK ( 100UL ) -#define mainVALUE_SENT_FROM_TIMER ( 200UL ) -/*-----------------------------------------------------------*/ - -/** - * The tasks as described in the comments at the top of this file. - */ -static void prvQueueReceiveTask( void * pvParameters ); -static void prvQueueSendTask( void * pvParameters ); - -/** - * The callback function executed when the software timer expires. - */ -static void prvQueueSendTimerCallback( TimerHandle_t xTimerHandle ); -/*-----------------------------------------------------------*/ - -/** - * The queue used by both tasks. - */ -static QueueHandle_t xQueue = NULL; - -/** - * A software timer that is started from the tick hook. - */ -static TimerHandle_t xTimer = NULL; -/*-----------------------------------------------------------*/ - -void main_blinky( void ) -{ - const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS; - - /* Create the queue. */ - xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) ); - - if( xQueue != NULL ) - { - /* Start the two tasks as described in the comments at the top of this - * file. */ - xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ - "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ - configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ - NULL, /* The parameter passed to the task - not used in this simple case. */ - mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ - NULL ); /* The task handle is not required, so NULL is passed. */ - - xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - - /* Create the software timer, but don't start it yet. */ - xTimer = xTimerCreate( "Timer", /* The text name assigned to the software timer - for debug only as it is not used by the kernel. */ - xTimerPeriod, /* The period of the software timer in ticks. */ - pdTRUE, /* xAutoReload is set to pdTRUE. */ - NULL, /* The timer's ID is not used. */ - prvQueueSendTimerCallback ); /* The function executed when the timer expires. */ - - if( xTimer != NULL ) - { - xTimerStart( xTimer, 0 ); - } - - /* Start the tasks and timer running. */ - vTaskStartScheduler(); - } - - /* If all is well, the scheduler will now be running, and the following - * line will never be reached. If the following line does execute, then - * there was insufficient FreeRTOS heap memory available for the idle and/or - * timer tasks to be created. See the memory management section on the - * FreeRTOS web site for more details. */ - for( ; ; ) - { - } -} -/*-----------------------------------------------------------*/ - -static void prvQueueSendTask( void * pvParameters ) -{ - TickType_t xNextWakeTime; - const TickType_t xBlockTime = mainTASK_SEND_FREQUENCY_MS; - const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TASK; - - /* Prevent the compiler warning about the unused parameter. */ - ( void ) pvParameters; - - /* Initialise xNextWakeTime - this only needs to be done once. */ - xNextWakeTime = xTaskGetTickCount(); - - for( ; ; ) - { - /* Place this task in the blocked state until it is time to run again. - * The block time is specified in ticks, pdMS_TO_TICKS() was used to - * convert a time specified in milliseconds into a time specified in ticks. - * While in the Blocked state this task will not consume any CPU time. */ - vTaskDelayUntil( &xNextWakeTime, xBlockTime ); - - /* Send to the queue - causing the queue receive task to unblock and - * write to the console. 0 is used as the block time so the send operation - * will not block - it shouldn't need to block as the queue should always - * have at least one space at this point in the code. */ - xQueueSend( xQueue, &ulValueToSend, 0U ); - } -} -/*-----------------------------------------------------------*/ - -static void prvQueueSendTimerCallback( TimerHandle_t xTimerHandle ) -{ - const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TIMER; - - /* This is the software timer callback function. The software timer has a - * period of two seconds and is reset each time a key is pressed. This - * callback function will execute if the timer expires, which will only happen - * if a key is not pressed for two seconds. */ - - /* Avoid compiler warnings resulting from the unused parameter. */ - ( void ) xTimerHandle; - - /* Send to the queue - causing the queue receive task to unblock and - * write out a message. This function is called from the timer/daemon task, - * so must not block. Hence the block time is set to 0. */ - xQueueSend( xQueue, &ulValueToSend, 0U ); -} -/*-----------------------------------------------------------*/ - -static void prvQueueReceiveTask( void * pvParameters ) -{ - uint32_t ulReceivedValue; - - /* Prevent the compiler warning about the unused parameter. */ - ( void ) pvParameters; - - for( ; ; ) - { - /* Wait until something arrives in the queue - this task will block - * indefinitely provided INCLUDE_vTaskSuspend is set to 1 in - * FreeRTOSConfig.h. It will not use any CPU time while it is in the - * Blocked state. */ - xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY ); - - /* To get here something must have been received from the queue, but - * is it an expected value? This is the only task that uses stdout so its - * ok to call printf() directly. Do not call printf from any other task. */ - if( ulReceivedValue == mainVALUE_SENT_FROM_TASK ) - { - printf( "Message received from task\r\n" ); - } - else if( ulReceivedValue == mainVALUE_SENT_FROM_TIMER ) - { - printf( "Message received from software timer\r\n" ); - } - else - { - printf( "Unexpected message\r\n" ); - } - - fflush( stdout ); - } -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_full.c b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_full.c deleted file mode 100644 index f2cf3d3738..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_full.c +++ /dev/null @@ -1,481 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -/****************************************************************************** - * NOTE: This file only contains the source code that is specific to the - * basic demo. Generic functions, such FreeRTOS hook functions, are defined - * in main.c. - ****************************************************************************** - * - * main_full() creates all the demo application tasks, then starts the scheduler. - * The web documentation provides more details of the standard demo application - * tasks, which provide no particular functionality but do provide a good - * example of how to use the FreeRTOS API. - * - * In addition to the standard demo tasks, the following tasks and tests are - * defined and/or created within this file: - * - * "Register tests": - * prvRegTest1Task and prvRegTest2Task implement register tests. These functions - * are just entry points and actual tests are written in the assembler file - * regtest_xtensa.S. These tests populate core registers with a known set of - * values and keep verifying them in a loop. Any corruption will indicate an - * error in context switching mechanism. - * - * "Check" task: - * This only executes every five seconds but has a high priority to ensure it - * gets processor time. Its main function is to check that all the standard demo - * tasks are still operational. While no errors have been discovered the check - * task will print out "No errors", the current simulated tick time, free heap - * size and the minimum free heap size so far. If an error is discovered in the - * execution of a task then the check task will print out an appropriate error - * message. - */ - - -/* Standard includes. */ -#include -#include - -/* Kernel includes. */ -#include -#include -#include -#include -#include - -/* Standard demo includes. */ -#include "BlockQ.h" -#include "integer.h" -#include "semtest.h" -#include "PollQ.h" -#include "GenQTest.h" -#include "QPeek.h" -#include "recmutex.h" -#include "flop.h" -#include "TimerDemo.h" -#include "countsem.h" -#include "death.h" -#include "QueueSet.h" -#include "QueueOverwrite.h" -#include "EventGroupsDemo.h" -#include "IntSemTest.h" -#include "TaskNotify.h" -#include "QueueSetPolling.h" -#include "StaticAllocation.h" -#include "blocktim.h" -#include "AbortDelay.h" -#include "MessageBufferDemo.h" -#include "StreamBufferDemo.h" -#include "StreamBufferInterrupt.h" - -/** - * Priorities at which the tasks are created. - */ -#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 ) -#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 ) -#define mainFLASH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY ) -#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) -#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY ) -#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY ) - -/** - * Period used in timer tests. - */ -#define mainTIMER_TEST_PERIOD ( 50 ) - -/** - * Parameters that are passed into the register check tasks solely for the - * purpose of ensuring parameters are passed into tasks correctly. - */ -#define mainREG_TEST_TASK_1_PARAMETER ( ( void * ) 0x12345678 ) -#define mainREG_TEST_TASK_2_PARAMETER ( ( void * ) 0x87654321 ) - -/** - * Determines whether to enable interrupt queue tests. - * - * Interrupt queue tests are used to test interrupt nesting and enabling them - * interferes with proper functioning of other tests. This macro controls - * whether to enable interrupt queue tests or all other tests: - * - * * When mainENABLE_INT_QUEUE_TESTS is set to 1, interrupt queue tests are - * enabled and every other test is disabled. - * * When mainENABLE_INT_QUEUE_TESTS is set to 0, interrupt queue tests are - * disabled and every other test is enabled. - */ -#define mainENABLE_INT_QUEUE_TESTS ( 0 ) -/*-----------------------------------------------------------*/ - -/** - * The task that periodically checks that all the standard demo tasks are - * still executing and error free. - */ -static void prvCheckTask( void * pvParameters ); - -/** - * Tasks that implement register tests. - */ -static void prvRegTest1Task( void * pvParameters ); -static void prvRegTest2Task( void * pvParameters ); - -/** - * Functions that implement register tests. - * - * These are implemented in assembler file regtest_xtensa.S. - */ -extern void vRegTest1( void ); -extern void vRegTest2( void ); -/*-----------------------------------------------------------*/ - -/** - * The variable into which error messages are latched. - */ -static char * pcStatusMessage = "No errors"; - -/** - * The following two variables are used to communicate the status of the - * register check tasks to the check task. If the variables keep incrementing, - * then the register check tasks have not discovered any errors. If a variable - * stops incrementing, then an error has been found. - */ -volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL; - -/** - * The following variable is used to communicate whether the timers for the - * IntQueue tests have been Initialized. This is needed to ensure that the queues - * are accessed from the tick hook only after they have been created in the - * interrupt queue test. - */ -volatile BaseType_t xTimerForQueueTestInitialized = pdFALSE; -/*-----------------------------------------------------------*/ - -int main_full( void ) -{ - /* Start the check task as described at the top of this file. */ - xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); - - #if ( mainENABLE_INT_QUEUE_TESTS == 0 ) - { - /* Create the standard demo tasks. */ - vStartTaskNotifyTask(); - vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); - vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); - vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); - vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); - vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); - - vStartQueuePeekTasks(); - vStartMathTasks( mainFLOP_TASK_PRIORITY ); - vStartRecursiveMutexTasks(); - vStartCountingSemaphoreTasks(); - vStartQueueSetTasks(); - - vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); - vStartEventGroupTasks(); - vStartInterruptSemaphoreTasks(); - vStartQueueSetPollingTask(); - vCreateBlockTimeTasks(); - - #if ( configUSE_PREEMPTION != 0 ) - { - /* Don't expect these tasks to pass when preemption is not used. */ - vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); - } - #endif - - vCreateAbortDelayTasks(); - vStartMessageBufferTasks( configMINIMAL_STACK_SIZE ); - - vStartStreamBufferTasks(); - vStartStreamBufferInterruptDemo(); - - /* Create the register check tasks, as described at the top of this file */ - xTaskCreate( prvRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); - - /* The suicide tasks must be created last as they need to know how many - * tasks were running prior to their creation. This then allows them to - * ascertain whether or not the correct/expected number of tasks are - * running at any given time. */ - vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); - } - #else /* mainENABLE_INT_QUEUE_TESTS */ - { - /* Start interrupt queue test tasks. */ - vStartInterruptQueueTasks(); - } - #endif /* mainENABLE_INT_QUEUE_TESTS */ - - /* Start the scheduler itself. */ - vTaskStartScheduler(); - - /* Should never get here unless there was not enough heap space to create - * the idle and other system tasks. */ - return 0; -} -/*-----------------------------------------------------------*/ - -static void prvCheckTask( void * pvParameters ) -{ - TickType_t xNextWakeTime; - const TickType_t xCycleFrequency = pdMS_TO_TICKS( 5000UL ); - static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; - - /* Just to remove compiler warning. */ - ( void ) pvParameters; - - /* Initialise xNextWakeTime - this only needs to be done once. */ - xNextWakeTime = xTaskGetTickCount(); - - for( ; ; ) - { - /* Place this task in the blocked state until it is time to run again. */ - vTaskDelayUntil( &xNextWakeTime, xCycleFrequency ); - - #if ( mainENABLE_INT_QUEUE_TESTS == 0 ) - { - /* Check the standard demo tasks are running without error. */ - #if ( configUSE_PREEMPTION != 0 ) - { - /* These tasks are only created when preemption is used. */ - if( xAreTimerDemoTasksStillRunning( xCycleFrequency ) != pdTRUE ) - { - pcStatusMessage = "Error: TimerDemo"; - } - } - #endif - - if( xAreTaskNotificationTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: Notification"; - } - else if( xAreBlockingQueuesStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: BlockQueue"; - } - else if( xAreSemaphoreTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: SemTest"; - } - else if( xArePollingQueuesStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: PollQueue"; - } - else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: IntMath"; - } - else if( xAreGenericQueueTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: GenQueue"; - } - else if( xAreQueuePeekTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: QueuePeek"; - } - else if( xAreMathsTaskStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Flop"; - } - else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: RecMutex"; - } - else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: CountSem"; - } - else if( xAreQueueSetTasksStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Queue set"; - } - else if( xIsQueueOverwriteTaskStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Queue overwrite"; - } - else if( xAreEventGroupTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: EventGroup"; - } - else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: IntSem"; - } - else if( xAreQueueSetPollTasksStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Queue set polling"; - } - else if( xAreBlockTimeTestTasksStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Block time"; - } - else if( xAreAbortDelayTestTasksStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Abort delay"; - } - else if( xAreMessageBufferTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: MessageBuffer"; - } - else if( xAreStreamBufferTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: StreamBuffer"; - } - else if( xIsInterruptStreamBufferDemoStillRunning() != pdPASS ) - { - pcStatusMessage = "Error: Stream buffer interrupt"; - } - else if( xIsCreateTaskStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: Death"; - } - else if( ulLastRegTest1Value == ulRegTest1Counter ) - { - pcStatusMessage = "Error: Reg Test 1"; - } - else if( ulLastRegTest2Value == ulRegTest2Counter ) - { - pcStatusMessage = "Error: Reg Test 2"; - } - - /* Update register test counters. */ - ulLastRegTest1Value = ulRegTest1Counter; - ulLastRegTest2Value = ulRegTest2Counter; - } - #else /* mainENABLE_INT_QUEUE_TESTS */ - { - if( xAreIntQueueTasksStillRunning() != pdTRUE ) - { - pcStatusMessage = "Error: IntQueue"; - } - } - #endif /* mainENABLE_INT_QUEUE_TESTS */ - - /* This is the only task that uses stdout so its ok to call printf() - * directly. Do not call printf from any other task. */ - printf( "%s - tick count %zu - free heap %zu - min free heap %zu\r\n", pcStatusMessage, - xTaskGetTickCount(), - xPortGetFreeHeapSize(), - xPortGetMinimumEverFreeHeapSize() ); - } -} -/*-----------------------------------------------------------*/ - -/* Called by vApplicationTickHook(), which is defined in main.c. */ -void vFullDemoTickHookFunction( void ) -{ - TaskHandle_t xTimerTask; - - #if ( mainENABLE_INT_QUEUE_TESTS == 0 ) - { - /* Exercise using task notifications from an interrupt. */ - xNotifyTaskFromISR(); - - /* Write to a queue that is in use as part of the queue set demo to - * demonstrate using queue sets from an ISR. */ - vQueueSetAccessQueueSetFromISR(); - - /* Call the periodic queue overwrite from ISR demo. */ - vQueueOverwritePeriodicISRDemo(); - - /* Exercise event groups from interrupts. */ - vPeriodicEventGroupsProcessing(); - - /* Exercise giving mutexes from an interrupt. */ - vInterruptSemaphorePeriodicTest(); - - /* Queue set access from interrupt. */ - vQueueSetPollingInterruptAccess(); - - /* Call the periodic timer test, which tests the timer API functions that - * can be called from an ISR. */ - #if ( configUSE_PREEMPTION != 0 ) - { - /* Only created when preemption is used. */ - vTimerPeriodicISRTests(); - } - #endif - - /* 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(); - } - #else /* mainENABLE_INT_QUEUE_TESTS */ - { - /* Access queues from interrupt. Make sure to access after the queues have - * been created. */ - if( xTimerForQueueTestInitialized == pdTRUE ) - { - portYIELD_FROM_ISR( xFirstTimerHandler() ); - } - } - #endif /* mainENABLE_INT_QUEUE_TESTS */ -} -/*-----------------------------------------------------------*/ - -static void prvRegTest1Task( void * pvParameters ) -{ - /* Although the regtest task is written in assembly, its entry point is - * written in C for convenience of checking the task parameter is being - * passed in correctly. */ - if( pvParameters == mainREG_TEST_TASK_1_PARAMETER ) - { - /* Start the part of the test that is written in assembly. */ - vRegTest1(); - } - - /* The following line will only execute if the task parameter is found to - * be incorrect. The check task will detect that the regtest loop counter is - * not being incremented and flag an error. */ - vTaskDelete( NULL ); -} -/*-----------------------------------------------------------*/ - -static void prvRegTest2Task( void * pvParameters ) -{ - /* Although the regtest task is written in assembly, its entry point is - * written in C for convenience of checking the task parameter is being - * passed in correctly. */ - if( pvParameters == mainREG_TEST_TASK_2_PARAMETER ) - { - /* Start the part of the test that is written in assembly. */ - vRegTest2(); - } - - /* The following line will only execute if the task parameter is found to - * be incorrect. The check task will detect that the regtest loop counter is - * not being incremented and flag an error. */ - vTaskDelete( NULL ); -} -/*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/moved_to_Partner-Supported-Demos b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/moved_to_Partner-Supported-Demos new file mode 100644 index 0000000000..734d4efae3 --- /dev/null +++ b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/moved_to_Partner-Supported-Demos @@ -0,0 +1,3 @@ +All Tensilica demos have been moved to a new location: + +FreeRTOS/Demo/ThirdParty/Partner-Supported-Demos/Cadence_Xtensa_ISS_xt-clang/ diff --git a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S b/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S deleted file mode 100644 index cbb766ceaa..0000000000 --- a/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S +++ /dev/null @@ -1,216 +0,0 @@ -/* - * FreeRTOS V202212.00 - * 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. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -#include "FreeRTOSConfig.h" -//#include "ISR_Support.h" - - .extern ulRegTest1Counter - .extern ulRegTest2Counter - .extern vPortYield - - .global vRegTest1 - .global vRegTest2 - - .text - .align 4 - - -/*-----------------------------------------------------------*/ - -vRegTest1: - - /* Set initial values into the general purpose registers. - * a0 = return address, a1 = stack pointer. */ -#ifdef __XTENSA_WINDOWED_ABI__ - entry a1, 64 - s32i a0, a1, 0 /* Save return address. */ -#else - addi a1, a1, -64 - s32i a0, a1, 0 /* Save return address. */ - s32i a12, a1, 4 /* Save callee-saved regs if call0 ABI. */ - s32i a13, a1, 8 - s32i a14, a1, 12 - s32i a15, a1, 16 -#endif - movi a2, 0x11111111 - movi a3, 0x22222222 - movi a4, 0x33333333 - movi a5, 0x44444444 - movi a6, 0x55555555 - movi a7, 0x66666666 - movi a8, 0x77777777 - movi a9, 0x88888888 - movi a10, 0x99999999 - movi a11, 0xaaaaaaaa - movi a12, 0xbbbbbbbb - movi a13, 0xcccccccc - movi a14, 0xdddddddd - movi a15, 0xeeeeeeee - -_RegTest1Loop: - - /* Loop checking the values originally loaded into the general purpose - * registers remain through the life of the task. */ - movi a0, 0x11111111 - bne a0, a2, _RegTest1Error - movi a0, 0x22222222 - bne a0, a3, _RegTest1Error - movi a0, 0x33333333 - bne a0, a4, _RegTest1Error - movi a0, 0x44444444 - bne a0, a5, _RegTest1Error - movi a0, 0x55555555 - bne a0, a6, _RegTest1Error - movi a0, 0x66666666 - bne a0, a7, _RegTest1Error - movi a0, 0x77777777 - bne a0, a8, _RegTest1Error - movi a0, 0x88888888 - bne a0, a9, _RegTest1Error - movi a0, 0x99999999 - bne a0, a10, _RegTest1Error - movi a0, 0xaaaaaaaa - bne a0, a11, _RegTest1Error - movi a0, 0xbbbbbbbb - bne a0, a12, _RegTest1Error - movi a0, 0xcccccccc - bne a0, a13, _RegTest1Error - movi a0, 0xdddddddd - bne a0, a14, _RegTest1Error - movi a0, 0xeeeeeeee - bne a0, a15, _RegTest1Error - - /* Incrememnt the loop counter to prove this task has not gone into the - * error null loop. */ - s32i a2, a1, 20 - movi a2, ulRegTest1Counter - l32i a0, a2, 0 - addi a0, a0, 1 - s32i a0, a2, 0 - l32i a2, a1, 20 - - /* Loop again. */ - j _RegTest1Loop - -_RegTest1Error: -.L1: - j .L1 - - - .align 4 - -/*-----------------------------------------------------------*/ - -vRegTest2: - - /* Set initial values into the general purpose registers. - * a0 = return address, a1 = stack pointer. */ -#ifdef __XTENSA_WINDOWED_ABI__ - entry a1, 64 - s32i a0, a1, 0 /* Save return address. */ -#else - addi a1, a1, -64 - s32i a0, a1, 0 /* Save return address. */ - s32i a12, a1, 4 /* Save callee-saved regs if call0 ABI. */ - s32i a13, a1, 8 - s32i a14, a1, 12 - s32i a15, a1, 16 -#endif - -_ReInit: - - movi a2, 0x01010101 - movi a3, 0x02020202 - movi a4, 0x03030303 - movi a5, 0x04040404 - movi a6, 0x05050505 - movi a7, 0x06060606 - movi a8, 0x07070707 - movi a9, 0x08080808 - movi a10, 0x09090909 - movi a11, 0x0a0a0a0a - movi a12, 0x0b0b0b0b - movi a13, 0x0c0c0c0c - movi a14, 0x0d0d0d0d - movi a15, 0x0e0e0e0e - -_RegTest2Loop: - - /* Loop checking the values originally loaded into the general purpose - * registers remain through the life of the task. */ - movi a0, 0x01010101 - bne a0, a2, _RegTest1Error - movi a0, 0x02020202 - bne a0, a3, _RegTest1Error - movi a0, 0x03030303 - bne a0, a4, _RegTest1Error - movi a0, 0x04040404 - bne a0, a5, _RegTest1Error - movi a0, 0x05050505 - bne a0, a6, _RegTest1Error - movi a0, 0x06060606 - bne a0, a7, _RegTest1Error - movi a0, 0x07070707 - bne a0, a8, _RegTest1Error - movi a0, 0x08080808 - bne a0, a9, _RegTest1Error - movi a0, 0x09090909 - bne a0, a10, _RegTest1Error - movi a0, 0x0a0a0a0a - bne a0, a11, _RegTest1Error - movi a0, 0x0b0b0b0b - bne a0, a12, _RegTest1Error - movi a0, 0x0c0c0c0c - bne a0, a13, _RegTest1Error - movi a0, 0x0d0d0d0d - bne a0, a14, _RegTest1Error - movi a0, 0x0e0e0e0e - bne a0, a15, _RegTest1Error - - /* Force a yield from one of the reg test tasks to increase coverage. - * IMPORTANT: this call will trash some number of registers. Branch - * to _ReInit to set things up again. */ -#ifdef __XTENSA_WINDOWED_ABI__ - call8 vPortYield -#else - call0 vPortYield -#endif - - /* Increment the loop counter to prove this task has not gone into the - * error null loop. */ - s32i a2, a1, 20 - movi a2, ulRegTest2Counter - l32i a0, a2, 0 - addi a0, a0, 1 - s32i a0, a2, 0 - l32i a2, a1, 20 - - /* Loop again. */ - j _ReInit /* See comments above about not using j _RegTest2Loop. */ - -_RegTest2Error: -.L2: - j .L2 diff --git a/FreeRTOS/Demo/ThirdParty/Partner-Supported-Demos b/FreeRTOS/Demo/ThirdParty/Partner-Supported-Demos index e4183c70fd..022783f7c7 160000 --- a/FreeRTOS/Demo/ThirdParty/Partner-Supported-Demos +++ b/FreeRTOS/Demo/ThirdParty/Partner-Supported-Demos @@ -1 +1 @@ -Subproject commit e4183c70fda884d31a324b40c96fad09057792c9 +Subproject commit 022783f7c75e5c5aa3e2e07606318e7fdae2c79e diff --git a/FreeRTOS/Source b/FreeRTOS/Source index e43553af1e..5f3bab1a32 160000 --- a/FreeRTOS/Source +++ b/FreeRTOS/Source @@ -1 +1 @@ -Subproject commit e43553af1e3d19a1eec27593c332f97e986cbd1c +Subproject commit 5f3bab1a3242640c6e031d9cfb1be756bd76fb3c diff --git a/manifest.yml b/manifest.yml index eff9194b6a..740f3b611b 100644 --- a/manifest.yml +++ b/manifest.yml @@ -5,7 +5,7 @@ license: "MIT" dependencies: - name: "FreeRTOS-Kernel" - version: "e43553af1" + version: "5f3bab1" repository: type: "git" url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git" @@ -138,7 +138,7 @@ dependencies: path: "FreeRTOS/Demo/ThirdParty/Community-Supported-Demos" - name: "FreeRTOS-Partner-Supported-Demos" - version: "e4183c7" + version: "022783f" repository: type: "git" url: "https://github.com/FreeRTOS/FreeRTOS-Partner-Supported-Demos"