Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FreeRTOS TCP/IP stack #9

Merged
merged 13 commits into from
Oct 13, 2023
Merged
2 changes: 1 addition & 1 deletion Bsp/an552_ns.ld
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

__STACK_SIZE = 0x00002800;
__HEAP_SIZE = 0x000b0000;
__HEAP_SIZE = 0x00000400;
Copy link
Contributor

@hugueskamba hugueskamba Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the linker scripts and FreeRTOSConfig.h are used by the two applications, is it also necessary to modify Blinky to use Heap 4 instead of Heap 3?

Can we move the heap selection to https://github.com/FreeRTOS/iot-reference-arm-corstone3xx/blob/main/Middleware/FreeRTOS/CMakeLists.txt so it applies to all applications using the FRI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. Let's handle that as part of another PR to improve blinky example.


MEMORY
{
Expand Down
4 changes: 2 additions & 2 deletions Config/freertos-config/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ extern uint32_t SystemCoreClock;
/* Memory allocation related definitions. */
#define configSUPPORT_STATIC_ALLOCATION 1
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configTOTAL_HEAP_SIZE 512000 /* should be enough */
#define configAPPLICATION_ALLOCATED_HEAP 1
#define configTOTAL_HEAP_SIZE 720896
#define configAPPLICATION_ALLOCATED_HEAP 0

#define configENABLE_MVE 0
#define configENABLE_FPU 1
Expand Down
2 changes: 1 addition & 1 deletion Projects/aws-iot-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ target_link_libraries(freertos_config
app-config
)

set( FREERTOS_HEAP "3" CACHE STRING "" FORCE)
set( FREERTOS_HEAP "4" CACHE STRING "" FORCE)
# Select the native compile PORT
set( FREERTOS_PORT "GCC_ARM_CM55_TFM" CACHE STRING "" FORCE)

Expand Down
4 changes: 4 additions & 0 deletions Projects/aws-iot-example/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "task.h"

#include "mbedtls/threading.h"
#include "mbedtls/platform.h"
#include "threading_alt.h"

/* Include header that defines log levels. */
Expand Down Expand Up @@ -132,6 +133,9 @@ int main()
/* Create system events group. */
xSystemEvents = xEventGroupCreateStatic( &xSystemEventsGroup );

/* Configure Mbed TLS memory APIs to use FreeRTOS heap APIs */
mbedtls_platform_set_calloc_free( mbedtls_platform_calloc, mbedtls_platform_free );

xRetVal = vDevModeKeyProvisioning();

if( xRetVal != CKR_OK )
Expand Down