Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists