by sebraa » Thu Aug 21, 2014 2:03 pm
e_load() only reads the SREC file into Epiphany memory. Check this file and you will see that it contains a memory dump of all sections referenced in your code (even if it is only zeros). It became a problem to me when a core would start running and writing results to shared memory, while the host was still loading cores (and happily overwrite anything in shared memory over and over again).
I now run e-objcopy -R .shared_dram --output-target srec --srec-forceS3 program.elf program.srec to leave out a specific section from the SREC file when creating it. This way, the memory will not be touched. Make sure this section does not contain important information (and remember that memory will not be zero-initialized either!).