AnsweredAssumed Answered

External Heap Allocation on 21469

Question asked by LordBIX on Jun 7, 2015
Latest reply on Dec 2, 2015 by StefanW



i tried to allocate memory from external DDR2 ram of my 21469 kit. Heap allocation on anything else than standard heap is not working.


in any case i change to different memory segments heap_lookup_name returns -1. Find attached project and debug output


Can you please help and tell me, what i am doing wrong?




* Memory.c


#include <stdlib.h>


int main( void )


  /* Begin adding your custom code here */




    int * x;

    int z;

    int pm * y;

    int loop, pm_heapID;

    x = heap_malloc(0, 1000); // get 1K words of DM heap space


    pm_heapID = heap_lookup_name("seg_ext_dmda");

    y = (int pm *)heap_malloc(pm_heapID, 1000); // get 1K words of PM heap space


    pm_heapID = heap_lookup_name("seg_extheap");

    z = heap_malloc(pm_heapID, 1000);


  return 0;