Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Sanderson <graham.sanderson@raspberrypi.com>2021-12-18 02:06:35 +0300
committerGitHub <noreply@github.com>2021-12-18 02:06:35 +0300
commit7d11089624cb18ef0052fd2fc96bb86d0d6d4109 (patch)
treecf181178fc145530f8ac9c0de0d43371920b472c
parent2b0fdf2a712d29cb3695e540042c89cadecc29dd (diff)
Rp2040 fixes smp (#425)
* RP2040: malloc needs to be thread safe for FreeRTOS whether both cores are used or not * RP2040: CMake file had broken left over test code
-rw-r--r--portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake3
-rw-r--r--portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake b/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake
index dc68ed038..1f0bf1196 100644
--- a/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake
+++ b/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake
@@ -33,8 +33,7 @@ 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 ../../../..)
+ set(SEARCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
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)
diff --git a/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h b/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h
index 7e2d111c3..8faa28a87 100644
--- a/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h
+++ b/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h
@@ -32,7 +32,10 @@
#ifndef __ASSEMBLER__
#include "FreeRTOSConfig.h"
#include "rp2040_config.h"
-
+ #ifndef PICO_USE_MALLOC_MUTEX
+ // malloc needs to be made thread safe
+ #define PICO_USE_MALLOC_MUTEX 1
+ #endif /* PICO_USE_MALLOC_MUTEX */
#if ( configSUPPORT_PICO_SYNC_INTEROP == 1 )
// increase the amount of time it may reasonably take to wake us up
#ifndef PICO_TIME_SLEEP_OVERHEAD_ADJUST_US