Quality RTOS & Embedded Software

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


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. */
    #pragma PERSISTENT( ucHeap ) /* CCS version. */
    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


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


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

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

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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