From e0bb21f832cdcef9250e7dfe1c82abf9264f9d31 Mon Sep 17 00:00:00 2001 From: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:11:29 +0800 Subject: [PATCH] Remove the sample smp configuration folder (#922) * Remove the sample smp configuration folder --- .github/.cSpellWords.txt | 1 + examples/cmake_example/CMakeLists.txt | 17 ++--- .../sample_configuration/smp/FreeRTOSConfig.h | 65 ------------------- examples/sample_configuration/smp/readme.md | 10 --- 4 files changed, 8 insertions(+), 85 deletions(-) delete mode 100644 examples/sample_configuration/smp/FreeRTOSConfig.h delete mode 100644 examples/sample_configuration/smp/readme.md diff --git a/.github/.cSpellWords.txt b/.github/.cSpellWords.txt index f9e1c9bbf..9e0f6560b 100644 --- a/.github/.cSpellWords.txt +++ b/.github/.cSpellWords.txt @@ -175,6 +175,7 @@ DATRDY DBGU DCDIC DCMR +Dconfig DCOUNT decf decfsz diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt index f8a4e2d63..4d13c4c77 100644 --- a/examples/cmake_example/CMakeLists.txt +++ b/examples/cmake_example/CMakeLists.txt @@ -7,18 +7,15 @@ set(FREERTOS_KERNEL_PATH "../../") # Add the freertos_config for FreeRTOS-Kernel add_library(freertos_config INTERFACE) +target_include_directories(freertos_config + INTERFACE + "../sample_configuration" +) + if (DEFINED FREERTOS_SMP_EXAMPLE AND FREERTOS_SMP_EXAMPLE STREQUAL "1") message(STATUS "Build FreeRTOS SMP example") - target_include_directories(freertos_config - INTERFACE - "../sample_configuration/smp" - ) -else() - message(STATUS "Build FreeRTOS example") - target_include_directories(freertos_config - INTERFACE - "../sample_configuration" - ) + # Adding the following configurations to build SMP template port + add_compile_options( -DconfigNUMBER_OF_CORES=2 -DconfigUSE_PASSIVE_IDLE_HOOK=0 ) endif() # Select the heap port. values between 1-4 will pick a heap. diff --git a/examples/sample_configuration/smp/FreeRTOSConfig.h b/examples/sample_configuration/smp/FreeRTOSConfig.h deleted file mode 100644 index f3b68a444..000000000 --- a/examples/sample_configuration/smp/FreeRTOSConfig.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * FreeRTOS Kernel - * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -/******************************************************************************* - * This file provides an example FreeRTOSConfig.h header file, inclusive of an - * abbreviated explanation of each configuration item. Online and reference - * documentation provides more information. - * https://www.freertos.org/a00110.html - * - * Constant values enclosed in square brackets ('[' and ']') must be completed - * before this file will build. - * - * Use the FreeRTOSConfig.h supplied with the RTOS port in use rather than this - * generic file, if one is available. - ******************************************************************************/ - -#ifndef __FREERTOS_CONFIG_SMP_H__ -#define __FREERTOS_CONFIG_SMP_H__ - -#include "../FreeRTOSConfig.h" - -/******************************************************************************/ -/* Scheduling behaviour related definitions. **********************************/ -/******************************************************************************/ - -/* Set configNUMBER_OF_CORES to greater than 1 to enable running one instance of - * FreeRTOS kernel to schedule tasks across multiple identical processor cores. */ -#define configNUMBER_OF_CORES 2 - -/******************************************************************************/ -/* Hook and callback function related definitions. ****************************/ -/******************************************************************************/ - -/* Set the following configUSE_* constants to 1 to include the named hook - * functionality in the build. Set to 0 to exclude the hook functionality from the - * build. The application writer is responsible for providing the hook function - * for any set to 1. See https://www.freertos.org/a00016.html */ -#define configUSE_PASSIVE_IDLE_HOOK 0 - -#endif /* __FREERTOS_CONFIG_SMP_H__ */ diff --git a/examples/sample_configuration/smp/readme.md b/examples/sample_configuration/smp/readme.md deleted file mode 100644 index 8dc02bd56..000000000 --- a/examples/sample_configuration/smp/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration support for FreeRTOS SMP - -## Overview -The FreeRTOSConfig.h provided in this folder is a sample configuration that will -assist you in preparing the configuration to enable SMP support in the FreeRTOS -Kernel for your application. - -Based on single core sample configuration file, this configuration file is created -with minimal configuration change. More SMP scheduler configurations can be found -in [Symmetric Multiprocessing (SMP) with FreeRTOS](https://freertos.org/symmetric-multiprocessing-introduction.html)