by mhonman » Thu Jul 10, 2014 6:14 pm
Each of the 16 Epiphany cores has only 32KB of super-fast local memory. When a program exhausts that space its code or data needs to be stored somewhere else - most likely in the DDR RAM attached to the Zynq. Since it is non-cached memory, accesses are pretty slow so the best option when program size exceeds 32KB (which your program does by 465112 bytes) is to identify the performance-critical code and data and explicitly locate it in local e-core RAM.
The reason including iostream has such a size penalty is that it drags in not only the C++ I/O library but also lower-level I/O libraries needed by iostream.
And there's another thing to bear in mind - Epiphany programs can only perform I/O via traps that are handled by the e-server that provides a gdb debugging interface.
It is possible to write a program to handle these traps and map them to Linux system I/O calls - a while back when I had some time to experiment I but ran out of time debugging. Such an interface will never be fast, but may be OK for debugging.
It's likely that by now others have come up with a better solution for semi-hosted I/O so don't despair...
Mark