ROV in IAR
----------

To access the ROV while in a debug session in IAR

* Use the TI-RTOS menu on the menu bar.

* Select a subview.

.. warning::
	ROV support in IAR is no longer maintained for v9.30 and above.
    When using autosized heap, the ROV may display errors when 
    accessing modules such as Task and Heap for ROV. 
    In order to use ROV with an autosized heap you can apply
    the following patch to the ``function init()`` in 
    ``\kernel\tirtos\packages\ti\sysbios\heaps\package.xs``. 
    The lines highlited below should be added.

     .. code-block:: c
         :emphasize-lines: 9-15
         :linenos:

           function init()
           {
             /* Add HeapMem's primaryHeap addresses range to ROV's memory sections */
             if (xdc.om.$name == "rov") {
                     // original code omitted
                     // .....
                     // .....

                     /* Retrieve the MemoryImage java object. */
                     var Model = xdc.module("xdc.rov.Model");
                     var memReader = Model.getMemoryImageInst();

                     /* retrieve the sections list and add a new section */
                     var sections = memReader.getSections();
                     sections.addSection(0x20000000, 0x20005000);
              }
            }
