Don't worry, you should be fine with Eclipse.
You'd better replace your
# define ONCHIP_MEM_BASE 0x10000
with
# include "system.h"
Everything else seems to be ok, so if the hardware is correct and you have the right value in memory you should be reading the correct value.
You could check it by turning this memory into a single port memory (disconnecting from Nios and ignoring the software) and then enabling the ISMCE - In System Memory Content Editor. This way you could check if your hardware is writing to the memory as expected. The ISMCE can be enabled in the memory properties in Qsys and you can monitor it using the tool from the "Tools" menu in Quartus.
Also if in doubt you could try reading from memory using IORD_8DIRECT(ONCHIP_MEM_BASE,0) which would return the first byte from your memory or IORD_32DIRECT(ONCHIP_MEM_BASE,0) if you need to read four bytes into an int.