Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS: Problem with Address in "MessageQ_alloc" and "MessageQ_free"

$
0
0

Tool/software: Code Composer Studio

Hii All,

I am working on messageQ communication between ARM to DSP. I am creating two tasks in DSP, in first task MessageQ_get is placed in while loop. In second task I have MessageQ_free, messageQ_alloc and MessageQ_put. Dsp load i am building with the CCS v6.

ARM code has one thread, inside the thread i have messageQ_get and messageQ_put and ARM load is building in linux terminal. 

I have declared messageQ variable as follow

#define MSGQ_ALLOC_SIZE   16

MessageQ_Msg aAllocBuf[MSGQ_ALLOC_SIZE];

NOTE: I have allocated a 512 bytes of heap for messages.

I have a buffer of 16 which is used to allocate, put and free the message. When I am trying to allocate for aAllocBuf [0] , aAllocBuf [1] and so till aAllocBuf [15] it is allocating with the same address  for all the indexes of a buffer. After four allocations, I am freeing the buffer and it is freeing the allocated memory for some random messages and DSP core0 is crashing by throwing an error as follow

[t=0x00000009:c397944e] ti.sysbios.heaps.HeapBuf: ERROR: line 297: assertion failure: Cannot call HeapBuf_free when no blocks have been allocated
ti.sysbios.heaps.HeapBuf: line 297: assertion failure: Cannot call HeapBuf_free when no blocks have been allocated
xdc.runtime.Error.raise: terminating execution 
 
 
I am attaching .rar of my CCS project and ARM .c file.
 
Kindly refer my CCS project and ARM .c file for more understanding.
 
I AM ATTACHING THE SCREENSHOT OF MY TWO RUNS..
 
 
 
 

 
 
(Please visit the site to view this file)    This is my CCS project for DSP and also it contains the .c file of ARM.
 

ccsv6

bios_6_41_01_36

ipc_3_36_01_11

xdctools_3_31_00_24_core

 TCI6638K2K platform

windows10

Thanks n Regards

Mohan

 
 
 

Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>