How to place c or .o file to ITCM?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to place c or .o file to ITCM?

873 Views
jtro
Contributor III

Hi,

I want to place whole c file to ITCM (.text and .rodata). I found option in Managed Linker Script---> Extra linker script input sections but it won't work.

Please see image.

Tried with different syntax but it won't work.

Labels (1)
Tags (1)
1 Reply

744 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Jtro-san

I want to place whole c file to ITCM (.text and .rodata).

In MCUXpresso, you can use following "attribute section" option in c files. 

```

__attribute__((section(".bss.$SRAM_ITC"))) int g_exampleValue;

__attribute__((section(".ramfunc.$SRAM_ITC"))) void examplefunc(void)

{

}

```

"SRAM_ITC" can be set from project setting-> memory.

pastedImage_8.png

In EWARM, you can use following linker setting in icf file.

```

define region TEXT_RAM_region = mem:[from 0x00000400 to 0x0003FFFF];

place in TEXT_RAM_region                        { rw object example.o };

```

Best Regards,

T.Kashiwagi