ICF File multiple memory regions

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

ICF File multiple memory regions

Jump to solution
2,854 Views
jackblather
Senior Contributor I

We are trying to get the ICF file configured so that the IAR C/C++ compiler will use multiple memory regions at link time.

 

We are currently using the Vybrid's OCRAM region from 0x3f00_0000 to 0x3F07_FFFF. We are also using the DCU's memory (we don't use the DCU) at 0x3f40_0000 to 0x3f47_ffff.

 

We put our code into the OCRAM and our data into the DCU memory. Our project doesn't use that much data memory, so DCU memory utilization isn't that much.

 

Attached is the current ram.icf file, which works. Code lives in OCRAM and data lives in DCU memory.

 

Now our code is getting too big to fit in to the OCRAM area. The link phase fails because we're out of OCRAM. We have to turn on optimizations to get it to fit. Even then the size of the project is growing to the point where optimizing the code will not help keep the size of the code down.

 

We'd like the code to go into the OCRAM area and "spill over" into the DCU ram. Also, we'd like the data also in the DCU area like before.

 

How do we specify all this to the linker in the ICF file?

Original Attachment has been moved to: ram.icf.zip

Labels (3)
1 Solution
1,896 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
3 Replies
1,897 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!
0 Kudos
1,897 Views
rendy
NXP Employee
NXP Employee

Hi,

I think you should define another memory region

define region ROM_2_region   = ...

And then place some of your memory blocks into this region.

place in ROM_region   { ... }

place in ROM_2_region   { ... }

Regards

Rene

1,897 Views
rendy
NXP Employee
NXP Employee

Hello,

I will check your linker file tomorrow.

Regards

Rene