forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update_readme_tcp_qemu
- Loading branch information
Showing
17 changed files
with
1,355 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
FreeRTOS/Test/Target/boards/pico/tests/smp/interrupt_wait_critical/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
|
||
set(TEST_INCLUDE_PATHS ${CMAKE_CURRENT_LIST_DIR}/../../../../../tests/smp/interrupt_wait_critical) | ||
set(TEST_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../../tests/smp/interrupt_wait_critical) | ||
|
||
add_library(interrupt_wait_critical INTERFACE) | ||
target_sources(interrupt_wait_critical INTERFACE | ||
${BOARD_LIBRARY_DIR}/main.c | ||
${CMAKE_CURRENT_LIST_DIR}/interrupt_wait_critical_test_runner.c | ||
${TEST_SOURCE_DIR}/interrupt_wait_critical.c) | ||
|
||
target_include_directories(interrupt_wait_critical INTERFACE | ||
${CMAKE_CURRENT_LIST_DIR}/../../.. | ||
${TEST_INCLUDE_PATHS} | ||
) | ||
|
||
target_link_libraries(interrupt_wait_critical INTERFACE | ||
FreeRTOS-Kernel | ||
FreeRTOS-Kernel-Heap4 | ||
${BOARD_LINK_LIBRARIES}) | ||
|
||
add_executable(test_interrupt_wait_critical) | ||
enable_board_functions(test_interrupt_wait_critical) | ||
target_link_libraries(test_interrupt_wait_critical interrupt_wait_critical) | ||
target_include_directories(test_interrupt_wait_critical PUBLIC | ||
${BOARD_INCLUDE_PATHS}) | ||
target_compile_definitions(test_interrupt_wait_critical PRIVATE | ||
${BOARD_DEFINES} | ||
) |
75 changes: 75 additions & 0 deletions
75
...arget/boards/pico/tests/smp/interrupt_wait_critical/interrupt_wait_critical_test_runner.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* FreeRTOS V202212.00 | ||
* Copyright (C) 2022 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 | ||
* | ||
*/ | ||
|
||
/** | ||
* @file only_one_task_enter_critical_test_runner.c | ||
* @brief The implementation of main function to start test runner task. | ||
* | ||
* Procedure: | ||
* - Initialize environment. | ||
* - Run the test case. | ||
*/ | ||
|
||
/* Kernel includes. */ | ||
#include "FreeRTOS.h" | ||
#include "task.h" | ||
|
||
/* Unit testing support functions. */ | ||
#include "unity.h" | ||
|
||
/* Pico includes. */ | ||
#include "pico/multicore.h" | ||
#include "pico/stdlib.h" | ||
|
||
/*-----------------------------------------------------------*/ | ||
|
||
static void prvTestRunnerTask( void * pvParameters ); | ||
|
||
extern void vRunInterruptWaitCriticalTest( void ); | ||
|
||
/*-----------------------------------------------------------*/ | ||
|
||
static void prvTestRunnerTask( void * pvParameters ) | ||
{ | ||
( void ) pvParameters; | ||
|
||
/* Run test case. */ | ||
vRunInterruptWaitCriticalTest(); | ||
|
||
vTaskDelete( NULL ); | ||
} | ||
/*-----------------------------------------------------------*/ | ||
|
||
void vRunTest( void ) | ||
{ | ||
xTaskCreate( prvTestRunnerTask, | ||
"testRunner", | ||
configMINIMAL_STACK_SIZE, | ||
NULL, | ||
configMAX_PRIORITIES - 1, | ||
NULL ); | ||
} | ||
/*-----------------------------------------------------------*/ |
33 changes: 33 additions & 0 deletions
33
FreeRTOS/Test/Target/boards/pico/tests/smp/only_one_task_enter_critical/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
|
||
project(example C CXX ASM) | ||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
set(TEST_INCLUDE_PATHS ${CMAKE_CURRENT_LIST_DIR}/../../../../../tests/smp/only_one_task_enter_critical) | ||
set(TEST_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../../tests/smp/only_one_task_enter_critical) | ||
|
||
add_library(only_one_task_enter_critical INTERFACE) | ||
target_sources(only_one_task_enter_critical INTERFACE | ||
${BOARD_LIBRARY_DIR}/main.c | ||
${CMAKE_CURRENT_LIST_DIR}/only_one_task_enter_critical_test_runner.c | ||
${TEST_SOURCE_DIR}/only_one_task_enter_critical.c) | ||
|
||
target_include_directories(only_one_task_enter_critical INTERFACE | ||
${CMAKE_CURRENT_LIST_DIR}/../../.. | ||
${TEST_INCLUDE_PATHS} | ||
) | ||
|
||
target_link_libraries(only_one_task_enter_critical INTERFACE | ||
FreeRTOS-Kernel | ||
FreeRTOS-Kernel-Heap4 | ||
${BOARD_LINK_LIBRARIES}) | ||
|
||
add_executable(test_only_one_task_enter_critical) | ||
enable_board_functions(test_only_one_task_enter_critical) | ||
target_link_libraries(test_only_one_task_enter_critical only_one_task_enter_critical) | ||
target_include_directories(test_only_one_task_enter_critical PUBLIC | ||
${BOARD_INCLUDE_PATHS}) | ||
target_compile_definitions(test_only_one_task_enter_critical PRIVATE | ||
${BOARD_DEFINES} | ||
) |
73 changes: 73 additions & 0 deletions
73
...ds/pico/tests/smp/only_one_task_enter_critical/only_one_task_enter_critical_test_runner.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* FreeRTOS V202212.00 | ||
* Copyright (C) 2022 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 | ||
* | ||
*/ | ||
|
||
/** | ||
* @file only_one_task_enter_critical_test_runner.c | ||
* @brief The implementation of main function to start test runner task. | ||
* | ||
* Procedure: | ||
* - Initialize environment. | ||
* - Run the test case. | ||
*/ | ||
|
||
/* Kernel includes. */ | ||
#include "FreeRTOS.h" | ||
#include "task.h" | ||
|
||
/* Unit testing support functions. */ | ||
#include "unity.h" | ||
|
||
/* Pico includes. */ | ||
#include "pico/multicore.h" | ||
#include "pico/stdlib.h" | ||
|
||
/*-----------------------------------------------------------*/ | ||
|
||
static void prvTestRunnerTask( void * pvParameters ); | ||
|
||
/*-----------------------------------------------------------*/ | ||
|
||
static void prvTestRunnerTask( void * pvParameters ) | ||
{ | ||
( void ) pvParameters; | ||
|
||
/* Run test case. */ | ||
vRunOnlyOneTaskEnterCriticalTest(); | ||
|
||
vTaskDelete( NULL ); | ||
} | ||
/*-----------------------------------------------------------*/ | ||
|
||
void vRunTest( void ) | ||
{ | ||
xTaskCreate( prvTestRunnerTask, | ||
"testRunner", | ||
configMINIMAL_STACK_SIZE, | ||
NULL, | ||
configMAX_PRIORITIES - 1, | ||
NULL ); | ||
} | ||
/*-----------------------------------------------------------*/ |
33 changes: 33 additions & 0 deletions
33
FreeRTOS/Test/Target/boards/pico/tests/smp/task_delete/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
|
||
project(example C CXX ASM) | ||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
set(TEST_INCLUDE_PATHS ${CMAKE_CURRENT_LIST_DIR}/../../../../../tests/smp/task_delete) | ||
set(TEST_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../../tests/smp/task_delete) | ||
|
||
add_library(task_delete INTERFACE) | ||
target_sources(task_delete INTERFACE | ||
${BOARD_LIBRARY_DIR}/main.c | ||
${CMAKE_CURRENT_LIST_DIR}/task_delete_test_runner.c | ||
${TEST_SOURCE_DIR}/task_delete.c) | ||
|
||
target_include_directories(task_delete INTERFACE | ||
${CMAKE_CURRENT_LIST_DIR}/../../.. | ||
${TEST_INCLUDE_PATHS} | ||
) | ||
|
||
target_link_libraries(task_delete INTERFACE | ||
FreeRTOS-Kernel | ||
FreeRTOS-Kernel-Heap4 | ||
${BOARD_LINK_LIBRARIES}) | ||
|
||
add_executable(test_task_delete) | ||
enable_board_functions(test_task_delete) | ||
target_link_libraries(test_task_delete task_delete) | ||
target_include_directories(test_task_delete PUBLIC | ||
${BOARD_INCLUDE_PATHS}) | ||
target_compile_definitions(test_task_delete PRIVATE | ||
${BOARD_DEFINES} | ||
) |
Oops, something went wrong.