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.
Hello,
I want to share some data between C28 and M3 cores. The data is a matrix having different sizes depending on the user`s settings. I`m thinking to allocate it using dynamic allocation of memory, but I don`t know if shared RAM support dynamic allocation of memory.
Do you know if Shared Ram supports dynamic memory allocation?
I have also tried to declaire a variable in the Shared memory and after that to point towards it with a pointer and to use from the memory as much as I need. This method works, but I don`t know if it is safe.
Do you know if the compiler uses the Shared memory for any reason? I`m affraied that by using the second method not to overwrite what does it writes there. I have checked the memory before implementing the code and there was zero at all location I needed.
Thanks,
Monica
Hi!
I don't think that there are some limitations on dynamic memory allocation for shared RAM. At least at Chapter 5.1.1.2 of TRM this info is absent.
Regards,
Igor
Ok,
But do you know what instruction should be used for that, because malloc() allocates memory on the heap and can`t be used for the Shared RAM.
I think it should be something for which you have to specify the starting point, but I didn`t find something so far.
Regards,
Monica
Hi Monica!
I agree. You are right. Malloc() is not suitable. And what is your particular reason to use the dynamic allocation exactly?
Regards,
Igor
Hi Monica!
It seems this thread will be useful for you http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/244588.aspx?pi177899=1.
Regards,
Igor
Hi Igor,
Thanks for the link, but it isn`t suited for what I want to do.
Regards,
Monica
Hi,
The use of dynamic allocation comes for the need to store some vectors that are of different lengths, having maximum 200 values; at one moment all the vectors
have the same length.
I didn`t want to define them in the shared memory, using DATA _SECTION, so to occupy memory for no reason.
Regards,
Monica