Hi Anthony !
Glad my answer helped you
I'm not qualified enough to tell if your code is wrong but i do think you should first try to open a shared memory segment on the host side that would be accessible for both the host and the epiphany.
As I stated in my recent post (
viewtopic.php?f=13&t=2500) there seems to be two functions aiming at allocating some shared memory (in the external SDRAM). You can have their full prototypes directly in the headers of e-hal-api library or in the eSDK official documentation (
http://www.adapteva.com/docs/epiphany_arch_ref.pdf).
Once you opened the shared memory space in the host program, you can then write or read anything in it from the host or device side. On the device side however you need to access the previously created memory space. If you used e_allocate, you only have to read/write in the correct address space but if you used e_shm_allocate then you will have to "attach" the memory segment onto the eCore by calling e_shm_attach.
For further details, the official reference manual is very well done and explain a lot of things. Although I'm quite sure it doesn't mention the e_shm_xxx functions so you could give a look at the included headers (see the sdk/epiphany-libs/tools/include directory) and, for example the hello-world sample given on the parallella distribution.
Regards,
Thomas.