Changes between Version 3 and Version 4 of howto/Linker_scripts_MAP_files


Ignore:
Timestamp:
Oct 20, 2015, 1:17:48 PM (9 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • howto/Linker_scripts_MAP_files

    v3 v4  
    1313'''Opening the Linker Command File (Linker Script):'''
    1414
    15 Open the Linker Command File (Linker Script) for a project by expanding the project in the "Project Explorer" window and finding the {{{lscript.ld}}} file inside the {{{src}}} folder.  By default, double-clicking the {{{lscript.ld}}} file will open the Linker Command File in the SDK "Linker Script Editor".  Unfortunately, this editor does not give the granularity of control that is needed for advanced manipulation of Linker Command File.  Instead, right-click on the {{{lscript.ld}}} file and select "Open with" --> "Text Editor".  This will open the file in a generic text editor within the SDK. 
     15Open the Linker Command File (Linker Script) for a project by expanding the project in the "Project Explorer" window and finding the {{{lscript.ld}}} file inside the {{{src}}} folder.  By default, double-clicking the {{{lscript.ld}}} file will open the Linker Command File in the SDK "Linker Script Editor".  Unfortunately, this editor does not give the granularity of control that is needed for advanced manipulation of Linker Command File (Linker Script).  Instead, right-click on the {{{lscript.ld}}} file and select "Open with" --> "Text Editor".  This will open the file in a generic text editor within the SDK. 
    1616
    1717[[Image(linker_script_edit.png, 600px)]]
     
    1919If you do not have the SDK open, you can find the Linker Command File (Linker Script) for the 802.11 Reference design v1.3.0 [http://warpproject.org/trac/browser/ReferenceDesigns/w3_802.11/c/wlan_mac_high_ap/lscript.ld?rev=4628 here].
    2020
    21 NOTE:  The Linker Command File (Linker Script) used in the 802.11 Reference Design was originally generated by the SDK Linker Script Editor and then manually edited.  The Linker Script Editor is very useful for simple designs.  However, for more complicated designs, manual editing is required. 
     21NOTE:  The Linker Command File (Linker Script) used in the 802.11 Reference Design was originally generated by the SDK Linker Script Editor and then manually edited.  This is why the Linker Command File (Linker Script) is included in SVN and should not be re-generated.  The SDK Linker Script Editor is very useful for simple designs.  However, for more complicated designs, manual editing is required. 
    2222
    2323The best practice we have found is to let the SDK Linker Script Editor generate the initial Linker Command File (Linker Script) and then manually edit where required.
     
    5656}}}
    5757  This should be left alone since it is part of the build configuration of the SDK. 
    58 1. The last section defines all the Linker "Sections".  A global variable or function can be placed in a give "section" by using the pragma:  {{{__attribute__ ((section (".my_data")))}}}.  By default, the SDK build setup defines a number of default sections that are used to place code and data.  Looking at the ".text" section:
     581. The last section defines all the Linker "Sections".  A global variable or function can be placed in a give "section" by using the pragma:  {{{__attribute__ ((section (".my_data")))}}}, where "my_data" is the name of the section to place teh code or data.  By default, the SDK build setup defines a number of default sections that are used to place code and data.  Looking at the ".text" section:
    5959{{{
    6060.text : {