This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

controlling malloc memory region/heap on arp32 multicore processor without rtos under ccs.

I am having a crash on the adjoining processor with ti_file_io_util code. I traced it to a memory mapping issue. An arp32 processor is sending a malloced pointer via a shared memory region to a cortexM4. The malloced pointer seems to be in processor local memory, not shared as it should be, and it causes a bus error. How do I tell the compiler, I suppose in the linker.cmd file to put the malloc heap area at a certain address. Now it seems to be set in the DATMEM region, which is wrong for this application. I believe it is using TI compilers, while the cortexM4 is gcc.

  • Lawrence Ayres said:
    How do I tell the compiler, I suppose in the linker.cmd file to put the malloc heap area at a certain address.

    I'm not familiar enough with your build flow to be sure that changing the linker command file is the best choice.  But it is certainly one way to do it.  An introduction to TI linker command files is here.  It does not tell you how to determine which output section contains the malloc heap.  But it does show you how to control where output sections are placed in memory.

    Thanks and regards,

    -George