Hello
I'm new to the LDF format for ADSP-21584.
I have an object "DataGlobal" that compiles without problems.
I would like to load this object in a shared memory block accessible from SHARC1 and SHARC2.
I've tried to create a SHARED_MEMORY segment in the LDF file
$EXTERNAL_OBJECTS = Common/DataGlobal.doj;
and below the MEMORY block I've added:
SHARED_MEMORY{ OUTPUT($COMMAND_LINE_OUTPUT_DIRECTORY\SHARED.sm) $OBJECTS_EXTERNAL = $EXTERNAL_OBJECTS;
SECTIONS { DataGlobal { INPUT_SECTION_ALIGN(4) INPUT_SECTIONS($OBJECTS_EXTERNAL(DataGlobal)) } > mem_L2B1P3_bw }}
And inside PROCESSOR 21584_CORE_1 I've added:
LINK_AGAINST($COMMAND_LINE_OUTPUT_DIRECTORY\SHARED.sm)
This is obviously not enough since the linker still reports:
[Warning li2060] The following input section(s) that contain program code and/or data have not been placed into the executable for processor '21584_CORE_1' as there are no relevant commands specified in the LDF:
Common/DataGlobal.doj(DataGlobal)
Followed by [Error li1060] The following symbols are referenced, but not mapped...
What am I missing?
Ideally I would like to create my own memory block inside the MEMORY block, something like
MSData { TYPE(BW RAM) START(0x20090000) END(0x20097fff) WIDTH(8) }
But this only results in similar error codes.
Please advice on which steps are necessary to successfully map objects into memory - and how to enable sharing of memory segments between SHARC1 and SHARC2 on ADSP-21584.
Thanks
After a lot of searching I came across this thread:
https://ez.analog.com/dsp/sharc-processors/adsp-sc5xxadsp-215xx/f/q-a/101198/l1-multi-memory-space-in-app-ldf
that helped me understand a little more on how to handle the ldf file - so now at least my sections are properly mapped - but I'm still not completely sure about how to share the segments between the processors.
Hi,
Please refer the 'SHARED_MEMORY{}' section in the below CCES Linker and Utilities Manual: www.analog.com/.../cces-LinkerUtilities-manual.pdf
Also can you please confirm when you're trying to call the variable defined in a one core project in the other core. Are you defining the shared variables/ functions with the extern keyword in your second core project?
Please find the attached example project, which is a small ADSP-21584 example that shows how to use RESOLVE to satisfy symbol definitions from Core2 using the Core1 DXE. For more information about the project, please refer Readme.txt file in the project.
If you are still facing the issues, please share us the example project with the steps to reproduce your issue. This will help us to assist you further.
Regards,Reva
This sounds promising, but I sadly can not see any attacment exampled project project in your reply.Could you please try to upload the example project once more?
Apologies for the inconvenience caused. Please find the attached example project here.
Regards
Reva
Shared_memory_21584_example.rar