summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Sanderson <graham.sanderson@gmail.com>2021-07-09 11:32:42 -0500
committerGitHub <noreply@github.com>2021-07-09 09:32:42 -0700
commit25e73f2e75e8ad1ce5a69cb3219beb6fbddbba9c (patch)
tree02379b8040c18d55f3aef0e1e783897e1f75c04f
parentbec88bfe411eb4373fef0b3573997a370fdb745e (diff)
downloadfreertos-git-25e73f2e75e8ad1ce5a69cb3219beb6fbddbba9c.tar.gz
RP2040 Demo (#618)
* Fix code to match comment; idle prioriry task should not block to yield, as then it will hardly run at all (bug affects SMP tests) * Add RP2040 Demo - can be used for 'main' or 'smp' branch of FreeRTOS_Kernel * move to latest main/ of FreeRTOS-Kernel * move RP2040 demos into Community-Supported * Update whitespace issue Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> * Add SMP to lexicon Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
-rw-r--r--FreeRTOS/Demo/Common/Minimal/semtest.c7
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/.gitignore2
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/CMakeLists.txt13
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/CMakeLists.txt38
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOSConfig.h139
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOS_Kernel_import.cmake62
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/README.md1
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/main.c457
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/pico_sdk_import.cmake62
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/README.md35
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/CMakeLists.txt65
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOSConfig.h139
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOS_Kernel_import.cmake62
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.c85
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.h36
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/RegTest.s187
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.c224
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.h65
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_blinky.c195
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_full.c482
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/pico_sdk_import.cmake62
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/CMakeLists.txt28
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOSConfig.h139
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOS_Kernel_import.cmake62
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/README.md3
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/main.c113
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/pico_sdk_import.cmake62
-rw-r--r--FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/pico_sdk_import.cmake62
m---------FreeRTOS/Source0
-rw-r--r--lexicon.txt1
30 files changed, 2886 insertions, 2 deletions
diff --git a/FreeRTOS/Demo/Common/Minimal/semtest.c b/FreeRTOS/Demo/Common/Minimal/semtest.c
index ba487a243..a4c006909 100644
--- a/FreeRTOS/Demo/Common/Minimal/semtest.c
+++ b/FreeRTOS/Demo/Common/Minimal/semtest.c
@@ -231,7 +231,11 @@ short sError = pdFALSE, sCheckVariableToUse;
a cycle (deliberately so to test the guarding) so will be starving
out lower priority tasks. Block for some time to allow give lower
priority tasks some processor time. */
- vTaskDelay( pxParameters->xBlockTime * semtstDELAY_FACTOR );
+ if( pxParameters->xBlockTime != ( TickType_t ) 0 )
+ {
+ vTaskDelay( pxParameters->xBlockTime * semtstDELAY_FACTOR );
+ }
+
}
else
{
@@ -266,4 +270,3 @@ BaseType_t xTask, xReturn = pdTRUE;
return xReturn;
}
-
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/.gitignore b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/.gitignore
new file mode 100644
index 000000000..f353748e3
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/.gitignore
@@ -0,0 +1,2 @@
+build/
+**/cmake-*/ \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/CMakeLists.txt b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/CMakeLists.txt
new file mode 100644
index 000000000..a50c07117
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Note that this file can be used as a top level CMakeLists.txt to build all the Demos (it includes
+# them all, but they are usable in their own right, which is why no common work is done here)
+
+cmake_minimum_required(VERSION 3.13)
+
+# Pull in SDK (must be before project)
+include(pico_sdk_import.cmake)
+
+PROJECT(examples)
+
+add_subdirectory(OnEitherCore)
+add_subdirectory(Standard)
+add_subdirectory(UsingCMSIS) \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/CMakeLists.txt b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/CMakeLists.txt
new file mode 100644
index 000000000..3260f846b
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 3.13)
+
+# Pull in SDK (must be before project)
+include(pico_sdk_import.cmake)
+# Pull in FreeRTOS
+include(FreeRTOS_Kernel_import.cmake)
+
+project(example C CXX ASM)
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
+
+pico_sdk_init()
+
+add_library(on_either_core_common INTERFACE)
+target_sources(on_either_core_common INTERFACE
+ main.c)
+target_include_directories(on_either_core_common INTERFACE
+ ${CMAKE_CURRENT_LIST_DIR}
+ )
+target_link_libraries(on_either_core_common INTERFACE
+ FreeRTOS-Kernel
+ FreeRTOS-Kernel-Heap1
+ pico_stdlib
+ pico_multicore)
+
+add_executable(on_core_zero)
+target_link_libraries(on_core_zero on_either_core_common)
+pico_add_extra_outputs(on_core_zero)
+pico_enable_stdio_usb(on_core_zero 1)
+
+add_executable(on_core_one)
+target_link_libraries(on_core_one on_either_core_common)
+target_compile_definitions(on_core_one PRIVATE
+ mainRUN_FREE_RTOS_ON_CORE=1
+ PICO_STACK_SIZE=0x1000
+)
+pico_add_extra_outputs(on_core_one)
+#pico_enable_stdio_usb(on_core_one 1)
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOSConfig.h b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOSConfig.h
new file mode 100644
index 000000000..391806900
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOSConfig.h
@@ -0,0 +1,139 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * 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
+ *----------------------------------------------------------*/
+
+/* Scheduler Related */
+#define configUSE_PREEMPTION 1
+#define configUSE_TICKLESS_IDLE 0
+#define configUSE_IDLE_HOOK 0
+#define configUSE_TICK_HOOK 1
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
+#define configMAX_PRIORITIES 32
+#define configMINIMAL_STACK_SIZE ( configSTACK_DEPTH_TYPE ) 256
+#define configUSE_16_BIT_TICKS 0
+
+#define configIDLE_SHOULD_YIELD 1
+
+/* Synchronization Related */
+#define configUSE_MUTEXES 1
+#define configUSE_RECURSIVE_MUTEXES 1
+#define configUSE_APPLICATION_TASK_TAG 0
+#define configUSE_COUNTING_SEMAPHORES 1
+#define configQUEUE_REGISTRY_SIZE 8
+#define configUSE_QUEUE_SETS 1
+#define configUSE_TIME_SLICING 1
+#define configUSE_NEWLIB_REENTRANT 0
+#define configENABLE_BACKWARD_COMPATIBILITY 0
+#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
+
+/* System */
+#define configSTACK_DEPTH_TYPE uint32_t
+#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
+
+/* Memory allocation related definitions. */
+#define configSUPPORT_STATIC_ALLOCATION 0
+#define configSUPPORT_DYNAMIC_ALLOCATION 1
+#define configTOTAL_HEAP_SIZE (128*1024)
+#define configAPPLICATION_ALLOCATED_HEAP 0
+
+/* Hook function related definitions. */
+#define configCHECK_FOR_STACK_OVERFLOW 2
+#define configUSE_MALLOC_FAILED_HOOK 1
+#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
+
+/* Run time and task stats gathering related definitions. */
+#define configGENERATE_RUN_TIME_STATS 0
+#define configUSE_TRACE_FACILITY 1
+#define configUSE_STATS_FORMATTING_FUNCTIONS 0
+
+/* Co-routine related definitions. */
+#define configUSE_CO_ROUTINES 0
+#define configMAX_CO_ROUTINE_PRIORITIES 1
+
+/* Software timer related definitions. */
+#define configUSE_TIMERS 1
+#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
+#define configTIMER_QUEUE_LENGTH 10
+#define configTIMER_TASK_STACK_DEPTH 1024
+
+/* Interrupt nesting behaviour configuration. */
+/*
+#define configKERNEL_INTERRUPT_PRIORITY [dependent of processor]
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY [dependent on processor and application]
+#define configMAX_API_CALL_INTERRUPT_PRIORITY [dependent on processor and application]
+*/
+
+/* SMP port only */
+#define configNUM_CORES 1
+#define configTICK_CORE 1
+#define configRUN_MULTIPLE_PRIORITIES 1
+
+/* RP2040 specific */
+#define configSUPPORT_PICO_SYNC_INTEROP 1
+#define configSUPPORT_PICO_TIME_INTEROP 1
+
+#include <assert.h>
+/* Define to trap errors during development. */
+#define configASSERT(x) assert(x)
+
+/* 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_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_xTaskGetSchedulerState 1
+#define INCLUDE_xTaskGetCurrentTaskHandle 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 1
+#define INCLUDE_xTaskGetIdleTaskHandle 1
+#define INCLUDE_eTaskGetState 1
+#define INCLUDE_xTimerPendFunctionCall 1
+#define INCLUDE_xTaskAbortDelay 1
+#define INCLUDE_xTaskGetHandle 1
+#define INCLUDE_xTaskResumeFromISR 1
+#define INCLUDE_xQueueGetMutexHolder 1
+
+/* A header file that defines trace macro can be included here. */
+
+#endif /* FREERTOS_CONFIG_H */
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOS_Kernel_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOS_Kernel_import.cmake
new file mode 100644
index 000000000..dc68ed038
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/FreeRTOS_Kernel_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <FREERTOS_KERNEL_PATH>/portable/ThirdParty/GCC/RP2040/FREERTOS_KERNEL_import.cmake
+
+# This can be dropped into an external project to help locate the FreeRTOS kernel
+# It should be include()ed prior to project(). Alternatively this file may
+# or the CMakeLists.txt in this directory may be included or added via add_subdirectory
+# respectively.
+
+if (DEFINED ENV{FREERTOS_KERNEL_PATH} AND (NOT FREERTOS_KERNEL_PATH))
+ set(FREERTOS_KERNEL_PATH $ENV{FREERTOS_KERNEL_PATH})
+ message("Using FREERTOS_KERNEL_PATH from environment ('${FREERTOS_KERNEL_PATH}')")
+endif ()
+
+set(FREERTOS_KERNEL_RP2040_RELATIVE_PATH "portable/ThirdParty/GCC/RP2040")
+# undo the above
+set(FREERTOS_KERNEL_RP2040_BACK_PATH "../../../..")
+
+if (NOT FREERTOS_KERNEL_PATH)
+ # check if we are inside the FreeRTOS kernel tree (i.e. this file has been included directly)
+ get_filename_component(_ACTUAL_PATH ${CMAKE_CURRENT_LIST_DIR} REALPATH)
+ get_filename_component(_POSSIBLE_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH} REALPATH)
+ if (_ACTUAL_PATH STREQUAL _POSSIBLE_PATH)
+ get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH} REALPATH)
+ endif()
+ if (_ACTUAL_PATH STREQUAL _POSSIBLE_PATH)
+ get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH} REALPATH)
+ message("Setting FREERTOS_KERNEL_PATH to ${FREERTOS_KERNEL_PATH} based on location of FreeRTOS-Kernel-import.cmake")
+ elseif (PICO_SDK_PATH AND EXISTS "${PICO_SDK_PATH}/../FreeRTOS-Kernel")
+ set(FREERTOS_KERNEL_PATH ${PICO_SDK_PATH}/../FreeRTOS-Kernel)
+ message("Defaulting FREERTOS_KERNEL_PATH as sibling of PICO_SDK_PATH: ${FREERTOS_KERNEL_PATH}")
+ endif()
+endif ()
+
+if (NOT FREERTOS_KERNEL_PATH)
+ foreach(POSSIBLE_SUFFIX Source FreeRTOS-Kernel FreeRTOS/Source)
+ # check if FreeRTOS-Kernel exists under directory that included us
+ set(SEARCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}})
+ set(SEARCH_ROOT ../../../..)
+ get_filename_component(_POSSIBLE_PATH ${SEARCH_ROOT}/${POSSIBLE_SUFFIX} REALPATH)
+ if (EXISTS ${_POSSIBLE_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}/CMakeLists.txt)
+ get_filename_component(FREERTOS_KERNEL_PATH ${_POSSIBLE_PATH} REALPATH)
+ message("Setting FREERTOS_KERNEL_PATH to '${FREERTOS_KERNEL_PATH}' found relative to enclosing project")
+ break()
+ endif()
+ endforeach()
+endif()
+
+if (NOT FREERTOS_KERNEL_PATH)
+ message(FATAL_ERROR "FreeRTOS location was not specified. Please set FREERTOS_KERNEL_PATH.")
+endif()
+
+set(FREERTOS_KERNEL_PATH "${FREERTOS_KERNEL_PATH}" CACHE PATH "Path to the FreeRTOS Kernel")
+
+get_filename_component(FREERTOS_KERNEL_PATH "${FREERTOS_KERNEL_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${FREERTOS_KERNEL_PATH})
+ message(FATAL_ERROR "Directory '${FREERTOS_KERNEL_PATH}' not found")
+endif()
+if (NOT EXISTS ${FREERTOS_KERNEL_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}/CMakeLists.txt)
+ message(FATAL_ERROR "Directory '${FREERTOS_KERNEL_PATH}' does not contain an RP2040 port here: ${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}")
+endif()
+set(FREERTOS_KERNEL_PATH ${FREERTOS_KERNEL_PATH} CACHE PATH "Path to the FreeRTOS_KERNEL" FORCE)
+
+add_subdirectory(${FREERTOS_KERNEL_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH} FREERTOS_KERNEL) \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/README.md b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/README.md
new file mode 100644
index 000000000..db315b793
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/README.md
@@ -0,0 +1 @@
+This demo pulls in CMSIS via the SDK
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/main.c b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/main.c
new file mode 100644
index 000000000..ff3f860a0
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/main.c
@@ -0,0 +1,457 @@
+/* Kernel includes. */
+#include "FreeRTOS.h" /* Must come first. */
+#include "task.h" /* RTOS task related API prototypes. */
+#include "queue.h" /* RTOS queue related API prototypes. */
+#include "timers.h" /* Software timer related API prototypes. */
+#include "semphr.h" /* Semaphore related API prototypes. */
+#include <stdio.h>
+#include "pico/stdlib.h"
+#include "pico/multicore.h"
+
+#ifndef mainRUN_FREE_RTOS_ON_CORE
+#define mainRUN_FREE_RTOS_ON_CORE 0
+#endif
+
+/* Priorities at which the tasks are created. The event semaphore task is
+given the maximum priority of ( configMAX_PRIORITIES - 1 ) to ensure it runs as
+soon as the semaphore is given. */
+#define mainSDK_MUTEX_USE_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
+#define mainSDK_SEMAPHORE_USE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
+#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
+#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
+#define mainEVENT_SEMAPHORE_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
+
+/* The rate at which data is sent to the queue, specified in milliseconds, and
+converted to ticks using the pdMS_TO_TICKS() macro. */
+#define mainQUEUE_SEND_PERIOD_MS pdMS_TO_TICKS( 200 )
+
+/* The period of the example software timer, specified in milliseconds, and
+converted to ticks using the pdMS_TO_TICKS() macro. */
+#define mainSOFTWARE_TIMER_PERIOD_MS pdMS_TO_TICKS( 1000 )
+
+/* The number of items the queue can hold. This is 1 as the receive task
+has a higher priority than the send task, so will remove items as they are added,
+meaning the send task should always find the queue empty. */
+#define mainQUEUE_LENGTH ( 1 )
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Implement this function for any hardware specific clock configuration
+ * that was not already performed before main() was called.
+ */
+static void prvSetupHardware( void );
+
+/*
+ * The queue send and receive 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 assigned to the example software timer as described at
+ * the top of this file.
+ */
+static void vExampleTimerCallback( TimerHandle_t xTimer );
+
+/*
+ * The event semaphore task as described at the top of this file.
+ */
+static void prvEventSemaphoreTask( void *pvParameters );
+
+/**
+ * A task that uses an SDK mutex
+ */
+static void prvSDKMutexUseTask( void *pvParameters );
+
+/**
+ * A task that uses an SDK semaphore
+ */
+static void prvSDKSemaphoreUseTask( void *pvParameters );
+
+/*-----------------------------------------------------------*/
+
+/* The queue used by the queue send and queue receive tasks. */
+static QueueHandle_t xQueue = NULL;
+
+/* The semaphore (in this case binary) that is used by the FreeRTOS tick hook
+ * function and the event semaphore task.
+ */
+static SemaphoreHandle_t xEventSemaphore = NULL;
+
+/* The counters used by the various examples. The usage is described in the
+ * comments at the top of this file.
+ */
+static volatile uint32_t ulCountOfTimerCallbackExecutions = 0;
+static volatile uint32_t ulCountOfItemsSentOnQueue = 0;
+static volatile uint32_t ulCountOfItemsReceivedOnQueue = 0;
+static volatile uint32_t ulCountOfReceivedSemaphores = 0;
+static volatile uint32_t ulCountOfSDKMutexEnters = 0;
+static volatile uint32_t ulCountOfSDKSemaphoreAcquires = 0;
+
+/*-----------------------------------------------------------*/
+
+#include "pico/mutex.h"
+#include "pico/sem.h"
+
+#if configNUM_CORES > 1
+#error Require only one core configured for FreeRTOS
+#endif
+
+auto_init_mutex(xSDKMutex);
+static semaphore_t xSDKSemaphore;
+
+static void prvNonRTOSWorker() {
+ printf("Core %d: Doing regular SDK stuff\n", get_core_num());
+ uint32_t counter;
+ while (true) {
+ mutex_enter_blocking(&xSDKMutex);
+ printf("Core %d: Acquire SDK mutex\n", get_core_num());
+ absolute_time_t end_time = make_timeout_time_ms(750);
+ while (!time_reached(end_time)) {
+ counter++;
+ printf("Core %d: Busy work with mutex %d\n", get_core_num(), counter);
+ busy_wait_us(137384);
+ }
+ printf("Core %d: Release SDK mutex\n", get_core_num());
+ mutex_exit(&xSDKMutex);
+ printf("Core %d: Starting SDK sleep\n", get_core_num());
+ sleep_ms(1200);
+ printf("Core %d: Finish SDK sleep; release SDK semaphore\n", get_core_num());
+ sem_release(&xSDKSemaphore);
+ }
+}
+
+static void prvLaunchRTOS() {
+ printf("Core %d: Launching FreeRTOS scheduler\n", get_core_num());
+ /* Start the tasks and timer running. */
+ vTaskStartScheduler();
+ /* should never reach here */
+ panic_unsupported();
+}
+
+static void prvCore1Entry() {
+#if ( mainRUN_FREE_RTOS_ON_CORE == 1 )
+ prvLaunchRTOS();
+#else
+ prvNonRTOSWorker();
+#endif
+}
+
+int main(void) {
+ TimerHandle_t xExampleSoftwareTimer = NULL;
+
+ /* Configure the system ready to run the demo. The clock configuration
+ can be done here if it was not done before main() was called. */
+ prvSetupHardware();
+
+ /* Create the queue used by the queue send and queue receive tasks. */
+ xQueue = xQueueCreate( /* The number of items the queue can hold. */
+ mainQUEUE_LENGTH,
+ /* The size of each item the queue holds. */
+ sizeof(uint32_t));
+
+
+ /* Create the semaphore used by the FreeRTOS tick hook function and the
+ event semaphore task. NOTE: A semaphore is used for example purposes,
+ using a direct to task notification will be faster! */
+ xEventSemaphore = xSemaphoreCreateBinary();
+
+
+ /* Create the queue receive task as described in the comments at the top
+ of this file. */
+ xTaskCreate( /* The function that implements the task. */
+ prvQueueReceiveTask,
+ /* Text name for the task, just to help debugging. */
+ "Rx",
+ /* The size (in words) of the stack that should be created
+ for the task. */
+ configMINIMAL_STACK_SIZE,
+ /* A parameter that can be passed into the task. Not used
+ in this simple demo. */
+ NULL,
+ /* The priority to assign to the task. tskIDLE_PRIORITY
+ (which is 0) is the lowest priority. configMAX_PRIORITIES - 1
+ is the highest priority. */
+ mainQUEUE_RECEIVE_TASK_PRIORITY,
+ /* Used to obtain a handle to the created task. Not used in
+ this simple demo, so set to NULL. */
+ NULL);
+
+
+ /* Create the queue send task in exactly the same way. Again, this is
+ described in the comments at the top of the file. */
+ xTaskCreate(prvQueueSendTask,
+ "TX",
+ configMINIMAL_STACK_SIZE,
+ NULL,
+ mainQUEUE_SEND_TASK_PRIORITY,
+ NULL);
+
+
+ /* Create the task that is synchronised with an interrupt using the
+ xEventSemaphore semaphore. */
+ xTaskCreate(prvEventSemaphoreTask,
+ "Sem",
+ configMINIMAL_STACK_SIZE,
+ NULL,
+ mainEVENT_SEMAPHORE_TASK_PRIORITY,
+ NULL);
+
+
+ /* Create the task that uses SDK mutexes */
+ xTaskCreate(prvSDKMutexUseTask,
+ "SDK Mutex Use",
+ configMINIMAL_STACK_SIZE,
+ NULL,
+ mainSDK_MUTEX_USE_TASK_PRIORITY,
+ NULL);
+
+ sem_init(&xSDKSemaphore, 0, 1);
+
+ /* Create the task that uses SDK mutexes */
+ xTaskCreate(prvSDKSemaphoreUseTask,
+ "SDK Seamphore Use",
+ configMINIMAL_STACK_SIZE,
+ NULL,
+ mainSDK_SEMAPHORE_USE_TASK_PRIORITY,
+ NULL);
+
+ /* Create the software timer as described in the comments at the top of
+ this file. */
+ xExampleSoftwareTimer = xTimerCreate( /* A text name, purely to help
+ debugging. */
+ (const char *) "LEDTimer",
+ /* The timer period, in this case
+ 1000ms (1s). */
+ mainSOFTWARE_TIMER_PERIOD_MS,
+ /* This is a periodic timer, so
+ xAutoReload is set to pdTRUE. */
+ pdTRUE,
+ /* The ID is not used, so can be set
+ to anything. */
+ (void *) 0,
+ /* The callback function that switches
+ the LED off. */
+ vExampleTimerCallback
+ );
+
+ /* Start the created timer. A block time of zero is used as the timer
+ command queue cannot possibly be full here (this is the first timer to
+ be created, and it is not yet running). */
+ xTimerStart(xExampleSoftwareTimer, 0);
+
+ multicore_launch_core1(prvCore1Entry);
+#if ( mainRUN_FREE_RTOS_ON_CORE == 0 )
+ prvLaunchRTOS();
+#else
+ prvNonRTOSWorker();
+#endif
+}
+/*-----------------------------------------------------------*/
+
+static void vExampleTimerCallback( TimerHandle_t xTimer )
+{
+ /* The timer has expired. Count the number of times this happens. The
+ timer that calls this function is an auto re-load timer, so it will
+ execute periodically. */
+ ulCountOfTimerCallbackExecutions++;
+}
+/*-----------------------------------------------------------*/
+
+static void prvQueueSendTask( void *pvParameters )
+{
+ TickType_t xNextWakeTime;
+ const uint32_t ulValueToSend = 100UL;
+
+ /* 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, the constant used converts ticks
+ to ms. The task will not consume any CPU time while it is in the
+ Blocked state. */
+ vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_PERIOD_MS );
+
+ /* Send to the queue - causing the queue receive task to unblock and
+ increment its counter. 0 is used as the block time so the sending
+ operation will not block - it shouldn't need to block as the queue
+ should always be empty at this point in the code. */
+ ulCountOfItemsSentOnQueue++;
+ printf("Core %d - Thread '%s': Queue send %d\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()), ulCountOfItemsSentOnQueue);
+ xQueueSend( xQueue, &ulValueToSend, 0 );
+ }
+}
+/*-----------------------------------------------------------*/
+
+
+static void prvQueueReceiveTask( void *pvParameters )
+{
+ uint32_t ulReceivedValue;
+
+ for( ;; )
+ {
+ /* Wait until something arrives in the queue - this task will block
+ indefinitely provided INCLUDE_vTaskSuspend is set to 1 in
+ FreeRTOSConfig.h. */
+ xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
+ /* To get here something must have been received from the queue, but
+ is it the expected value? If it is, increment the counter. */
+ if( ulReceivedValue == 100UL )
+ {
+ /* Count the number of items that have been received correctly. */
+ ulCountOfItemsReceivedOnQueue++;
+ printf("Core %d - Thread '%s': Queue receive %d\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()), ulCountOfItemsReceivedOnQueue);
+ }
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvEventSemaphoreTask( void *pvParameters )
+{
+ for( ;; )
+ {
+ /* Block until the semaphore is 'given'. NOTE:
+ A semaphore is used for example purposes. In a real application it might
+ be preferable to use a direct to task notification, which will be faster
+ and use less RAM. */
+ xSemaphoreTake( xEventSemaphore, portMAX_DELAY );
+
+ /* Count the number of times the semaphore is received. */
+ ulCountOfReceivedSemaphores++;
+ printf("Core %d - Thread '%s': Semaphore taken %d\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()), ulCountOfReceivedSemaphores);
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvSDKMutexUseTask( void *pvParameters )
+{
+ for( ;; )
+ {
+ mutex_enter_blocking(&xSDKMutex);
+ ulCountOfSDKMutexEnters++;
+ printf("Core %d - Thread '%s': SDK Mutex Entered, sleeping for a while %d\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()), ulCountOfSDKMutexEnters);
+ vTaskDelay(3000);
+ printf("Core %d - Thread '%s': Sleep finished; SDK Mutex releasing %d\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()), ulCountOfSDKMutexEnters);
+ mutex_exit(&xSDKMutex);
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvSDKSemaphoreUseTask( void *pvParameters )
+{
+ for( ;; )
+ {
+ absolute_time_t t = get_absolute_time();
+ if (sem_acquire_timeout_us(&xSDKSemaphore, 250500)) {
+ ulCountOfSDKSemaphoreAcquires++;
+ printf("Core %d - Thread '%s': SDK Sem acquired %d\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()), ulCountOfSDKMutexEnters);
+ } else {
+ printf("Core %d - Thread '%s': SDK Sem wait timeout (ok) after %d us\n", get_core_num(), pcTaskGetName(xTaskGetCurrentTaskHandle()),
+ (int)absolute_time_diff_us(t, get_absolute_time()));
+ }
+ }
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationTickHook( void )
+{
+ BaseType_t xHigherPriorityTaskWoken = pdFALSE;
+ static uint32_t ulCount = 0;
+
+ /* The RTOS tick hook function is enabled by setting configUSE_TICK_HOOK to
+ 1 in FreeRTOSConfig.h.
+
+ "Give" the semaphore on every 500th tick interrupt. */
+ ulCount++;
+ if( ulCount >= 50UL )
+ {
+ /* This function is called from an interrupt context (the RTOS tick
+ interrupt), so only ISR safe API functions can be used (those that end
+ in "FromISR()".
+
+ xHigherPriorityTaskWoken was initialised to pdFALSE, and will be set to
+ pdTRUE by xSemaphoreGiveFromISR() if giving the semaphore unblocked a
+ task that has equal or higher priority than the interrupted task.
+ NOTE: A semaphore is used for example purposes. In a real application it
+ might be preferable to use a direct to task notification,
+ which will be faster and use less RAM. */
+ gpio_xor_mask(1u << PICO_DEFAULT_LED_PIN);
+ xSemaphoreGiveFromISR( xEventSemaphore, &xHigherPriorityTaskWoken );
+ ulCount = 0UL;
+ }
+
+ /* If xHigherPriorityTaskWoken is pdTRUE then a context switch should
+ normally be performed before leaving the interrupt (because during the
+ execution of the interrupt a task of equal or higher priority than the
+ running task was unblocked). The syntax required to context switch from
+ an interrupt is port dependent, so check the documentation of the port you
+ are using.
+
+ In this case, the function is running in the context of the tick interrupt,
+ which will automatically check for the higher priority task to run anyway,
+ so no further action is required. */
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationMallocFailedHook( void )
+{
+ /* The malloc failed hook is enabled by setting
+ configUSE_MALLOC_FAILED_HOOK to 1 in FreeRTOSConfig.h.
+
+ Called if a call to pvPortMalloc() fails because there is insufficient
+ free memory available in the FreeRTOS heap. pvPortMalloc() is called
+ internally by FreeRTOS API functions that create tasks, queues, software
+ timers, and semaphores. The size of the FreeRTOS heap is set by the
+ configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
+ panic("malloc failed");
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
+{
+ ( void ) pcTaskName;
+ ( void ) xTask;
+
+ /* Run time stack overflow checking is performed if
+ configconfigCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
+ function is called if a stack overflow is detected. pxCurrentTCB can be
+ inspected in the debugger if the task name passed into this function is
+ corrupt. */
+ for( ;; );
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationIdleHook( void )
+{
+ volatile size_t xFreeStackSpace;
+
+ /* The idle task hook is enabled by setting configUSE_IDLE_HOOK to 1 in
+ FreeRTOSConfig.h.
+
+ This function is called on each cycle of the idle task. In this case it
+ does nothing useful, other than report the amount of FreeRTOS heap that
+ remains unallocated. */
+ xFreeStackSpace = xPortGetFreeHeapSize();
+
+ if( xFreeStackSpace > 100 )
+ {
+ /* By now, the kernel has allocated everything it is going to, so
+ if there is a lot of heap remaining unallocated then
+ the value of configTOTAL_HEAP_SIZE in FreeRTOSConfig.h can be
+ reduced accordingly. */
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvSetupHardware( void )
+{
+ /* Want to be able to printf */
+ stdio_init_all();
+ /* And flash LED */
+ gpio_init(PICO_DEFAULT_LED_PIN);
+ gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
+} \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/pico_sdk_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/pico_sdk_import.cmake
new file mode 100644
index 000000000..28efe9eab
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/OnEitherCore/pico_sdk_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake
+
+# This can be dropped into an external project to help locate this SDK
+# It should be include()ed prior to project()
+
+if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))
+ set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
+ message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT))
+ set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT})
+ message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH))
+ set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH})
+ message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
+endif ()
+
+set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
+set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
+set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
+
+if (NOT PICO_SDK_PATH)
+ if (PICO_SDK_FETCH_FROM_GIT)
+ include(FetchContent)
+ set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR})
+ if (PICO_SDK_FETCH_FROM_GIT_PATH)
+ get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
+ endif ()
+ FetchContent_Declare(
+ pico_sdk
+ GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
+ GIT_TAG master
+ )
+ if (NOT pico_sdk)
+ message("Downloading Raspberry Pi Pico SDK")
+ FetchContent_Populate(pico_sdk)
+ set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR})
+ endif ()
+ set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE})
+ else ()
+ message(FATAL_ERROR
+ "SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git."
+ )
+ endif ()
+endif ()
+
+get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${PICO_SDK_PATH})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found")
+endif ()
+
+set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake)
+if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK")
+endif ()
+
+set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE)
+
+include(${PICO_SDK_INIT_CMAKE_FILE})
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/README.md b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/README.md
new file mode 100644
index 000000000..be2bad779
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/README.md
@@ -0,0 +1,35 @@
+## Introduction
+
+These are the demo programs for the RP2040 port of the FreeRTOS-Kernel. Note that these
+same examples are used for both the regular and SMP versions of the RP2040 FreeRTOS-Kernel, although obviously the SMP specific examples are skipped in the former.
+
+To switch between SMP or regular FreeRTOS-Kernel, you can currently change the branch of the FreeRTOS-Kernel at `/Source` between `main` and `smp`, or you can use the `FREERTOS_KERNEL_PATH` (see below) to point to the version you want.
+
+## Building
+
+The examples build as regular Raspberry Pi Pico SDK applications. You can build either from this root directory, or build from within the individual examples' directories.
+
+See [Getting Started With Pico](https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf) in the SDK documentation for setting up a Raspberry Pi Pico SDK build environment. If you are already set up, then just make sure `PICO_SDK_PATH` is set in your environment or pass it via `-DPICO_SDK_PATH=xxx` on the Cmake command line.
+
+To build from the command line on unix, from this directory (or from the individual examples' directories), type:
+
+```shell
+mkdir build
+cd build
+cmake ..
+make
+```
+
+This will generate `.uf2` files for each example under the relevant build directories.
+
+You may set `FREERTOS_KERNEL_PATH` in your environment or on the CMake command line to point at a specific instance of the FreeRTOS Kernel, otherwise the version from `Source/` within this project is used.
+
+## Demos
+
+### Standard
+
+These are the standard _Minimal_ main_blink and main_full test demos.
+
+### OnEitherCore
+
+Two versions of the same demo of interaction with SDK code running on one core, and FreeRTOS tasks running on the other (and the use of SDK synchronization primitives to communicate between them). One version has FreeRTOS on core 0, the other has FreeRTOS on core 1. \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/CMakeLists.txt b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/CMakeLists.txt
new file mode 100644
index 000000000..6fc7bd8ce
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/CMakeLists.txt
@@ -0,0 +1,65 @@
+cmake_minimum_required(VERSION 3.13)
+
+# Pull in SDK (must be before project)
+include(pico_sdk_import.cmake)
+
+# Pull in FreeRTOS
+include(FreeRTOS_Kernel_import.cmake)
+
+project(example C CXX ASM)
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
+
+pico_sdk_init()
+
+add_executable(main_full
+ main.c
+ main_full.c
+ IntQueueTimer.c
+ RegTest.s
+ ../../Common/Minimal/blocktim.c
+ ../../Common/Minimal/countsem.c
+ ../../Common/Minimal/dynamic.c
+ ../../Common/Minimal/recmutex.c
+ ../../Common/Minimal/QueueOverwrite.c
+ ../../Common/Minimal/EventGroupsDemo.c
+ ../../Common/Minimal/IntSemTest.c
+ ../../Common/Minimal/IntQueue.c
+ ../../Common/Minimal/TaskNotify.c
+ ../../Common/Minimal/TimerDemo.c
+ ../../Common/Minimal/GenQTest.c
+ ../../Common/Minimal/death.c
+ ../../Common/Minimal/semtest.c
+ ../../Common/Minimal/BlockQ.c
+ ../../Common/Minimal/flop.c
+ )
+
+target_compile_definitions(main_full PRIVATE
+ mainCREATE_SIMPLE_BLINKY_DEMO_ONLY=0
+ )
+
+target_include_directories(main_full PRIVATE
+ ${CMAKE_CURRENT_LIST_DIR}
+ ${CMAKE_CURRENT_LIST_DIR}/../../Common/include)
+
+target_compile_definitions(main_full PRIVATE
+ PICO_STDIO_STACK_BUFFER_SIZE=64 # use a small printf on stack buffer
+)
+target_link_libraries(main_full pico_stdlib FreeRTOS-Kernel FreeRTOS-Kernel-Heap4)
+pico_add_extra_outputs(main_full)
+
+add_executable(main_blinky
+ main.c
+ main_blinky.c
+ )
+
+target_compile_definitions(main_blinky PRIVATE
+ mainCREATE_SIMPLE_BLINKY_DEMO_ONLY=1
+ )
+
+target_include_directories(main_blinky PRIVATE
+ ${CMAKE_CURRENT_LIST_DIR}
+ ${CMAKE_CURRENT_LIST_DIR}/../../Common/include)
+
+target_link_libraries(main_blinky pico_stdlib FreeRTOS-Kernel FreeRTOS-Kernel-Heap1)
+pico_add_extra_outputs(main_blinky) \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOSConfig.h b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOSConfig.h
new file mode 100644
index 000000000..7245ecbd9
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOSConfig.h
@@ -0,0 +1,139 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * 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
+ *----------------------------------------------------------*/
+
+/* Scheduler Related */
+#define configUSE_PREEMPTION 1
+#define configUSE_TICKLESS_IDLE 0
+#define configUSE_IDLE_HOOK 0
+#define configUSE_TICK_HOOK 1
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
+#define configMAX_PRIORITIES 32
+#define configMINIMAL_STACK_SIZE ( configSTACK_DEPTH_TYPE ) 256
+#define configUSE_16_BIT_TICKS 0
+
+#define configIDLE_SHOULD_YIELD 1
+
+/* Synchronization Related */
+#define configUSE_MUTEXES 1
+#define configUSE_RECURSIVE_MUTEXES 1
+#define configUSE_APPLICATION_TASK_TAG 0
+#define configUSE_COUNTING_SEMAPHORES 1
+#define configQUEUE_REGISTRY_SIZE 8
+#define configUSE_QUEUE_SETS 1
+#define configUSE_TIME_SLICING 1
+#define configUSE_NEWLIB_REENTRANT 0
+#define configENABLE_BACKWARD_COMPATIBILITY 0
+#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
+
+/* System */
+#define configSTACK_DEPTH_TYPE uint32_t
+#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
+
+/* Memory allocation related definitions. */
+#define configSUPPORT_STATIC_ALLOCATION 0
+#define configSUPPORT_DYNAMIC_ALLOCATION 1
+#define configTOTAL_HEAP_SIZE (128*1024)
+#define configAPPLICATION_ALLOCATED_HEAP 0
+
+/* Hook function related definitions. */
+#define configCHECK_FOR_STACK_OVERFLOW 2
+#define configUSE_MALLOC_FAILED_HOOK 1
+#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
+
+/* Run time and task stats gathering related definitions. */
+#define configGENERATE_RUN_TIME_STATS 0
+#define configUSE_TRACE_FACILITY 1
+#define configUSE_STATS_FORMATTING_FUNCTIONS 0
+
+/* Co-routine related definitions. */
+#define configUSE_CO_ROUTINES 0
+#define configMAX_CO_ROUTINE_PRIORITIES 1
+
+/* Software timer related definitions. */
+#define configUSE_TIMERS 1
+#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
+#define configTIMER_QUEUE_LENGTH 10
+#define configTIMER_TASK_STACK_DEPTH 1024
+
+/* Interrupt nesting behaviour configuration. */
+/*
+#define configKERNEL_INTERRUPT_PRIORITY [dependent of processor]
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY [dependent on processor and application]
+#define configMAX_API_CALL_INTERRUPT_PRIORITY [dependent on processor and application]
+*/
+
+/* SMP port only */
+#define configNUM_CORES 2
+#define configTICK_CORE 0
+#define configRUN_MULTIPLE_PRIORITIES 0
+
+/* RP2040 specific */
+#define configSUPPORT_PICO_SYNC_INTEROP 1
+#define configSUPPORT_PICO_TIME_INTEROP 1
+
+#include <assert.h>
+/* Define to trap errors during development. */
+#define configASSERT(x) assert(x)
+
+/* 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_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_xTaskGetSchedulerState 1
+#define INCLUDE_xTaskGetCurrentTaskHandle 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 1
+#define INCLUDE_xTaskGetIdleTaskHandle 1
+#define INCLUDE_eTaskGetState 1
+#define INCLUDE_xTimerPendFunctionCall 1
+#define INCLUDE_xTaskAbortDelay 1
+#define INCLUDE_xTaskGetHandle 1
+#define INCLUDE_xTaskResumeFromISR 1
+#define INCLUDE_xQueueGetMutexHolder 1
+
+/* A header file that defines trace macro can be included here. */
+
+#endif /* FREERTOS_CONFIG_H */
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOS_Kernel_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOS_Kernel_import.cmake
new file mode 100644
index 000000000..dc68ed038
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/FreeRTOS_Kernel_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <FREERTOS_KERNEL_PATH>/portable/ThirdParty/GCC/RP2040/FREERTOS_KERNEL_import.cmake
+
+# This can be dropped into an external project to help locate the FreeRTOS kernel
+# It should be include()ed prior to project(). Alternatively this file may
+# or the CMakeLists.txt in this directory may be included or added via add_subdirectory
+# respectively.
+
+if (DEFINED ENV{FREERTOS_KERNEL_PATH} AND (NOT FREERTOS_KERNEL_PATH))
+ set(FREERTOS_KERNEL_PATH $ENV{FREERTOS_KERNEL_PATH})
+ message("Using FREERTOS_KERNEL_PATH from environment ('${FREERTOS_KERNEL_PATH}')")
+endif ()
+
+set(FREERTOS_KERNEL_RP2040_RELATIVE_PATH "portable/ThirdParty/GCC/RP2040")
+# undo the above
+set(FREERTOS_KERNEL_RP2040_BACK_PATH "../../../..")
+
+if (NOT FREERTOS_KERNEL_PATH)
+ # check if we are inside the FreeRTOS kernel tree (i.e. this file has been included directly)
+ get_filename_component(_ACTUAL_PATH ${CMAKE_CURRENT_LIST_DIR} REALPATH)
+ get_filename_component(_POSSIBLE_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH} REALPATH)
+ if (_ACTUAL_PATH STREQUAL _POSSIBLE_PATH)
+ get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH} REALPATH)
+ endif()
+ if (_ACTUAL_PATH STREQUAL _POSSIBLE_PATH)
+ get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH} REALPATH)
+ message("Setting FREERTOS_KERNEL_PATH to ${FREERTOS_KERNEL_PATH} based on location of FreeRTOS-Kernel-import.cmake")
+ elseif (PICO_SDK_PATH AND EXISTS "${PICO_SDK_PATH}/../FreeRTOS-Kernel")
+ set(FREERTOS_KERNEL_PATH ${PICO_SDK_PATH}/../FreeRTOS-Kernel)
+ message("Defaulting FREERTOS_KERNEL_PATH as sibling of PICO_SDK_PATH: ${FREERTOS_KERNEL_PATH}")
+ endif()
+endif ()
+
+if (NOT FREERTOS_KERNEL_PATH)
+ foreach(POSSIBLE_SUFFIX Source FreeRTOS-Kernel FreeRTOS/Source)
+ # check if FreeRTOS-Kernel exists under directory that included us
+ set(SEARCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}})
+ set(SEARCH_ROOT ../../../..)
+ get_filename_component(_POSSIBLE_PATH ${SEARCH_ROOT}/${POSSIBLE_SUFFIX} REALPATH)
+ if (EXISTS ${_POSSIBLE_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}/CMakeLists.txt)
+ get_filename_component(FREERTOS_KERNEL_PATH ${_POSSIBLE_PATH} REALPATH)
+ message("Setting FREERTOS_KERNEL_PATH to '${FREERTOS_KERNEL_PATH}' found relative to enclosing project")
+ break()
+ endif()
+ endforeach()
+endif()
+
+if (NOT FREERTOS_KERNEL_PATH)
+ message(FATAL_ERROR "FreeRTOS location was not specified. Please set FREERTOS_KERNEL_PATH.")
+endif()
+
+set(FREERTOS_KERNEL_PATH "${FREERTOS_KERNEL_PATH}" CACHE PATH "Path to the FreeRTOS Kernel")
+
+get_filename_component(FREERTOS_KERNEL_PATH "${FREERTOS_KERNEL_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${FREERTOS_KERNEL_PATH})
+ message(FATAL_ERROR "Directory '${FREERTOS_KERNEL_PATH}' not found")
+endif()
+if (NOT EXISTS ${FREERTOS_KERNEL_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}/CMakeLists.txt)
+ message(FATAL_ERROR "Directory '${FREERTOS_KERNEL_PATH}' does not contain an RP2040 port here: ${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}")
+endif()
+set(FREERTOS_KERNEL_PATH ${FREERTOS_KERNEL_PATH} CACHE PATH "Path to the FreeRTOS_KERNEL" FORCE)
+
+add_subdirectory(${FREERTOS_KERNEL_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH} FREERTOS_KERNEL) \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.c b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.c
new file mode 100644
index 000000000..da30ed4fc
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.c
@@ -0,0 +1,85 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * http://www.FreeRTOS.org
+ * http://aws.amazon.com/freertos
+ *
+ * 1 tab == 4 spaces!
+ */
+
+/* Scheduler includes. */
+#include "FreeRTOS.h"
+#include "task.h"
+
+/* Demo includes. */
+#include "IntQueueTimer.h"
+#include "IntQueue.h"
+
+/* SDK APIs.*/
+#include "pico/time.h"
+#include "hardware/irq.h"
+
+/* The priorities for the two timers. Note that a priority of 0 is the highest
+possible on Cortex-M devices. */
+#define tmrMAX_PRIORITY ( 0UL )
+#define trmSECOND_HIGHEST_PRIORITY ( tmrMAX_PRIORITY + 0x40 )
+
+#define FIRST_TIMER_PERIOD_US 500
+#define SECOND_TIMER_PERIOD_US 487
+
+void prvAlarm0Callback( uint timer )
+{
+ configASSERT(timer == 0);
+ BaseType_t xHigherPriorityTaskWoken = xFirstTimerHandler();
+ hardware_alarm_set_target(0, make_timeout_time_us( FIRST_TIMER_PERIOD_US) );
+ portEND_SWITCHING_ISR(xHigherPriorityTaskWoken);
+}
+
+void prvAlarm1Callback( uint timer )
+{
+ configASSERT(timer == 1);
+ BaseType_t xHigherPriorityTaskWoken = xSecondTimerHandler();
+ hardware_alarm_set_target(1, make_timeout_time_us( SECOND_TIMER_PERIOD_US) );
+ portEND_SWITCHING_ISR(xHigherPriorityTaskWoken);
+}
+
+void vInitialiseTimerForIntQueueTest( void )
+{
+ /* Use raw hardware alarms so we have nested interrupts */
+ hardware_alarm_claim(0);
+ hardware_alarm_claim(1);
+
+ /* Don't generate interrupts until the scheduler has been started.
+ Interrupts will be automatically enabled when the first task starts
+ running. */
+ taskDISABLE_INTERRUPTS();
+
+ /* Initialize timers. */
+
+ /* Set the timer interrupts to be above the kernel. The interrupts are
+ assigned different priorities so they nest with each other. */
+ irq_set_priority(TIMER_IRQ_0, tmrMAX_PRIORITY);
+ irq_set_priority(TIMER_IRQ_1, trmSECOND_HIGHEST_PRIORITY);
+ hardware_alarm_set_callback(0, prvAlarm0Callback);
+ hardware_alarm_set_callback(1, prvAlarm1Callback);
+ hardware_alarm_set_target(0, make_timeout_time_us( FIRST_TIMER_PERIOD_US) );
+ hardware_alarm_set_target(1, make_timeout_time_us( SECOND_TIMER_PERIOD_US) );
+}
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.h b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.h
new file mode 100644
index 000000000..9a9c40b16
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/IntQueueTimer.h
@@ -0,0 +1,36 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * http://www.FreeRTOS.org
+ * http://aws.amazon.com/freertos
+ *
+ * 1 tab == 4 spaces!
+ */
+
+#ifndef INT_QUEUE_TIMER_H
+#define INT_QUEUE_TIMER_H
+
+void vInitialiseTimerForIntQueueTest( void );
+portBASE_TYPE xTimer0Handler( void );
+portBASE_TYPE xTimer1Handler( void );
+
+#endif
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/RegTest.s b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/RegTest.s
new file mode 100644
index 000000000..36c1123d6
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/RegTest.s
@@ -0,0 +1,187 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * http://www.FreeRTOS.org
+ * http://aws.amazon.com/freertos
+ *
+ * 1 tab == 4 spaces!
+ */
+
+.syntax unified
+.cpu cortex-m0plus
+.thumb
+
+.global vRegTest1Implementation
+.global vRegTest2Implementation
+
+/*-----------------------------------------------------------*/
+vRegTest1Implementation:
+
+ /* Fill the core registers with known values. This is only done once. */
+ movs r1, #101
+ movs r2, #102
+ movs r3, #103
+ movs r4, #104
+ movs r5, #105
+ movs r6, #106
+ movs r7, #107
+ movs r0, #108
+ mov r8, r0
+ movs r0, #109
+ mov r9, r0
+ movs r0, #110
+ mov r10, r0
+ movs r0, #111
+ mov r11, r0
+ movs r0, #112
+ mov r12, r0
+ movs r0, #100
+
+reg1_loop:
+ /* Repeatedly check that each register still contains the value written to
+ it when the task started. */
+ cmp r0, #100
+ bne reg1_error_loop
+ cmp r1, #101
+ bne reg1_error_loop
+ cmp r2, #102
+ bne reg1_error_loop
+ cmp r3, #103
+ bne reg1_error_loop
+ cmp r4, #104
+ bne reg1_error_loop
+ cmp r5, #105
+ bne reg1_error_loop
+ cmp r6, #106
+ bne reg1_error_loop
+ cmp r7, #107
+ bne reg1_error_loop
+ movs r0, #108
+ cmp r8, r0
+ bne reg1_error_loop
+ movs r0, #109
+ cmp r9, r0
+ bne reg1_error_loop
+ movs r0, #110
+ cmp r10, r0
+ bne reg1_error_loop
+ movs r0, #111
+ cmp r11, r0
+ bne reg1_error_loop
+ movs r0, #112
+ cmp r12, r0
+ bne reg1_error_loop
+
+ /* Everything passed, increment the loop counter. */
+ push { r1 }
+ ldr r0, =ulRegTest1LoopCounter
+ ldr r1, [r0]
+ adds r1, r1, #1
+ str r1, [r0]
+ pop { r1 }
+
+ /* Start again. */
+ movs r0, #100
+ b reg1_loop
+
+reg1_error_loop:
+ /* If this line is hit then there was an error in a core register value.
+ The loop ensures the loop counter stops incrementing. */
+ b reg1_error_loop
+ nop
+
+
+
+vRegTest2Implementation:
+
+ /* Fill the core registers with known values. This is only done once. */
+ movs r1, #1
+ movs r2, #2
+ movs r3, #3
+ movs r4, #4
+ movs r5, #5
+ movs r6, #6
+ movs r7, #7
+ movs r0, #8
+ mov r8, r0
+ movs r0, #9
+ mov r9, r0
+ movs r0, #10
+ mov r10, r0
+ movs r0, #11
+ mov r11, r0
+ movs r0, #12
+ mov r12, r0
+ movs r0, #10
+
+reg2_loop:
+ /* Repeatedly check that each register still contains the value written to
+ it when the task started. */
+ cmp r0, #10
+ bne reg2_error_loop
+ cmp r1, #1
+ bne reg2_error_loop
+ cmp r2, #2
+ bne reg2_error_loop
+ cmp r3, #3
+ bne reg2_error_loop
+ cmp r4, #4
+ bne reg2_error_loop
+ cmp r5, #5
+ bne reg2_error_loop
+ cmp r6, #6
+ bne reg2_error_loop
+ cmp r7, #7
+ bne reg2_error_loop
+ movs r0, #8
+ cmp r8, r0
+ bne reg2_error_loop
+ movs r0, #9
+ cmp r9, r0
+ bne reg2_error_loop
+ movs r0, #10
+ cmp r10, r0
+ bne reg2_error_loop
+ movs r0, #11
+ cmp r11, r0
+ bne reg2_error_loop
+ movs r0, #12
+ cmp r12, r0
+ bne reg2_error_loop
+
+ /* Everything passed, increment the loop counter. */
+ push { r1 }
+ ldr r0, =ulRegTest2LoopCounter
+ ldr r1, [r0]
+ adds r1, r1, #1
+ str r1, [r0]
+ pop { r1 }
+
+ /* Start again. */
+ movs r0, #10
+ b reg2_loop
+
+reg2_error_loop:
+ /* If this line is hit then there was an error in a core register value.
+ The loop ensures the loop counter stops incrementing. */
+ b reg2_error_loop
+ nop
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.c b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.c
new file mode 100644
index 000000000..8e2409df3
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.c
@@ -0,0 +1,224 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * http://www.FreeRTOS.org
+ * http://aws.amazon.com/freertos
+ *
+ * 1 tab == 4 spaces!
+ */
+
+/******************************************************************************
+ * This project provides two demo applications. A simple blinky style project,
+ * and a more comprehensive test and demo application. The
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to
+ * select between the two. The simply blinky demo is implemented and described
+ * in main_blinky.c. The more comprehensive test and demo application is
+ * implemented and described in main_full.c.
+ *
+ * This file implements the code that is not demo specific, including the
+ * hardware setup and standard FreeRTOS hook functions.
+ *
+ * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON
+ * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO
+ * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!
+ *
+ */
+
+/* Scheduler include files. */
+#include "FreeRTOS.h"
+#include "task.h"
+#include "semphr.h"
+
+/* Standard demo includes. */
+#include "TimerDemo.h"
+#include "QueueOverwrite.h"
+#include "EventGroupsDemo.h"
+#include "IntSemTest.h"
+#include "TaskNotify.h"
+
+#include "main.h"
+
+/* Library includes. */
+#include <stdio.h>
+#include "pico/stdlib.h"
+#if ( mainRUN_ON_CORE == 1 )
+#include "pico/multicore.h"
+#endif
+
+/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
+or 0 to run the more comprehensive test and demo application. */
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Configure the hardware as necessary to run this demo.
+ */
+static void prvSetupHardware( void );
+
+/*
+ * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
+ */
+#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1
+extern void main_blinky( void );
+#else
+extern void main_full( void );
+#endif /* #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 */
+
+/* Prototypes for the standard FreeRTOS callback/hook functions implemented
+within this file. */
+void vApplicationMallocFailedHook( void );
+void vApplicationIdleHook( void );
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
+void vApplicationTickHook( void );
+
+/*-----------------------------------------------------------*/
+
+void vLaunch( 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
+}
+
+int main( void )
+{
+ /* Configure the hardware ready to run the demo. */
+ prvSetupHardware();
+ const char *rtos_name;
+#if ( portSUPPORT_SMP == 1 )
+ rtos_name = "FreeRTOS SMP";
+#else
+ rtos_name = "FreeRTOS";
+#endif
+
+#if ( portSUPPORT_SMP == 1 ) && ( configNUM_CORES == 2 )
+ printf("%s on both cores:\n", rtos_name);
+ vLaunch();
+#endif
+
+#if ( mainRUN_ON_CORE == 1 )
+ printf("%s on core 1:\n", rtos_name);
+ multicore_launch_core1(vLaunch);
+ while (true);
+#else
+ printf("%s on core 0:\n", rtos_name);
+ vLaunch();
+#endif
+
+ return 0;
+}
+/*-----------------------------------------------------------*/
+
+static void prvSetupHardware( void )
+{
+ stdio_init_all();
+ gpio_init(PICO_DEFAULT_LED_PIN);
+ gpio_set_dir(PICO_DEFAULT_LED_PIN, 1);
+ gpio_put(PICO_DEFAULT_LED_PIN, !PICO_DEFAULT_LED_PIN_INVERTED);
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationMallocFailedHook( void )
+{
+ /* Called if a call to pvPortMalloc() fails because there is insufficient
+ free memory available in the FreeRTOS heap. pvPortMalloc() is called
+ internally by FreeRTOS API functions that create tasks, queues, software
+ timers, and semaphores. The size of the FreeRTOS heap is set by the
+ configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
+
+ /* Force an assert. */
+ configASSERT( ( volatile void * ) NULL );
+}
+/*-----------------------------------------------------------*/
+
+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. */
+
+ /* Force an assert. */
+ configASSERT( ( volatile void * ) NULL );
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationIdleHook( void )
+{
+ volatile size_t xFreeHeapSpace;
+
+ /* This is just a trivial example of an idle hook. It is called on each
+ cycle of the idle task. It must *NOT* attempt to block. In this case the
+ idle task just queries the amount of FreeRTOS heap that remains. See the
+ memory management section on the http://www.FreeRTOS.org web site for memory
+ management options. If there is a lot of heap memory free then the
+ configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up
+ RAM. */
+ xFreeHeapSpace = xPortGetFreeHeapSize();
+
+ /* Remove compiler warning about xFreeHeapSpace being set but never used. */
+ ( void ) xFreeHeapSpace;
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationTickHook( void )
+{
+#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0
+ {
+ /* The full demo includes a software timer demo/test that requires
+ prodding periodically from the tick interrupt. */
+ #if (mainENABLE_TIMER_DEMO == 1)
+ vTimerPeriodicISRTests();
+ #endif
+
+ /* Call the periodic queue overwrite from ISR demo. */
+ #if (mainENABLE_QUEUE_OVERWRITE == 1)
+ vQueueOverwritePeriodicISRDemo();
+ #endif
+
+ /* Call the periodic event group from ISR demo. */
+ #if (mainENABLE_EVENT_GROUP == 1)
+ vPeriodicEventGroupsProcessing();
+ #endif
+
+ /* Call the code that uses a mutex from an ISR. */
+ #if (mainENABLE_INTERRUPT_SEMAPHORE == 1)
+ vInterruptSemaphorePeriodicTest();
+ #endif
+
+ /* Call the code that 'gives' a task notification from an ISR. */
+ #if (mainENABLE_TASK_NOTIFY == 1)
+ xNotifyTaskFromISR();
+ #endif
+ }
+#endif
+}
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.h b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.h
new file mode 100644
index 000000000..8cdb8f182
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main.h
@@ -0,0 +1,65 @@
+/*
+ * FreeRTOS Kernel V10.4.3
+ * 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
+ *
+ * 1 tab == 4 spaces!
+ */
+
+#ifndef MAIN_H
+#define MAIN_H
+
+#define mainRUN_ON_CORE 0
+
+
+/* These tests should work in all modes */
+#define mainENABLE_COUNTING_SEMAPHORE 1
+#define mainENABLE_DEATH 1
+
+/* TODO: This still seems flaky on SMP */
+#if ( portSUPPORT_SMP == 0)
+ #define mainENABLE_INTERRUPT_QUEUE 1
+#endif
+#define mainENABLE_MATH 1
+#define mainENABLE_QUEUE_OVERWRITE 1
+#define mainENABLE_REG_TEST 1
+#define mainENABLE_SEMAPHORE 1
+#define mainENABLE_TASK_NOTIFY 1
+
+#if configNUM_CORES != 2 || configRUN_MULTIPLE_PRIORITIES == 0
+
+/* These tests assume that a higher priority task will block a lower priority tax from running */
+#define mainENABLE_BLOCK_TIME 1
+#define mainENABLE_BLOCKING_QUEUE 1
+#define mainENABLE_GENERIC_QUEUE 1
+#define mainENABLE_INTERRUPT_SEMAPHORE 1
+#define mainENABLE_EVENT_GROUP 1
+#define mainENABLE_RECURSIVE_MUTEX 1
+#define mainENABLE_TIMER_DEMO 1
+#endif
+
+#if configNUM_CORES != 2
+/* This test just expects two tasks not to run concurrently */
+#define mainENABLE_DYNAMIC_PRIORITY 1
+#endif
+
+#endif /* MAIN_H */ \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_blinky.c b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_blinky.c
new file mode 100644
index 000000000..1071e7911
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_blinky.c
@@ -0,0 +1,195 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * http://www.FreeRTOS.org
+ * http://aws.amazon.com/freertos
+ *
+ * 1 tab == 4 spaces!
+ */
+
+/******************************************************************************
+ * NOTE 1: This project provides two demo applications. A simple blinky
+ * style project, and a more comprehensive test and demo application. The
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
+ * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
+ * in main.c. This file implements the simply blinky style version.
+ *
+ * NOTE 2: This file only contains the source code that is specific to the
+ * basic demo. Generic functions, such FreeRTOS hook functions, and functions
+ * required to configure the hardware are defined in main.c.
+ ******************************************************************************
+ *
+ * main_blinky() creates one queue, 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. prvQueueSendTask() sits in a loop that causes it to repeatedly
+ * block for 200 milliseconds, before sending the value 100 to the queue that
+ * was created within main_blinky(). Once the value is sent, the task loops
+ * back around to block for another 200 milliseconds...and so on.
+ *
+ * The Queue Receive Task:
+ * The queue receive task is implemented by the prvQueueReceiveTask() function
+ * in this file. prvQueueReceiveTask() sits in a loop where it repeatedly
+ * blocks on attempts to read data from the queue that was created within
+ * main_blinky(). When data is received, the task checks the value of the
+ * data, and if the value equals the expected 100, toggles an LED. The 'block
+ * time' parameter passed to the queue receive function specifies that the
+ * task should be held in the Blocked state indefinitely to wait for data to
+ * be available on the queue. The queue receive task will only leave the
+ * Blocked state when the queue send task writes to the queue. As the queue
+ * send task writes to the queue every 200 milliseconds, the queue receive
+ * task leaves the Blocked state every 200 milliseconds, and therefore toggles
+ * the LED every 200 milliseconds.
+ */
+
+/* Kernel includes. */
+#include "FreeRTOS.h"
+#include "task.h"
+#include "semphr.h"
+
+/* Library includes. */
+#include <stdio.h>
+#include "hardware/gpio.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 200ms value is converted
+to ticks using the portTICK_PERIOD_MS constant. */
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )
+
+/* The number of items the queue can hold. This is 1 as the receive task
+will remove items as they are added, meaning the send task should always find
+the queue empty. */
+#define mainQUEUE_LENGTH ( 1 )
+
+/* The LED toggled by the Rx task. */
+#define mainTASK_LED ( PICO_DEFAULT_LED_PIN )
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Called by main when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1 in
+ * main.c.
+ */
+void main_blinky( void );
+
+/*
+ * The tasks as described in the comments at the top of this file.
+ */
+static void prvQueueReceiveTask( void *pvParameters );
+static void prvQueueSendTask( void *pvParameters );
+
+/*-----------------------------------------------------------*/
+
+/* The queue used by both tasks. */
+static QueueHandle_t xQueue = NULL;
+
+/*-----------------------------------------------------------*/
+
+void main_blinky( void )
+{
+ printf(" Starting main_blinky.\n");
+
+ /* 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 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 );
+
+ /* 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 on the FreeRTOS heap
+ http://www.freertos.org/a00111.html. */
+ for( ;; );
+}
+/*-----------------------------------------------------------*/
+
+static void prvQueueSendTask( void *pvParameters )
+{
+TickType_t xNextWakeTime;
+const unsigned long ulValueToSend = 100UL;
+
+ /* Remove compiler warning about 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. */
+ vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );
+
+ /* Send to the queue - causing the queue receive task to unblock and
+ toggle the LED. 0 is used as the block time so the sending operation
+ will not block - it shouldn't need to block as the queue should always
+ be empty at this point in the code. */
+ xQueueSend( xQueue, &ulValueToSend, 0U );
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvQueueReceiveTask( void *pvParameters )
+{
+unsigned long ulReceivedValue;
+const unsigned long ulExpectedValue = 100UL;
+
+ /* Remove compiler warning about 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. */
+ xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
+
+ /* To get here something must have been received from the queue, but
+ is it the expected value? If it is, toggle the LED. */
+ if( ulReceivedValue == ulExpectedValue )
+ {
+ gpio_xor_mask( 1u << mainTASK_LED );
+ ulReceivedValue = 0U;
+ }
+ }
+}
+/*-----------------------------------------------------------*/
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_full.c b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_full.c
new file mode 100644
index 000000000..14208f8b7
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/main_full.c
@@ -0,0 +1,482 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * http://www.FreeRTOS.org
+ * http://aws.amazon.com/freertos
+ *
+ * 1 tab == 4 spaces!
+ */
+
+/******************************************************************************
+ * NOTE 1: This project provides two demo applications. A simple blinky style
+ * project, and a more comprehensive test and demo application. The
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
+ * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
+ * in main.c. This file implements the comprehensive test and demo version.
+ *
+ * NOTE 2: This file only contains the source code that is specific to the
+ * full demo. Generic functions, such FreeRTOS hook functions, and functions
+ * required to configure the hardware, are defined in main.c.
+ *
+ ******************************************************************************
+ *
+ * main_full() creates all the demo application tasks and software timers, 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:
+ *
+ * "Reg test" tasks - These fill both the core and floating point registers with
+ * known values, then check that each register maintains its expected value for
+ * the lifetime of the task. Each task uses a different set of values. The reg
+ * test tasks execute with a very low priority, so get preempted very
+ * frequently. A register containing an unexpected value is indicative of an
+ * error in the context switching mechanism.
+ *
+ * "Check" task - The check task period is initially set to three seconds. The
+ * task checks that all the standard demo tasks, and the register check tasks,
+ * are not only still executing, but are executing without reporting any errors.
+ * If the check task discovers that a task has either stalled, or reported an
+ * error, then it changes its own execution period from the initial three
+ * seconds, to just 200ms. The check task also toggles an LED each time it is
+ * called. This provides a visual indication of the system status: If the LED
+ * toggles every three seconds, then no issues have been discovered. If the LED
+ * toggles every 200ms, then an issue has been discovered with at least one
+ * task.
+ */
+
+/* Standard includes. */
+#include <stdio.h>
+
+/* Kernel includes. */
+#include "FreeRTOS.h"
+#include "task.h"
+#include "timers.h"
+#include "semphr.h"
+
+/* SDK includes */
+#include "pico/stdlib.h"
+
+/* Standard demo application includes. */
+#include "flop.h"
+#include "semtest.h"
+#include "dynamic.h"
+#include "BlockQ.h"
+#include "blocktim.h"
+#include "countsem.h"
+#include "GenQTest.h"
+#include "recmutex.h"
+#include "death.h"
+#include "partest.h"
+#include "comtest2.h"
+#include "serial.h"
+#include "TimerDemo.h"
+#include "QueueOverwrite.h"
+#include "IntQueue.h"
+#include "EventGroupsDemo.h"
+#include "IntSemTest.h"
+#include "TaskNotify.h"
+
+#include "main.h"
+
+/* Priorities for the demo application tasks. */
+#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1UL )
+#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2UL )
+#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
+#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
+#define mainCDC_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2UL )
+#define mainCOM_TEST_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
+#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
+#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
+
+/* The initial priority used by the UART command console task. */
+#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
+
+/* The LED used by the check task. */
+#define mainCHECK_LED ( PICO_DEFAULT_LED_PIN )
+
+/* A block time of zero simply means "don't block". */
+#define mainDONT_BLOCK ( 0UL )
+
+/* The period of the check task, in ms, provided no errors have been reported by
+any of the standard demo tasks. ms are converted to the equivalent in ticks
+using the pdMS_TO_TICKS() macro constant. */
+#define mainNO_ERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 3000UL )
+
+/* The period of the check task, in ms, if an error has been reported in one of
+the standard demo tasks. ms are converted to the equivalent in ticks using the
+pdMS_TO_TICKS() macro. */
+#define mainERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 200UL )
+
+/* 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 )
+
+/* The base period used by the timer test tasks. */
+#define mainTIMER_TEST_PERIOD ( 50 )
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Called by main() to run the full demo (as opposed to the blinky demo) when
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
+ */
+void main_full( void );
+
+/*
+ * The check task, as described at the top of this file.
+ */
+static void prvCheckTask( void *pvParameters );
+
+/*
+ * Register check tasks, and the tasks used to write over and check the contents
+ * of the FPU registers, as described at the top of this file. The nature of
+ * these files necessitates that they are written in an assembly file, but the
+ * entry points are kept in the C file for the convenience of checking the task
+ * parameter.
+ */
+static void prvRegTestTaskEntry1( void *pvParameters );
+extern void vRegTest1Implementation( void );
+static void prvRegTestTaskEntry2( void *pvParameters );
+extern void vRegTest2Implementation( void );
+
+/*-----------------------------------------------------------*/
+
+/* 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 ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
+
+/*-----------------------------------------------------------*/
+
+void main_full( void )
+{
+ /* Start all the other standard demo/test tasks. They have no particular
+ functionality, but do demonstrate how to use the FreeRTOS API and test the
+ kernel port. */
+
+ puts(" Starting tests:");
+#if (mainENABLE_INTERRUPT_QUEUE == 1)
+ puts(" - Interrupt Queue");
+ vStartInterruptQueueTasks();
+#endif
+#if (mainENABLE_DYNAMIC_PRIORITY == 1)
+ puts(" - Dynamic Priority");
+ vStartDynamicPriorityTasks();
+#endif
+#if (mainENABLE_BLOCKING_QUEUE == 1)
+ puts(" - Blocking Queue");
+ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
+#endif
+#if (mainENABLE_BLOCK_TIME == 1)
+ puts(" - Block Time");
+ vCreateBlockTimeTasks();
+#endif
+#if (mainENABLE_COUNTING_SEMAPHORE == 1)
+ puts(" - Counting Semaphore");
+ vStartCountingSemaphoreTasks();
+#endif
+#if (mainENABLE_GENERIC_QUEUE == 1)
+ puts(" - Generic Queue");
+ vStartGenericQueueTasks( tskIDLE_PRIORITY );
+#endif
+#if (mainENABLE_RECURSIVE_MUTEX == 1)
+ puts(" - Recursive Mutex");
+ vStartRecursiveMutexTasks();
+#endif
+#if (mainENABLE_SEMAPHORE == 1)
+ puts(" - Semaphore");
+ vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
+#endif
+#if (mainENABLE_MATH == 1)
+ puts(" - Math");
+ vStartMathTasks( mainFLOP_TASK_PRIORITY );
+#endif
+#if (mainENABLE_TIMER_DEMO == 1)
+ puts(" - Timer");
+ vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
+#endif
+#if (mainENABLE_QUEUE_OVERWRITE == 1)
+ puts(" - Queue Overwrite");
+ vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
+#endif
+#if (mainENABLE_EVENT_GROUP == 1)
+ puts(" - Event Group");
+ vStartEventGroupTasks();
+#endif
+#if (mainENABLE_INTERRUPT_SEMAPHORE == 1)
+ puts(" - Interrupt Semaphore");
+ vStartInterruptSemaphoreTasks();
+#endif
+#if (mainENABLE_TASK_NOTIFY == 1)
+ puts(" - Task Notify");
+ vStartTaskNotifyTask();
+#endif
+
+#if (mainENABLE_REG_TEST == 1)
+ puts(" - Register");
+ /* Create the register check tasks, as described at the top of this file */
+ xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL );
+ xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL );
+#endif
+
+ /* Create the task that performs the 'check' functionality, as described at
+ the top of this file. */
+ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
+
+ /* The set of tasks created by the following function call have to be
+ created last as they keep account of the number of tasks they expect to see
+ running. */
+#if (mainENABLE_DEATH == 1)
+ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
+ puts(" - Death");
+#endif
+
+ /* Start the scheduler. */
+ 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 on the FreeRTOS heap
+ http://www.freertos.org/a00111.html. */
+ for( ;; );
+}
+/*-----------------------------------------------------------*/
+
+static void prvCheckTask( void *pvParameters )
+{
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;
+TickType_t xLastExecutionTime;
+static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
+unsigned long ulErrorFound = pdFALSE;
+unsigned long ulIterations = 0;
+
+ /* Just to stop compiler warnings. */
+ ( void ) pvParameters;
+
+ /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
+ works correctly. */
+ xLastExecutionTime = xTaskGetTickCount();
+
+ /* Cycle for ever, delaying then checking all the other tasks are still
+ operating without error. The onboard LED is toggled on each iteration.
+ If an error is detected then the delay period is decreased from
+ mainNO_ERROR_CHECK_TASK_PERIOD to mainERROR_CHECK_TASK_PERIOD. This has the
+ effect of increasing the rate at which the onboard LED toggles, and in so
+ doing gives visual feedback of the system status. */
+ for( ;; )
+ {
+ /* Delay until it is time to execute again. */
+ vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
+
+ #if (mainENABLE_INTERRUPT_QUEUE == 1)
+ /* Check all the demo tasks (other than the flash tasks) to ensure
+ that they are all still running, and that none have detected an error. */
+ if( xAreIntQueueTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 0UL;
+ }
+ #endif
+
+ #if (mainENABLE_MATH == 1)
+ if( xAreMathsTaskStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 1UL;
+ }
+ #endif
+
+ #if (mainENABLE_DYNAMIC_PRIORITY == 1)
+ if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 2UL;
+ }
+ #endif
+
+ #if (mainENABLE_BLOCKING_QUEUE == 1)
+ if( xAreBlockingQueuesStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 3UL;
+ }
+ #endif
+
+ #if (mainENABLE_BLOCK_TIME == 1)
+ if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 4UL;
+ }
+ #endif
+
+ #if (mainENABLE_GENERIC_QUEUE == 1)
+ if ( xAreGenericQueueTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 5UL;
+ }
+ #endif
+
+ #if (mainENABLE_RECURSIVE_MUTEX == 1)
+ if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 6UL;
+ }
+ #endif
+
+ #if (mainENABLE_DEATH == 1)
+ if( xIsCreateTaskStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 7UL;
+ }
+ #endif
+
+ #if (mainENABLE_SEMAPHORE == 1)
+ if( xAreSemaphoreTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 8UL;
+ }
+ #endif
+
+ #if (mainENABLE_TIMER_DEMO == 1)
+ if( xAreTimerDemoTasksStillRunning( ( TickType_t ) xDelayPeriod ) != pdPASS )
+ {
+ ulErrorFound |= 1UL << 9UL;
+ }
+ #endif
+
+ #if (mainENABLE_COUNTING_SEMAPHORE == 1)
+ if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
+ {
+ ulErrorFound |= 1UL << 10UL;
+ }
+ #endif
+
+ #if (mainENABLE_QUEUE_OVERWRITE == 1)
+ if( xIsQueueOverwriteTaskStillRunning() != pdPASS )
+ {
+ ulErrorFound |= 1UL << 11UL;
+ }
+ #endif
+
+ #if (mainENABLE_EVENT_GROUP == 1)
+ if( xAreEventGroupTasksStillRunning() != pdPASS )
+ {
+ ulErrorFound |= 1UL << 12UL;
+ }
+ #endif
+
+ #if (mainENABLE_INTERRUPT_SEMAPHORE == 1)
+ if( xAreInterruptSemaphoreTasksStillRunning() != pdPASS )
+ {
+ ulErrorFound |= 1UL << 13UL;
+ }
+ #endif
+
+ #if (mainENABLE_TASK_NOTIFY == 1)
+ if( xAreTaskNotificationTasksStillRunning() != pdPASS )
+ {
+ ulErrorFound |= 1UL << 14UL;
+ }
+ #endif
+
+ #if (mainENABLE_REG_TEST == 1)
+ /* Check that the register test 1 task is still running. */
+ if( ulLastRegTest1Value == ulRegTest1LoopCounter )
+ {
+ ulErrorFound |= 1UL << 15UL;
+ }
+ ulLastRegTest1Value = ulRegTest1LoopCounter;
+
+ /* Check that the register test 2 task is still running. */
+ if( ulLastRegTest2Value == ulRegTest2LoopCounter )
+ {
+ ulErrorFound |= 1UL << 16UL;
+ }
+ ulLastRegTest2Value = ulRegTest2LoopCounter;
+ #endif
+
+ /* Toggle the check LED to give an indication of the system status. If
+ the LED toggles every mainNO_ERROR_CHECK_TASK_PERIOD milliseconds then
+ everything is ok. A faster toggle indicates an error. */
+ gpio_xor_mask( 1u << mainCHECK_LED );
+
+ ulIterations++;
+ if( ulErrorFound != pdFALSE )
+ {
+ static uint32_t ulLastErrorFound;
+ if (ulErrorFound != ulLastErrorFound) {
+ printf("Iterations: %d; Errors now %08x\n", (int) ulIterations, (int) ulErrorFound);
+ ulLastErrorFound = ulErrorFound;
+ }
+ /* An error has been detected in one of the tasks - flash the LED
+ at a higher frequency to give visible feedback that something has
+ gone wrong (it might just be that the loop back connector required
+ by the comtest tasks has not been fitted). */
+ xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;
+ }
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvRegTestTaskEntry1( void *pvParameters )
+{
+ /* Although the regtest task is written in assembler, 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 assembler. */
+ vRegTest1Implementation();
+ }
+
+ /* 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 prvRegTestTaskEntry2( void *pvParameters )
+{
+ /* Although the regtest task is written in assembler, 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 assembler. */
+ vRegTest2Implementation();
+ }
+
+ /* 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/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/pico_sdk_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/pico_sdk_import.cmake
new file mode 100644
index 000000000..28efe9eab
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/Standard/pico_sdk_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake
+
+# This can be dropped into an external project to help locate this SDK
+# It should be include()ed prior to project()
+
+if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))
+ set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
+ message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT))
+ set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT})
+ message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH))
+ set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH})
+ message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
+endif ()
+
+set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
+set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
+set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
+
+if (NOT PICO_SDK_PATH)
+ if (PICO_SDK_FETCH_FROM_GIT)
+ include(FetchContent)
+ set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR})
+ if (PICO_SDK_FETCH_FROM_GIT_PATH)
+ get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
+ endif ()
+ FetchContent_Declare(
+ pico_sdk
+ GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
+ GIT_TAG master
+ )
+ if (NOT pico_sdk)
+ message("Downloading Raspberry Pi Pico SDK")
+ FetchContent_Populate(pico_sdk)
+ set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR})
+ endif ()
+ set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE})
+ else ()
+ message(FATAL_ERROR
+ "SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git."
+ )
+ endif ()
+endif ()
+
+get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${PICO_SDK_PATH})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found")
+endif ()
+
+set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake)
+if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK")
+endif ()
+
+set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE)
+
+include(${PICO_SDK_INIT_CMAKE_FILE})
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/CMakeLists.txt b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/CMakeLists.txt
new file mode 100644
index 000000000..29eedec72
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.13)
+
+# Pull in SDK (must be before project)
+include(pico_sdk_import.cmake)
+# Pull in FreeRTOS
+include(FreeRTOS_Kernel_import.cmake)
+
+project(example C CXX ASM)
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
+
+pico_sdk_init()
+
+add_executable(using_cmsis)
+target_sources(using_cmsis PUBLIC
+ main.c)
+target_include_directories(using_cmsis PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}
+ )
+
+target_link_libraries(using_cmsis PUBLIC
+ FreeRTOS-Kernel
+ FreeRTOS-Kernel-Heap1
+ pico_stdlib
+ cmsis_core # CMSIS core headers via the SDK
+)
+
+pico_add_extra_outputs(using_cmsis)
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOSConfig.h b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOSConfig.h
new file mode 100644
index 000000000..af0d0cc92
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOSConfig.h
@@ -0,0 +1,139 @@
+/*
+ * FreeRTOS V202104.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.
+ *
+ * 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
+ *----------------------------------------------------------*/
+
+/* Scheduler Related */
+#define configUSE_PREEMPTION 1
+#define configUSE_TICKLESS_IDLE 0
+#define configUSE_IDLE_HOOK 0
+#define configUSE_TICK_HOOK 0
+#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
+#define configMAX_PRIORITIES 32
+#define configMINIMAL_STACK_SIZE ( configSTACK_DEPTH_TYPE ) 256
+#define configUSE_16_BIT_TICKS 0
+
+#define configIDLE_SHOULD_YIELD 1
+
+/* Synchronization Related */
+#define configUSE_MUTEXES 1
+#define configUSE_RECURSIVE_MUTEXES 1
+#define configUSE_APPLICATION_TASK_TAG 0
+#define configUSE_COUNTING_SEMAPHORES 1
+#define configQUEUE_REGISTRY_SIZE 8
+#define configUSE_QUEUE_SETS 1
+#define configUSE_TIME_SLICING 1
+#define configUSE_NEWLIB_REENTRANT 0
+#define configENABLE_BACKWARD_COMPATIBILITY 0
+#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
+
+/* System */
+#define configSTACK_DEPTH_TYPE uint32_t
+#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
+
+/* Memory allocation related definitions. */
+#define configSUPPORT_STATIC_ALLOCATION 0
+#define configSUPPORT_DYNAMIC_ALLOCATION 1
+#define configTOTAL_HEAP_SIZE (128*1024)
+#define configAPPLICATION_ALLOCATED_HEAP 0
+
+/* Hook function related definitions. */
+#define configCHECK_FOR_STACK_OVERFLOW 0
+#define configUSE_MALLOC_FAILED_HOOK 0
+#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
+
+/* Run time and task stats gathering related definitions. */
+#define configGENERATE_RUN_TIME_STATS 0
+#define configUSE_TRACE_FACILITY 1
+#define configUSE_STATS_FORMATTING_FUNCTIONS 0
+
+/* Co-routine related definitions. */
+#define configUSE_CO_ROUTINES 0
+#define configMAX_CO_ROUTINE_PRIORITIES 1
+
+/* Software timer related definitions. */
+#define configUSE_TIMERS 1
+#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
+#define configTIMER_QUEUE_LENGTH 10
+#define configTIMER_TASK_STACK_DEPTH 1024
+
+/* Interrupt nesting behaviour configuration. */
+/*
+#define configKERNEL_INTERRUPT_PRIORITY [dependent of processor]
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY [dependent on processor and application]
+#define configMAX_API_CALL_INTERRUPT_PRIORITY [dependent on processor and application]
+*/
+
+/* SMP port only */
+#define configNUM_CORES 1
+#define configTICK_CORE 1
+#define configRUN_MULTIPLE_PRIORITIES 1
+
+/* RP2040 specific */
+#define configSUPPORT_PICO_SYNC_INTEROP 1
+#define configSUPPORT_PICO_TIME_INTEROP 1
+
+#include <assert.h>
+/* Define to trap errors during development. */
+#define configASSERT(x) assert(x)
+
+/* 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_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_xTaskGetSchedulerState 1
+#define INCLUDE_xTaskGetCurrentTaskHandle 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 1
+#define INCLUDE_xTaskGetIdleTaskHandle 1
+#define INCLUDE_eTaskGetState 1
+#define INCLUDE_xTimerPendFunctionCall 1
+#define INCLUDE_xTaskAbortDelay 1
+#define INCLUDE_xTaskGetHandle 1
+#define INCLUDE_xTaskResumeFromISR 1
+#define INCLUDE_xQueueGetMutexHolder 1
+
+/* A header file that defines trace macro can be included here. */
+
+#endif /* FREERTOS_CONFIG_H */
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOS_Kernel_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOS_Kernel_import.cmake
new file mode 100644
index 000000000..dc68ed038
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/FreeRTOS_Kernel_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <FREERTOS_KERNEL_PATH>/portable/ThirdParty/GCC/RP2040/FREERTOS_KERNEL_import.cmake
+
+# This can be dropped into an external project to help locate the FreeRTOS kernel
+# It should be include()ed prior to project(). Alternatively this file may
+# or the CMakeLists.txt in this directory may be included or added via add_subdirectory
+# respectively.
+
+if (DEFINED ENV{FREERTOS_KERNEL_PATH} AND (NOT FREERTOS_KERNEL_PATH))
+ set(FREERTOS_KERNEL_PATH $ENV{FREERTOS_KERNEL_PATH})
+ message("Using FREERTOS_KERNEL_PATH from environment ('${FREERTOS_KERNEL_PATH}')")
+endif ()
+
+set(FREERTOS_KERNEL_RP2040_RELATIVE_PATH "portable/ThirdParty/GCC/RP2040")
+# undo the above
+set(FREERTOS_KERNEL_RP2040_BACK_PATH "../../../..")
+
+if (NOT FREERTOS_KERNEL_PATH)
+ # check if we are inside the FreeRTOS kernel tree (i.e. this file has been included directly)
+ get_filename_component(_ACTUAL_PATH ${CMAKE_CURRENT_LIST_DIR} REALPATH)
+ get_filename_component(_POSSIBLE_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH} REALPATH)
+ if (_ACTUAL_PATH STREQUAL _POSSIBLE_PATH)
+ get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH} REALPATH)
+ endif()
+ if (_ACTUAL_PATH STREQUAL _POSSIBLE_PATH)
+ get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/${FREERTOS_KERNEL_RP2040_BACK_PATH} REALPATH)
+ message("Setting FREERTOS_KERNEL_PATH to ${FREERTOS_KERNEL_PATH} based on location of FreeRTOS-Kernel-import.cmake")
+ elseif (PICO_SDK_PATH AND EXISTS "${PICO_SDK_PATH}/../FreeRTOS-Kernel")
+ set(FREERTOS_KERNEL_PATH ${PICO_SDK_PATH}/../FreeRTOS-Kernel)
+ message("Defaulting FREERTOS_KERNEL_PATH as sibling of PICO_SDK_PATH: ${FREERTOS_KERNEL_PATH}")
+ endif()
+endif ()
+
+if (NOT FREERTOS_KERNEL_PATH)
+ foreach(POSSIBLE_SUFFIX Source FreeRTOS-Kernel FreeRTOS/Source)
+ # check if FreeRTOS-Kernel exists under directory that included us
+ set(SEARCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}})
+ set(SEARCH_ROOT ../../../..)
+ get_filename_component(_POSSIBLE_PATH ${SEARCH_ROOT}/${POSSIBLE_SUFFIX} REALPATH)
+ if (EXISTS ${_POSSIBLE_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}/CMakeLists.txt)
+ get_filename_component(FREERTOS_KERNEL_PATH ${_POSSIBLE_PATH} REALPATH)
+ message("Setting FREERTOS_KERNEL_PATH to '${FREERTOS_KERNEL_PATH}' found relative to enclosing project")
+ break()
+ endif()
+ endforeach()
+endif()
+
+if (NOT FREERTOS_KERNEL_PATH)
+ message(FATAL_ERROR "FreeRTOS location was not specified. Please set FREERTOS_KERNEL_PATH.")
+endif()
+
+set(FREERTOS_KERNEL_PATH "${FREERTOS_KERNEL_PATH}" CACHE PATH "Path to the FreeRTOS Kernel")
+
+get_filename_component(FREERTOS_KERNEL_PATH "${FREERTOS_KERNEL_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${FREERTOS_KERNEL_PATH})
+ message(FATAL_ERROR "Directory '${FREERTOS_KERNEL_PATH}' not found")
+endif()
+if (NOT EXISTS ${FREERTOS_KERNEL_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}/CMakeLists.txt)
+ message(FATAL_ERROR "Directory '${FREERTOS_KERNEL_PATH}' does not contain an RP2040 port here: ${FREERTOS_KERNEL_RP2040_RELATIVE_PATH}")
+endif()
+set(FREERTOS_KERNEL_PATH ${FREERTOS_KERNEL_PATH} CACHE PATH "Path to the FreeRTOS_KERNEL" FORCE)
+
+add_subdirectory(${FREERTOS_KERNEL_PATH}/${FREERTOS_KERNEL_RP2040_RELATIVE_PATH} FREERTOS_KERNEL) \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/README.md b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/README.md
new file mode 100644
index 000000000..54b56f2c8
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/README.md
@@ -0,0 +1,3 @@
+A simple example, that includes the CMSIS core headers via the Raspberry Pi Pico SDK (done
+by simpling adding `cmsis_core` to the `target_link_libraries()`)
+
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/main.c b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/main.c
new file mode 100644
index 000000000..df5b01ea5
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/main.c
@@ -0,0 +1,113 @@
+/* Kernel includes. */
+#include "FreeRTOS.h" /* Must come first. */
+#include "task.h" /* RTOS task related API prototypes. */
+#include "timers.h" /* Software timer related API prototypes. */
+#include <stdio.h>
+#include "pico/stdlib.h"
+#include "RP2040.h" /* CMSIS Header for RP2040 */
+
+#define mainTASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Implement this function for any hardware specific clock configuration
+ * that was not already performed before main() was called.
+ */
+static void prvSetupHardware( void );
+
+/*
+ * The main task
+ */
+static void prvMainTask( void *pvParameters );
+
+/*
+ * The blink task
+ */
+static void prvBlinkTask( void *pvParameters );
+
+int main(void) {
+ TimerHandle_t xExampleSoftwareTimer = NULL;
+
+ /* Configure the system ready to run the demo. The clock configuration
+ can be done here if it was not done before main() was called. */
+ prvSetupHardware();
+
+ /* Create the main task */
+ xTaskCreate( /* The function that implements the task. */
+ prvMainTask,
+ /* Text name for the task, just to help debugging. */
+ "main",
+ /* The size (in words) of the stack that should be created
+ for the task. */
+ configMINIMAL_STACK_SIZE,
+ /* A parameter that can be passed into the task. Not used
+ in this simple demo. */
+ NULL,
+ /* The priority to assign to the task. tskIDLE_PRIORITY
+ (which is 0) is the lowest priority. configMAX_PRIORITIES - 1
+ is the highest priority. */
+ mainTASK_PRIORITY,
+ /* Used to obtain a handle to the created task. Not used in
+ this simple demo, so set to NULL. */
+ NULL);
+
+ /* Create the blink task */
+ xTaskCreate( /* The function that implements the task. */
+ prvBlinkTask,
+ /* Text name for the task, just to help debugging. */
+ "blink",
+ /* The size (in words) of the stack that should be created
+ for the task. */
+ configMINIMAL_STACK_SIZE,
+ /* A parameter that can be passed into the task. Not used
+ in this simple demo. */
+ NULL,
+ /* The priority to assign to the task. tskIDLE_PRIORITY
+ (which is 0) is the lowest priority. configMAX_PRIORITIES - 1
+ is the highest priority. */
+ mainTASK_PRIORITY,
+ /* Used to obtain a handle to the created task. Not used in
+ this simple demo, so set to NULL. */
+ NULL);
+
+
+ vTaskStartScheduler();
+
+ /* should never reach here */
+ panic_unsupported();
+}
+/*-----------------------------------------------------------*/
+
+static void prvBlinkTask( void *pvParameters )
+{
+ for( ;; )
+ {
+ vTaskDelay(pdMS_TO_TICKS( 500 ));
+ gpio_put(PICO_DEFAULT_LED_PIN, !gpio_get(PICO_DEFAULT_LED_PIN));
+ }
+}
+
+#include "hardware/irq.h"
+static void prvMainTask( void *pvParameters )
+{
+ for( ;; )
+ {
+ vTaskDelay(pdMS_TO_TICKS( 3000 ));
+ puts("Disabling SysTick interrupt via CMSIS");
+ SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
+ busy_wait_ms(3000); // pause
+ SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
+ puts("Enabled SysTick interrupt via CMSIS");
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvSetupHardware( void )
+{
+ /* Want to be able to printf */
+ stdio_init_all();
+ /* And flash LED */
+ gpio_init(PICO_DEFAULT_LED_PIN);
+ gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
+} \ No newline at end of file
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/pico_sdk_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/pico_sdk_import.cmake
new file mode 100644
index 000000000..28efe9eab
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/UsingCMSIS/pico_sdk_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake
+
+# This can be dropped into an external project to help locate this SDK
+# It should be include()ed prior to project()
+
+if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))
+ set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
+ message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT))
+ set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT})
+ message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH))
+ set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH})
+ message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
+endif ()
+
+set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
+set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
+set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
+
+if (NOT PICO_SDK_PATH)
+ if (PICO_SDK_FETCH_FROM_GIT)
+ include(FetchContent)
+ set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR})
+ if (PICO_SDK_FETCH_FROM_GIT_PATH)
+ get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
+ endif ()
+ FetchContent_Declare(
+ pico_sdk
+ GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
+ GIT_TAG master
+ )
+ if (NOT pico_sdk)
+ message("Downloading Raspberry Pi Pico SDK")
+ FetchContent_Populate(pico_sdk)
+ set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR})
+ endif ()
+ set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE})
+ else ()
+ message(FATAL_ERROR
+ "SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git."
+ )
+ endif ()
+endif ()
+
+get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${PICO_SDK_PATH})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found")
+endif ()
+
+set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake)
+if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK")
+endif ()
+
+set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE)
+
+include(${PICO_SDK_INIT_CMAKE_FILE})
diff --git a/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/pico_sdk_import.cmake b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/pico_sdk_import.cmake
new file mode 100644
index 000000000..28efe9eab
--- /dev/null
+++ b/FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040/pico_sdk_import.cmake
@@ -0,0 +1,62 @@
+# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake
+
+# This can be dropped into an external project to help locate this SDK
+# It should be include()ed prior to project()
+
+if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))
+ set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
+ message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT))
+ set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT})
+ message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')")
+endif ()
+
+if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH))
+ set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH})
+ message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
+endif ()
+
+set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
+set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
+set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
+
+if (NOT PICO_SDK_PATH)
+ if (PICO_SDK_FETCH_FROM_GIT)
+ include(FetchContent)
+ set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR})
+ if (PICO_SDK_FETCH_FROM_GIT_PATH)
+ get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
+ endif ()
+ FetchContent_Declare(
+ pico_sdk
+ GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
+ GIT_TAG master
+ )
+ if (NOT pico_sdk)
+ message("Downloading Raspberry Pi Pico SDK")
+ FetchContent_Populate(pico_sdk)
+ set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR})
+ endif ()
+ set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE})
+ else ()
+ message(FATAL_ERROR
+ "SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git."
+ )
+ endif ()
+endif ()
+
+get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+if (NOT EXISTS ${PICO_SDK_PATH})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found")
+endif ()
+
+set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake)
+if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE})
+ message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK")
+endif ()
+
+set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE)
+
+include(${PICO_SDK_INIT_CMAKE_FILE})
diff --git a/FreeRTOS/Source b/FreeRTOS/Source
-Subproject 8e2f723996e7ae1851310caad26e359a23da6ff
+Subproject 46338705bd4f93e743f05b875480095c2dd5c33
diff --git a/lexicon.txt b/lexicon.txt
index 42dd0efe9..3b3eced35 100644
--- a/lexicon.txt
+++ b/lexicon.txt
@@ -2230,6 +2230,7 @@ slewrate
slibxr
smc
smclk
+smp
smr
smt
snextcheckvariable