I have created some classes that include large instances of std::vector<float>, and I want to store these classes in the L3 DDR memory.
However, though the CrossCore documentation for the SECTION command hints that there is an example of how to store variables in external ram, I cannot find the example in the V2.0.2 board support package for the SC589 EZLITE kit.
Are there any further examples or documentation (at a how-to level) for how to portion a section of L3 memory, and declare variables in the L3 memory?
So far I have modified the LDF settings in the system.svc to use external memory, and I have attempted to
#define SEG_EXT_DM section("seg_sdram") // section name taken from app.ldf
and I have then
However, I have yet to get the object to exist in the external memory space.
Hi, Your understanding is correct. You have to add the "#pragma section("seg_ext_code")" above the instruction (which one you need to run from external memory). We currently have a 'C' code that shows how to map a function to external memory and we are attaching the same for your reference. Please find the example LED blink code which will execute from external memory.If your project is on ARM core, by default all the variables and functions will be mapped to L3. The #pragma section is used for SHARC1 and SHARC2.Once the project is build, you can check the map file from the below path for the verification. The function (which you have put in external memory) will map on L3 memory address.[Code Path]\Boot_External\test_Core1\Debug\test_Core1.map.xml Please find the attached example code for your reference. Hope this helps. Regards,Anand Selvaraj.
Hi Anand, Thanks for this!
I ended up implementing two solutions in my project, both from the CCES Sharc C++ manual.
The first solution was to use the <heapnew> include for dynamic declaration on the Heap of custom objects.
The second solution for STD components was to modify the customallocator.h example.