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.
Tool/software:
Hello,
My plan is to use the GS-RAM-Blocks of the F2838x as heap. To achieve this, I simply added this to the linker command file of CPU2:
and
I am aware that I need to set up the memory ownership before using the new operator. This is how I did that:
I have configured GS-RAM blocks 8 to 15 to belong to CPU2. On CPU1, I assign the GS-RAM blocks like this:
After that, on CPU2, I wait that I get access to the GS-RAM-Blocks using this:
After these lines, when I use the new operator, all I get back is a null-pointer. Hence the memory allocation does not work. What is missing in my workflow?
Thanks,
Flurin
Hi,
After these lines, when I use the new operator, all I get back is a null-pointer. Hence the memory allocation does not work. What is missing in my workflow?
I am not clear on your query. What do you mean by using the new operator ?
Regards,
Vivek Singh
Hi Vivek
I am referring to the C++ new operator, i use it like this:
When the heap is in the GS-RAM, I always get null pointers back from new.
Best,
Flurin
I was able to find a workaround: I overloaded _system_pre_init on CPU2 with a busy-wait-loop. This way, CPU2 waits until CPU1 grants access to the GS-RAM before it allocates the heap:
I posted a follow-up questions about how to configure the debug-configuration such that the debugger does not change the boot-order of the CPUs. Please find it here:
e2e.ti.com/.../tms320f28388d-debugger-changes-boot-order-of-cpu1-and-cpu2