iRAM (OCRAM) i.MX6 SDK Application

Document created by Leonardo Sandoval Gonzalez Employee on Sep 19, 2013Last modified by ebiz_ws_prod on Dec 13, 2017
Version 7Show Document
  • View in full screen mode

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 )

4. Compile

            # This example is intended for a mx6q sabreSD, revision C

            $ ./tools/build_sdk -target=mx6dq \

                                -board=smart_device \

                                -board_rev=c \




5. SD Card Flashing & Running:

5.1. ELF file & U-boot:

   # Output image is located on:

                #   elf=output/mx6dq/minimal/smart_device_rev_c/minimal.elf

                $ dd if=$elf \

                     of=/dev/sdb \

                     seek=2048 bs=512; sync


                # Boot your board with your favorite u-boot version, just make

                # sure the bootelf command is presnet

                > mmc dev Y

                > mmc read 0x10800000 0x800 XXX

                > bootelf 0x10800000

               where Y is the SD device and XXX are the records seen when dd flashing.



5.2  BIN file:

   # Output image is located on:

                #   bin=output/mx6dq/minimal/smart_device_rev_c/minimal.bin

                $ dd if=$bin \

                     of=/dev/sdb \

                     seek=2 skip=2 bs=512; sync

                # Place the SD into your board and power-on.





+ The first patch was taken from the internal discussion MX6 SDK (PLATLIB): has anyone created a stripped down version that will run from internal RAM?

Original Attachment has been moved to:

Original Attachment has been moved to:

3 people found this helpful