Page 1 of 1
Sharing 32KB memory for each core: program code and data
Posted:
Wed Sep 23, 2015 9:01 pm
by etim
Re: Sharing 32KB memory for each core: program code and data
Posted:
Wed Sep 23, 2015 10:01 pm
by sebraa
Run the e-size program on the Epiphany ELF file. It tells you the static memory consumption of your program.
The dynamic memory consumption (stack and heap) is not easily found out.
Since your code should not use the heap at all, just add some margin for the stack to those numbers.
You can use the upper 16 MB of shared memory for your communication needs.
The lower 16 MB are used for miscellanous stuff (see the linker file for details).
Re: Sharing 32KB memory for each core: program code and data
Posted:
Thu Sep 24, 2015 8:05 pm
by etim
Thanks, Searching for `e-size` lead me here: , with more information.
Re: Sharing 32KB memory for each core: program code and data
Posted:
Thu Sep 24, 2015 8:11 pm
by etim
Re: Sharing 32KB memory for each core: program code and data
Posted:
Fri Sep 25, 2015 2:06 pm
by sebraa
Exactly. But remember that Epiphany uses a shared address space. It is possible - but extremely slow - to execute code directly from shared memory. The default linker script puts the C library into shared memory.
For optimal performance, use the internal.ldf linker script, but then your program must fit in 32 KB (unless you manage things by hand).
Re: Sharing 32KB memory for each core: program code and data
Posted:
Tue Sep 29, 2015 12:12 pm
by etim