diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 575712e6..ca3269f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -160,7 +160,7 @@ test-applications: --credentials-path "applications/${APP_UNDERSCORED}/configs/aws_configs" \ --merged-elf-name "${APP}_merged.elf" \ --signed-update-bin-name "${APP}-update_signed.bin" \ - --timeout-seconds 1800 \ + --timeout-seconds 2700 \ --pass-output-file "applications/${APP_UNDERSCORED}/tests/pass_output.log" \ --fail-output-file "applications/${APP_UNDERSCORED}/tests/fail_output.log" \ --pythonhome-path "/opt/python/3.9.18" @@ -171,7 +171,7 @@ test-applications: --credentials-path "applications/${APP_UNDERSCORED}/configs/aws_configs" \ --merged-elf-name "${APP}_merged.elf" \ --signed-update-bin-name "${APP}-update_signed.bin" \ - --timeout-seconds 1800 \ + --timeout-seconds 2700 \ --pass-output-file "applications/${APP_UNDERSCORED}/tests/pass_output.log" \ --fail-output-file "applications/${APP_UNDERSCORED}/tests/fail_output.log" fi diff --git a/applications/blinky/configs/freertos_config/FreeRTOSConfig.h b/applications/blinky/configs/freertos_config/FreeRTOSConfig.h index aa2829eb..821dc728 100644 --- a/applications/blinky/configs/freertos_config/FreeRTOSConfig.h +++ b/applications/blinky/configs/freertos_config/FreeRTOSConfig.h @@ -48,7 +48,7 @@ extern uint32_t SystemCoreClock; /* Memory allocation related definitions. */ #define configSUPPORT_STATIC_ALLOCATION 1 #define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configTOTAL_HEAP_SIZE 720896 +#define configTOTAL_HEAP_SIZE 0 #define configAPPLICATION_ALLOCATED_HEAP 0 #define configENABLE_MVE 0 diff --git a/applications/keyword_detection/configs/freertos_config/FreeRTOSConfig.h b/applications/keyword_detection/configs/freertos_config/FreeRTOSConfig.h index 9ba2f722..fc63feb0 100644 --- a/applications/keyword_detection/configs/freertos_config/FreeRTOSConfig.h +++ b/applications/keyword_detection/configs/freertos_config/FreeRTOSConfig.h @@ -48,7 +48,7 @@ extern uint32_t SystemCoreClock; /* Memory allocation related definitions. */ #define configSUPPORT_STATIC_ALLOCATION 1 #define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configTOTAL_HEAP_SIZE 720896 +#define configTOTAL_HEAP_SIZE 0 #define configAPPLICATION_ALLOCATED_HEAP 0 #define configENABLE_MVE 0 diff --git a/applications/speech_recognition/configs/freertos_config/FreeRTOSConfig.h b/applications/speech_recognition/configs/freertos_config/FreeRTOSConfig.h index aa2829eb..821dc728 100644 --- a/applications/speech_recognition/configs/freertos_config/FreeRTOSConfig.h +++ b/applications/speech_recognition/configs/freertos_config/FreeRTOSConfig.h @@ -48,7 +48,7 @@ extern uint32_t SystemCoreClock; /* Memory allocation related definitions. */ #define configSUPPORT_STATIC_ALLOCATION 1 #define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configTOTAL_HEAP_SIZE 720896 +#define configTOTAL_HEAP_SIZE 0 #define configAPPLICATION_ALLOCATED_HEAP 0 #define configENABLE_MVE 0 diff --git a/bsp/corstone300/an552_ns.ld b/bsp/corstone300/an552_ns.ld index 853f91ca..3338840a 100644 --- a/bsp/corstone300/an552_ns.ld +++ b/bsp/corstone300/an552_ns.ld @@ -44,7 +44,7 @@ __RAM_SIZE = (0x00200000 - PROVISIONING_SIZE); -----------------------------------------------------------------------------*/ __STACK_SIZE = 0x00001000; -__HEAP_SIZE = 0x000B0000; +__HEAP_SIZE = 0x000C0000; /* *-------------------- <<< end of configuration section >>> ------------------- diff --git a/bsp/corstone300/an552_ns.sct b/bsp/corstone300/an552_ns.sct index 66ed3645..9a39b7ad 100644 --- a/bsp/corstone300/an552_ns.sct +++ b/bsp/corstone300/an552_ns.sct @@ -17,7 +17,7 @@ LR_CODE (0x28000000 + ((((0) + (0x40000)) + (0x400)))) { ARM_LIB_STACK +0 ALIGN 32 EMPTY (0x0001000) { } - ARM_LIB_HEAP +0 ALIGN 8 EMPTY (0x00b0000) { + ARM_LIB_HEAP +0 ALIGN 8 EMPTY (0x00C0000) { } ;----------------------------------------------------- diff --git a/bsp/corstone310/an555_ns.ld b/bsp/corstone310/an555_ns.ld index 2992dd9e..25d6608f 100644 --- a/bsp/corstone310/an555_ns.ld +++ b/bsp/corstone310/an555_ns.ld @@ -60,7 +60,7 @@ __RAM_SIZE = (ISRAM1_SIZE - PROVISIONING_SIZE); -----------------------------------------------------------------------------*/ __STACK_SIZE = 0x00001000; -__HEAP_SIZE = 0x000B0000; +__HEAP_SIZE = 0x000C0000; /* *-------------------- <<< end of configuration section >>> ------------------- diff --git a/bsp/corstone310/an555_ns.sct b/bsp/corstone310/an555_ns.sct index e9eb3064..40b810bf 100644 --- a/bsp/corstone310/an555_ns.sct +++ b/bsp/corstone310/an555_ns.sct @@ -25,7 +25,7 @@ #define ISRAM1_SIZE 0x00200000 #define PROVISIONING_SIZE 0x1000 #define STACK_SIZE 0x00001000 -#define HEAP_SIZE 0x000B0000 +#define HEAP_SIZE 0x000C0000 LR_CODE (ROM_START + ((((0) + (FLASH_S_PARTITION_SIZE)) + BL2_HEADER_SIZE))) { ER_CODE (ROM_START + ((((0) + (FLASH_S_PARTITION_SIZE)) + BL2_HEADER_SIZE))) (((FLASH_NS_PARTITION_SIZE) - BL2_HEADER_SIZE - BL2_TRAILER_SIZE)) { diff --git a/components/freertos_kernel/CMakeLists.txt b/components/freertos_kernel/CMakeLists.txt index c644bebf..139a49d4 100644 --- a/components/freertos_kernel/CMakeLists.txt +++ b/components/freertos_kernel/CMakeLists.txt @@ -8,7 +8,7 @@ set(freertos_kernel_SOURCE_DIR "Path to FreeRTOS-Kernel source code" ) -set(FREERTOS_HEAP "4" CACHE STRING "" FORCE) +set(FREERTOS_HEAP "${CMAKE_CURRENT_LIST_DIR}/integration/src/heap_management.c" CACHE STRING "" FORCE) if(ARM_CORSTONE_BSP_TARGET_PLATFORM STREQUAL "corstone300") set(FREERTOS_PORT GCC_ARM_CM55_TFM) diff --git a/components/freertos_kernel/integration/src/heap_management.c b/components/freertos_kernel/integration/src/heap_management.c new file mode 100644 index 00000000..7c486701 --- /dev/null +++ b/components/freertos_kernel/integration/src/heap_management.c @@ -0,0 +1,37 @@ +/* Copyright 2024 Arm Limited and/or its affiliates + * + * SPDX-License-Identifier: MIT + */ + +#include + +void * pvPortMalloc( size_t xWantedSize ) +{ + return malloc( xWantedSize ); +} + +void vPortFree( void * pv ) +{ + free( pv ); +} + +void * pvPortCalloc( size_t xNum, + size_t xSize ) +{ + return calloc( xNum, xSize ); +} + +/* These are dummy implementations as C standard library does not provide + * functions to get the statistics of heap memory. These dummy implementation are needed + * as these APIs are used as part of FreeRTOS Plus TCP code which is unused in the FRI code (removed by the linker) + * but ARMClang linker requires all the compiled symbols to be defined. + */ +size_t xPortGetFreeHeapSize( void ) +{ + return 0; +} + +size_t xPortGetMinimumEverFreeHeapSize( void ) +{ + return 0; +} diff --git a/release_changes/202402261352.change b/release_changes/202402261352.change new file mode 100644 index 00000000..240e0009 --- /dev/null +++ b/release_changes/202402261352.change @@ -0,0 +1 @@ +heap-management: Use C memory management APIs.