FAQ: How to Resolve [Error li1040]

Document created by Kader.M Employee on Mar 6, 2018
Version 1Show Document
  • View in full screen mode

Question:

 

How to Resolve

 

[Error li1040] ".\Talkthrough_TDM_C.ldf":706 Out of memory in output section 'L1_data_a' in processor 'p0'
        Total of 0x15888 word(s) were not mapped.
For more details, see 'linker_log.xml' in the output directory.


[Error li1040] ".\Talkthrough_TDM_C.ldf":760 Out of memory in output section 'L1_data_b' in processor 'p0'
        Total of 0x15888 word(s) were not mapped.
For more details, see 'linker_log.xml' in the output directory.

 

Linker finished with 2 errors
cc3089: fatal error: Link failed
Tool failed with exit/exception code: 1.
Build was unsuccessful.

================================

 

Answer:

 

As you are hitting the li1040 error, I would first recommend ensuring two Linker Optimization options are enabled. The first is Linker Elimination, which can be enabled under Project > Project Options > Link > Elimination >

 

By enabling the 'Generate Linker Map' option under the 'General' options for the Linker. This will produce a "project_name.map.xml" file that can be opened in Internet Explorer. It will show all your memory sections, and how much free/unused space there is.

 

The other is the option "Individually map functions and data items", which is found under the 'General' tab of the Link options (under this same tab) to "Generate Symbol Map"... When enabled, directs the linker to fill in fragmented memory with individual data objects that fit. When this option is selected, the default behavior of the linker (to place data blocks in consecutive memory addresses) is overridden.

 

Should you eventually exhaust the available internal memory, you would need to look at making use of SDRAM - if your target has external memory.

 

You can use the section pragma with some basic LDF modifications, e.g; In your code you have something like:
        #pragma section("sdram_bank1")
        int vector[22050];

 

Also please refer the below Ezone thread
https://ez.analog.com/message/5247

Attachments

    Outcomes