Problems with scatter file configuration

Hi:
I'm using a scatter file in the project options (linker tab) in order to have part of the code running on a different memory region. As an example;

IRAM 0x30000000
{
   ; The executable region starts at the load region
   ER_RO 0x30000000
   {
       startup_code.o (STARTUP, +FIRST)
       * (+RO, +RW)
   }
   ER_ZI +0
   {
       * (+ZI)
   }
   ER_OTHER 0x30001000
   {
      function2.o (+RO, +RW, +ZI)
   }
}

The problem is that even when the memory map shows function2 is allocated at the right memory position (0x30001000), when I try to debug the code, the correct assembly code is not there...So, why the code is not copied into this position if the memory map is correct?
Thanks;
Gus

More questions in this forum