Quality RTOS & Embedded Software

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


Loading

Using heap_5.c

Posted by miraekim on July 18, 2017

I ported FreeRTOS in TI MSP430FR5969 board. The memory composition of this board are both SRAM and FRAM. The adress space is like below.

SRAM origin : 0x1C00, length = 0x0800 FRAM : origin = 0x4400, length = 0xBB80 FRAM2 : origin = 0x10000,length = 0x4000

I would like to allocate heap to these memory location. For example, When I create 4 tasks, I would like to allocate 2 of task stack to SRAM and the others to FRAM. So my questions are,

  1. Is it right that I can use heap_5.c to allocate heap to non-contagious memory region?

  2. when I initialize heap regions to use heap_5.c, is it also right that I can write the code like below?

    const HeapRegiont xHeapRegions[] = { { ( uint8t * ) 0x1C00, 0x0400 }, // to use SRAM { ( uint8_t * ) 0x4400, 0x0400 }, // to use FRAM { NULL, 0 } /* Terminates the array. */ };

    /* Pass the array into vPortDefineHeapRegions(). */ vPortDefineHeapRegions( xHeapRegions );

  3. Should configAPPLICATIONALLOCATEDHEAP to be defined 1 to use heap_5.c ?

  4. If I use heap_5.c, Do I still need the code in main.c?

    #ifdef ICC430
    persistent /* IAR version. */
    #else
    #pragma PERSISTENT( ucHeap ) /* CCS version. */
    #endif
    uint8t ucHeap[ configTOTALHEAP_SIZE ] = { 0 };

Using heap_5.c

Posted by rtel on July 18, 2017

1. 2.

The answers to these questions are here: http://www.freertos.org/a00111.html#heap_5

3.

Should configAPPLICATION_ALLOCATED_HEAP to be defined 1 to use
heap_5.c ?

No.


[ 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