From 93380c02a1e9de182952c0a25837a79f4ae9d9c1 Mon Sep 17 00:00:00 2001 From: "dps.lwk" Date: Tue, 26 Dec 2023 09:02:47 +0000 Subject: RP2040: FreeRTOS-Kernel-Static use configKERNEL_PROVIDED_STATIC_MEMORY (#934) Remove the idle_task_static_memory.c and use the new default implementations to allows for FreeRTOS-Kernel-Static to be used with configNUMBER_OF_CORES > 1 --- .../GCC/RP2040/idle_task_static_memory.c | 52 ---------------------- portable/ThirdParty/GCC/RP2040/library.cmake | 2 +- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 portable/ThirdParty/GCC/RP2040/idle_task_static_memory.c diff --git a/portable/ThirdParty/GCC/RP2040/idle_task_static_memory.c b/portable/ThirdParty/GCC/RP2040/idle_task_static_memory.c deleted file mode 100644 index aaeec1881..000000000 --- a/portable/ThirdParty/GCC/RP2040/idle_task_static_memory.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * FreeRTOS Kernel - * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. - * - * SPDX-License-Identifier: MIT AND BSD-3-Clause - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - */ - -#include "FreeRTOS.h" - -void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, - StackType_t ** ppxIdleTaskStackBuffer, - uint32_t * pulIdleTaskStackSize ) -{ - /* If the buffers to be provided to the Idle task are declared inside this - * function then they must be declared static - otherwise they will be allocated on - * the stack and so not exists after this function exits. */ - static StaticTask_t xIdleTaskTCB; - static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; - - /* Pass out a pointer to the StaticTask_t structure in which the Idle task's - * state will be stored. */ - *ppxIdleTaskTCBBuffer = &xIdleTaskTCB; - - /* Pass out the array that will be used as the Idle task's stack. */ - *ppxIdleTaskStackBuffer = uxIdleTaskStack; - - /* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer. - * Note that, as the array is necessarily of type StackType_t, - * configMINIMAL_STACK_SIZE is specified in words, not bytes. */ - *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; -} diff --git a/portable/ThirdParty/GCC/RP2040/library.cmake b/portable/ThirdParty/GCC/RP2040/library.cmake index 1db96517a..33968de85 100644 --- a/portable/ThirdParty/GCC/RP2040/library.cmake +++ b/portable/ThirdParty/GCC/RP2040/library.cmake @@ -46,9 +46,9 @@ target_compile_definitions(FreeRTOS-Kernel INTERFACE add_library(FreeRTOS-Kernel-Static INTERFACE) target_compile_definitions(FreeRTOS-Kernel-Static INTERFACE configSUPPORT_STATIC_ALLOCATION=1 + configKERNEL_PROVIDED_STATIC_MEMORY=1 ) -target_sources(FreeRTOS-Kernel-Static INTERFACE ${CMAKE_CURRENT_LIST_DIR}/idle_task_static_memory.c) target_link_libraries(FreeRTOS-Kernel-Static INTERFACE FreeRTOS-Kernel) add_library(FreeRTOS-Kernel-Heap1 INTERFACE) -- cgit v1.2.3