Why is RamFunction located in SRAM_DTC and not SRAM_ITC

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

Why is RamFunction located in SRAM_DTC and not SRAM_ITC

Jump to solution
2,248 Views
p_shep
Contributor IV

The MCUxpresso generated linker section for SRAM_DTC looks like the following:

 

/* Main DATA section (SRAM_DTC) */
.data : ALIGN(4)
{
FILL(0xff)
_data = . ;
PROVIDE(__start_data_RAM = .) ;
PROVIDE(__start_data_SRAM_DTC = .) ;
*(vtable)
*(.ramfunc*)
KEEP(*(CodeQuickAccess))
KEEP(*(DataQuickAccess))
*(RamFunction)
*(.data*)
. = ALIGN(4) ;
_edata = . ;
PROVIDE(__end_data_RAM = .) ;
PROVIDE(__end_data_SRAM_DTC = .) ;
} > SRAM_DTC AT>PROGRAM_FLASH

 

The equivalent SRAM_ITC section does have some ramfunc.*, but not the main *(RamFunction).

 

Wondering why that is?

ITC is otherwise not used for anything. Seems wasteful.

 

Thanks,

Paul.

Labels (1)
0 Kudos
1 Solution
2,244 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi p_shep,

The examples in SDK default use flash and DTCM. Because DTCM is data TCM, ITCM is instruction TCM. If you want to put code or data into ITCM you can set in MCUXpresso. Then IDE will update .ld file. 

 

jingpan_1-1621848762640.png

Click the yellow up arrow to move selected memory up in the table.

jingpan_2-1621848807465.png

Link application to RAM or change Heap and Stack placement.

 

Regards,

Jing

 

 

 

 

View solution in original post

0 Kudos
4 Replies
2,180 Views
p_shep
Contributor IV

OK, so I've just tried, and now I know why.... it doesn't work.

Hit this issue:

https://community.nxp.com/t5/i-MX-RT/RT1064-How-to-solve-gcc-linker-error-ARM-exidx-0x0-relocation/t...

Essentially, since ITC is located at 0x00000000, the jump from Flash (0x70000000) is too great and you get a linker failure.

So that 128K of RAM is wasted? 

0 Kudos
2,174 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I don't understand what you mean. But jump from flash to ITCM is no problem. You can have the bootloader to copy code from flash and jump to there, or you can copy and jump by yourself. There isn't any address restriction to ARM CPU.

 

Regards,

Jing

0 Kudos
2,234 Views
p_shep
Contributor IV

OK, so no technological reason for it, just the way the SDK has it set up.

Thanks.

0 Kudos
2,245 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi p_shep,

The examples in SDK default use flash and DTCM. Because DTCM is data TCM, ITCM is instruction TCM. If you want to put code or data into ITCM you can set in MCUXpresso. Then IDE will update .ld file. 

 

jingpan_1-1621848762640.png

Click the yellow up arrow to move selected memory up in the table.

jingpan_2-1621848807465.png

Link application to RAM or change Heap and Stack placement.

 

Regards,

Jing

 

 

 

 

0 Kudos