Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Effect of stack size and heap size value in the linker script (Xilinx Zynq SDK)

Posted by ayazar on July 7, 2017

Hi,

I am trying to learn FreeRTOS on Zynq platform. I have created a project by modifiying the example project found in FreeRTOS. My project uses FreeRTOS 9.0.0.

I have some difficulties understanding stacks and heap.. I created standalone SDK project and added source files of FreeRTOS with my files. When I click on linkerscript, there are two fields: Stack Size and Heap Size.

As far as I understand this stack size isn't related to the stack size parameter given in xTaskCreate(). When a task is created, its stack is allocated from the heap. But this heap is different from the heap mentioned in linker script. I am using heap_4.c as in example project and as heap region, an array is allocated by FreeRTOS.

So, how the sizes given in linker script are used?


Effect of stack size and heap size value in the linker script (Xilinx Zynq SDK)

Posted by richarddamon on July 7, 2017

The stack size in the linker script will be the stack given to the 'main' program (what runs pre-scheduler) and will be reused as the interrupt stack when the scheduler starts.

The heap size in the linker script will be the amount of heap available via the standard C malloc function (as opposed to the heap that heap4.c provides)


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner