Modified hello app tested with yocto. Check the complete tutorial in the upstream repository.
Note this version requires custom device tree bits and properly setup UIO mem regions, etc. Otherwise you get to see it print an error message.
The bitbake recipe for this (modified) version lives in the (enclustra) user layer while the top-level "project" repo is here