In many cases (test certain modules, first boot-ups, DDR is not available), writing bare-metal (SDK) code with runs on iRAM (OCRAM) is the only possible scenario. The first (attached) patch creates a new linker file with proper sections and the second includes a tiny app (it should be tiny, by definition) using the previous file. These are the steps to have the setup ready:
1. Dowload latest i.MX6 SDK (v1.1.0 is the latest when writing this document).
2. Let GIT take the control (git init; git add .; git commit -m '1st commit')
3. Apply patches (git am < patch1; git am < patch2 )
# This example is intended for a mx6q sabreSD, revision C