Author Topic: Guide Linker error  (Read 6660 times)

Offline Pankaj

  • PLUS+1 User
  • **
  • Posts: 9
  • Karma: +0/-0
Guide Linker error
« on: February 03, 2016, 09:15:51 AM »
Facing below problem with Linker in Guide.

"app2812link.cmd", line 23: error: placement fails for object ".text", size
   0x1d6a3 (page 0).  Available ranges:
   BASE_SECTOR   size: 0x1f80       unused: 0x0          max hole: 0x0
   FLASH        size: 0x1bfe0      unused: 0x0          max hole: 0x0       
"app2812link.cmd", line 24: error: placement fails for object ".econst", size
   0x1bca (page 0).  Available ranges:
   BASE_CSM     size: 0x76         unused: 0x0          max hole: 0x0
   BASE_SECTOR   size: 0x1f80       unused: 0x0          max hole: 0x0
   FLASH        size: 0x1bfe0      unused: 0x0          max hole: 0x0       
error: errors encountered during linking; "xyz.out" not built

Not a clue whats going on ....  8) 8) 8)

Anyone came across similar problem before ???
« Last Edit: February 03, 2016, 09:43:37 AM by Pankaj »

Offline Daniel

  • PLUS+1 Expert
  • ****
  • Posts: 74
  • Karma: +6/-0
Re: Guide Linker error
« Reply #1 on: February 11, 2016, 11:00:38 AM »
Hello Pankaj

It seems like you have passed the limit of available memory in the target system.
You may to go back one step in your version control system, to the previous working version, compile it and have a look in the Build messages how much memory the application is calculated to consume. Looks something like this (SC050-120):

   Danfoss PLUS+1 GUIDE Software: [MEMCalc] Version: 7.2.10
   ***

   ****** Memory Usage in bytes ******
   Type            Total           System          Application     Free            Used/Avail     
   ------------------------------------------------------------------------------------------------
   ROM             507904          93926           2448            411530          1%             
   RAM             129536          34400           0               95136           0%             
   NV              4000            0               0               4000            0%             


There you can see an estimate of how much free memory you have (about 411 kB in this example). The % shows how much is used in percentage. Please note that the memory calculation is just an estimate.
ROM is basically where your application is stored.
RAM is for temporary values. Arrays often have a big impact here.

If the ROM is full, the application code most often can be optimized to consume less memory. This basically means using less components in the design. Look through your code and see if there, for example, are portions of code that is often repeated and that can be placed in a loop instead, or in a page like a subfuncion etc. There can be many ways and most applications can often be optimized a little bit more...

The "Development Guideline" document (found in you Danfoss folder on the Start menu) is also giving a few examples.


Best Regards
Daniel
PLUS+1® Help desk
PLUS+1® Help Desk Team