Home
MCUEZLNK User Guide - Freescale Semiconductor
Contents
1. SEGMENTS MY_STK NO_INIT OxB00 TO OxBFF MY_RAM READ_WRITE 0OxA00 TO OxAFF MY_ROM READ_ONLY 0x800 TO Ox9FF END PLACEMENT text IN MY_ROM data IN MY_RAM stack IN MY_STK END STACKTOP OxB7E In the previous example the stack pointer will be defined from address OxB7E down to address OxB00 In an assembly application the stack pointer must be initialized in the source code Defining the stack in the prm file only ensures no overlap between the stack and the code or data sections in the application 4 4 11 VECTOR Initialize Vector Table Syntax Description User s Manual VECTOR InitByAddr InitByNumber The VECTOR command initializes the vector table The vector table can be initialized in the assembly source file or in the linker parameter file although initialization in the prm file is recommended A vector is a small amount of memory about the size of a function address This command allows the user to initialize the processor vectors while downloading the absolute file A VECTOR command consists of a vector location containing vector location and a vector target containing the value to store in the vector MCUez Linker 70 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands The syntax VECT
2. NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x800 TO 0x80F MY_ROM READ ONLY 0x810 TO OxAFF MY_STK READ WRITE OxBOO TO OxBFF ROM_2 READ_ONLY 0x500 TO Ox7FF END PLACEMENT text rodata INTO MY_ROM data INTO ROM_2 stack INTO MY_STK Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Place the specified section in a segment that has been defined with an appropriate qualifier Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF ROM_2 READ_ONLY 0x500 TO OXx7FF END PLACEMENT text NTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup MCUez Linker User s Manual MOTOROLA Linker Messages 133 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 35 L1113 lt Section name gt Section Has Segment Type lt Segment Qualifier gt Illegal Type Warning Description A section is placed in a segment which has been defined with an incompatible qualifier This message is generated in the following cases e The section stack is placed ina READ_ONLY segment e
3. END PLACEMENT text data stack END Set reset vector ECTOR ADDRESS OxFFF lt INTO MY_ROM INTO MY_RAM INTO MY_STK on _Startup E _Startup Change the segment start or end address to define a valid memory range MCUez Linker 142 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 6 3 44 L1124 or Should Directly Follow Filename Type Error Linker Messages Linker Messages Reference Description The or suffix specified after a filename in the NAMES block does not directly follow the filename A space prob ably exists between the filename and suffix Example LINK fibo abs NAMES fibo o startup o END ERROR or should directly follow the filename SEGMENTS MY_RAM READ WRITE 0x800 TO Ox80F MY ROM READ ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Remove the extra space after the filename Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM R
4. This flag is tested in the startup code to determine if the stack pointer should be initialized User s Manual MOTOROLA Operating Procedures 85 For More Information On This Product Go to www freescale com NOTE NOTE User s Manual Freescale Semiconductor Inc Operating Procedures main stackOffset nofZeroOuts A function pointer set to the application s root function In a C program this is usually function main unless a MAIN entry in the parameter file specifies another function as root Ina ROM library this field is zeroed out The standard startup code jumps to this address once initialization completes Valid only if 1ags 0 This field contains the initial value of the stack pointer The number of READ_WRITE segments to fill with zero bytes at startup This field is not required if there is no RAM memory area that should be initialized at startup Be careful because if the nofZeroOuts field is not present in the startup structure the field pZeroOut must not be present either pZeroOut toCopyDownBeg nofLibl nits A pointer to a vector with elements of type _Range It has exactly nofZero0Out s elements each describing a memory area to be cleared This field is not required 1f there is no RAM memory area that should be initialized at startup If this field is not present the field nofZeroOuts must not be present Contains the address of the fi
5. 154 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 55 L1301 Cannot Open File lt Filename gt Type Error Description The linker is unable to open the application map file absolute file or one of the binary files used to build the application Tips e Ifthe abs file or nap file cannot be found ensure that memory is available for the directory to store the file and the directory has read write access e Ifthe environment variable TEXTPATH is defined the map file is stored in the first directory specified otherwise it is created in the directory where the source file is detected e If the environment variable ABSPATH is defined the absolute file is stored in the first directory specified otherwise it is created in the directory where the parameter file is detected e Ifa binary file cannot be found make sure the file exists and is spelled correctly Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the working directory 6 3 56 L1302 File lt Filename gt not Found Type Error Description A file required during the link session cannot be found This message is generated when the parameter file specified on the command line cannot be found Tips e Make sure the file exists and is spelled c
6. All linker options except V and H can be defined in the linker Option Settings dialog box Refer to Figure 2 8 for an illustration of the Option Settings dialog box All options including V and H can be specified on the command line in the linker Specify the parameter file followed by a space then the linker option See Figure 5 1 File Linker View Help Djem Figure 5 1 Linker Command Line Options set in the Option Settings dialog box remain indefinitely for all linking sessions until changed again by the user Options specified on the command line are temporary and apply to the current linking session MCUez Linker 90 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Environment Variables Linker Options Options are not case sensitive For example fibo prm otest abs is the same as FIBO PRM OTEST ABS Options are listed in alphabetical order in the next subsections 5 3 1 E E Define application entry point Syntax lt parameter file gt lt option gt lt function gt Arguments lt function gt Name of function that represents entry point in the application Default None Description This option specifies the application entry point When the entry point is located in an assembly object file the corre sponding symbol must be a global symbol specified in an XDEF directive
7. Description User s Manual Type Tip Error An illegal relocation of an object is detected in the object file lt Object gt at address lt Address gt The type of object is given in lt objType gt Check the relocation at that address The offset may be out of range for this relocation type If not it may be caused by a corrupt object file MCUez Linker 170 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 102 L1908 Fixup Error in lt Object gt Type lt objType gt at Offset lt Address gt Type Error Description An illegal relocation of an object is detected in the object file lt Object gt at address lt Address gt The type of object is given in lt objType gt Tip Check the relocation at that address The offset may be out of range for this relocation type If not 1t may be caused by a corrupt object file 6 3 103 L1910 Invalid Section Attribute for Program Header Type Error Description A program header needs specific section attributes that should not be changed Tip This is an internal error and may be caused by a corrupt object file 6 3 104 L1911 Program Header End is not Aligned on the End of a Section Type Warning Description The program has to be aligned with the end of a section 6 3 105 L1912 Object lt obj gt Overlaps with Another last addr lt addr
8. e Numeric constants Numeric constants are displayed in the C language format Constants that are in the Ox format are hexadecimal Constants that have no prefix are assumed to be decimal The notation k unless to denote a frequency setting in kilohertz defines a number multiplied by 1024 e Function prototypes Structures and function call descriptions are given in terms of the C language This does not limit the implementation of calling programs to C but it is the calling routine s responsibility to provide the correct link to these routines MCUez Linker User s Manual MOTOROLA General Information 21 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc General Information User s Manual MCUez Linker 22 General Information MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker 2 1 Contents 2 2 Introduction MCUez Linker Section 2 Graphical User Interface GUI Jue OCI AA 23 i Linker Graphical User Inteqtace 4 46 4455400 o08d Sowsase dead 24 ee DOOM epi G da AA eek eee 25 pe e A Ann 26 fae II y en RAE ERRE ARRE 27 2 3 4 ot ee iria rr AAA OR 27 2 3 4 1 as AA 27 2 3 4 2 Le AA E T EEEN E EE ens 31 2 3 4 3 Wie OO AA 34 2 3 4 4 Help MOM 255d cb gine denon A 34 pe pOr tie Input PUE ces rcesscardianres tic 34 Te Using the Command Late 44424 44i460s444 4640444
9. Example fibo prm E entry Similarly the command INIT entry can be put in the prm file See also 4 4 2 INIT Specify Application Entry Point 5 3 2 H H Help Syntax lt option gt Arguments None Default None Description Displays the list of linker options and a brief description Example H See also None MCUez Linker User s Manual MOTOROLA Environment Variables 91 For More Information On This Product Go to www freescale com 5 3 3 L 5 3 4 M 5 3 5 N User s Manual Freescale Semiconductor Inc L Syntax Arguments Default Description Example See also M Syntax Arguments Default Description Example See also N Syntax Arguments Default Description Example See also Environment Variables Add path to search path lt parameter file gt lt option gt lt path gt lt path gt Complete directory path None Add another path to be searched test prm LC MCUez misc None Generate map file lt parameter file gt lt option gt None None This option causes a map file to be generated test prm M 4 4 5 MAPFILE Configure Map File Show notification box in case of errors lt parameter file gt lt option gt None None This option enables an error dialog box to be displayed test prm N None MCUez Linker 92 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com 5 3 6
10. Define the specified segment with the READ_ONLY qualifier 6 3 41 L1121 Out of Allocation Space at Address lt Address gt for copy Section Type Description User s Manual Tip Error Insufficient memory to store information for initialized variables in the copy section Specify a higher end address for the segment where the copy section is allocated MCUez Linker 140 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 6 3 42 L1122 Section copy Must Be Last Section in Section List Type Error Linker Messages Linker Messages Reference Description The copy section is not specified at the end of a section list in the PLACEMENT block Since the size of this section cannot be evaluated before all initialization values are written the copy section must be the last section in a section list Example A sectio LINK Nika st fibo abs NAMES fibo o startup o END SEGME M M M END NTS Y_RAM Y_ROM Y_STK PLACEMENT COPY data stack END Se lt t rese ECTOR ADDR ERROR Section copy must be the last section in the READ WRITE 0x800 TO Ox80F READ ONLY 0x810 TO OxAFF READ WRITE OxBOO TO OxBFF text INTO MY_ROM INTO MY_RAM INTO MY_STK t vector on _Startup ESS OxFF
11. Error An absolute object overlaps with another absolute object or with a vector A ERROR Absolute object globChar overlaps with another absolute allocated object or with a vector LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONL 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OXxBFF END PLACEMENT text rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END OBJECT_ALLOCATION fiboCount AT 0xC02 counter AT 0xC03 END Set reset vector on _Startup ECTOR ADDRESS OXFFFE _Startup lt Move the object to a free position User s Manual MOTOROLA Linker Messages 127 For More Information On This Product Go to www freescale com Type Description Example Tips User s Manual Freescale Semiconductor Inc Linker Messages 6 3 29 L1106 lt Object Name gt not Found Error Warning An object referenced in the parameter file or in the application is not found This message is generated when An object specified in a VECTOR or VECTOR ADDRESS command is not found error No startup structure is detected in the application warning An object function or variable referenced in another object is not found in the application error An object function or variable specified in the ENTRIES block is not foun
12. Freescale Semiconductor Inc User s Manual MCUez Linker 40 Files MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker 4 1 Contents MCUez Linker Section 4 Operating Procedures 4 2 AA 42 4 3 Pe A 5 49 E a eae 42 4 3 1 Syntax of the Parameter File 54dssadcwaishacvedeseeasen 42 4 3 2 Mandatory Parameter File Linker Commands 44 4 4 Linker OUMUAUIS 63 ario RRA 45 4 4 1 ENTRIES List of Objects to Link with Application 45 4 4 2 INIT Specify Application Entry Point 47 4 4 3 LINK Specify Name of Output File ooocoooomomoo o oo oss 47 4 4 4 MAIN Specify Root Function 665 ivccecadaeaseeneteosacs 49 4 4 5 MAPFILE Configure Map File oosinnsirrcii nr rs res 49 4 4 6 NAMES List Files 50100 rr 52 4 4 7 SEGMENTS Define Memory Map lt eoocinccicrroi eres 53 4 4 7 1 Segment GGUS srrssorrsskitaricir ls ai 55 4 4 7 2 Sesment AHEMEN ic os eros ney seh AA 56 4 4 7 3 sa A ods den i dens ehae 59 4 4 8 PLACEMENT Place Sections into Segments 61 4 4 8 1 Specifying a List Of Sections 642 6sra0 sort RT 63 4 4 8 2 ypecifyine a List OF ESTI 6 6 errar 64 4 4 8 3 Predefined Seco coic44 eke ksedadeheebdotneuseue duns 65 4 4 8 4 Allocating User Defined SectiOMS o0ooooomoo 67 4 4 9 STACKSIZE Denne Stack STE oes ricardo 68 4 4 10 STACKTOP Define Stack Pointer Initial Va
13. button to open the Current Configuration dialog box Select the Paths tab In the Configure selection box select Object Enter directories in the list box one directory on each line Syntax LIBPATH lt path gt Arguments lt path gt Paths separated by semicolons without spaces Description The linker searches the project directory for the library files specified in the linker prm file The linker then searches the directories specified in the environment variables OBJPATH and GENPATH Example LIBPATH sources bin lib MCuez Shell Select Change button to open the Current Configuration dialog box Select the Paths tab In the Configure selection box select Library Enter directories in the list box one directory on each line User s Manual MOTOROLA Environment Variables 99 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Environment Variables 5 5 4 ABSPATH 5 5 5 TEXTPATH User s Manual Syntax ABSPATH lt path gt Arguments lt path gt Paths separated by semicolons without spaces Description Set this environment variable to store the absolute files created by the linker in the first directory specified If ABSPATH is not set the generated absolute files will be stored in the directory where the parameter file was found Example ABSPATH sources bin headers MCuez Shell Click the Change button to open the Cur
14. copy section Objects in this section are copied at startup from ROM to RAM The runtime stack has its own segment named stack It should always be allocated to a READ_WRITE segment User s Manual MOTOROLA Operating Procedures 65 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures data text StartData init NOTE User s Manual The data section is the default for all objects normally allocated to RAM It is used for variables not belonging to any section or to a section not assigned a segment in the PLACEMENT block If the bss or stack sections are not associated with a segment they are included in the data memory area in the following structure L BE data bss stack The text section is is the default section for all functions If a function is not assigned to a certain section in the source code or if its section is not associated with a segment in the parameter file it is automatically added to the text section Ifthe rodata rodatal startData or init sections are not associated with a segment they are included in the t ext memory area in the following structure nit StartData text rodata rodata1 The startup description data initialized by the linker and used by the startup routine is allocated to segment startData This section must be allocated to a READ_ONLY segment
15. 152 L1206 Stack Overlaps with a Segment Which Appears PLACEMENT Block apra edu ddesiy 153 L1207 STACKSIZE Command is Missing 154 L1301 Cannot Open File lt Filename gt cosomoommosrn 155 L13202 File lt Filename gt not Pound cooperar era 155 L1303 lt Filename gt is not a Valid ELF File 156 User s Manual MOTOROLA Table of Contents 11 For More Information On This Product Go to www freescale com User s Manual Freescale Semiconductor Inc Table of Contents 6 3 58 6 3 59 6 3 60 6 3 61 6 3 62 6 3 63 6 3 64 6 3 65 6 3 66 6 3 67 6 3 68 6 3 69 6 3 70 6 3 71 6 3 72 6 3 73 6 3 74 6 3 75 6 3 76 637 6 3 78 6 3 79 6 3 80 6 3 81 6 3 82 6 3 83 6 3 84 6 3 85 6 3 86 L1304 lt Filename gt is not a Valid Hex File oooo o 156 L1305 lt Filename gt is not an ELF Format Object File ELE Object File Expected esocipurccrirarris yde 156 LAOS Cannot Open Files sai AAA 157 L1400 Incompatible Processor lt Processor Name gt in Previous Files and lt Processor Name gt in Current File 157 L1401 Incompatible Memory Model lt Memory Model Name gt in Previous Files and lt Memory Model Name gt in Current File 157 L1403 Unknown Processor lt Processor Constant gt 158 L1404 Unknown Memory Model Memory Model Constant gt 0cirscrirasicoiadar on 158 L1501 lt Symbol Name gt Cannot be Moved in Se
16. 6 3 65 6 3 66 6 3 67 Linker Messages Contents L1125 In Small Memory Model Code and Data Must Be Located on Bank 664ysccdacaeesecssawades 144 L1127 Object Allocated Outside of Segment Bounds HC12 145 L1200 Both STACKTOP and STACKSIZE Defined 146 LI ZUL N Stack Denne 22402 useedebeuasensos uous eed ix 147 L1202 Stack Cannot Be Allocated on More Than One Segment oconosrississ remises onc 148 L1203 STACKSIZE Command Defines a Size of lt Size gt But stack Specifies a Stacksize of lt Size gt 149 L1204 STACKTOP Command Defines Initial Value of lt Stack Top gt But stack Specifies Initial Value AE AA 151 L1205 STACKTOP Command Incompatible with stack Being Part of List of Sections 152 L1206 Stack Overlaps with a Segment Which Appears in PLACEMENT Block cscsrccstoriaica corrida 153 L1207 STACKSIZE Command is Missing 154 L1301 Cannot Open File lt Filename gt 6 26424406 beusaunsve 155 L1302 File lt Filename gt not Pound 2 64 2442seudi ences 155 L1303 lt Filename gt is not a Valid ELF File o co 156 L1304 lt Filename gt is not a Valid Hex File 156 L1305 lt Filename gt is not an ELF Format Object File ELF Object File Expected exotica erth 156 L12309 Cannot Open Ple 4 24edesgseonsupedeedenoase 157 L1400 Incompatible Processor lt Processor Name gt in Previous Files and lt Processor Name gt in Current
17. ALIGN exp ObjSizeRange exp ObjSizeRange Number Number TO Number CompareOp Number CompareOp NES M gt wn gt CharacterList HexByte HexByte Placement SectionList INTO SegmentList SectionList SectionName SectionName Sect ionName Ident SegmentList Segment Segment Segment SegmentName SegmentSpec InitByAddr ADDRESS Address Vector InitByNumber VectorNumber Vector Address Number VectorNumber Number Vector FuncName OFFSET exp exp exp Ident lt any C style identifier gt FileName lt any file name gt exp Number Number DecimalNumber HexNumber OctalNumber HexNumber OxHexDigit HexDigit DecimalNumber DecimalDigit DecimalDigit HexByte HexDigit HexDigit MCUez Linker User s Manual MOTOROLA Operating Procedures 43 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures NOTE HexDigit 0 111 2 3141516 7 1819 A BI CIDI EI F a blcldlel tf DecimalDigit 0 1 213 1415161718109 Comments may appear anywhere in a parameter file except where filenames are expected Use either C style comments or C style comments Filenames should not contain paths This keeps sources portable Otherwise the sources are copied to another directory and the linker might not find all files needed
18. Absolute 2 enc oe corse ihe oe rd e ects 19 38 47 52 A eeeee based E R a a R dai siaeads 52 INE Pie cet sos aie aoe Ravn den ho eee ce aes Pe ee eae ts 38 48 49 MIOLO o hs 38 Eloo A mo edecastccdeeene cages I2 Parametros dd a by Da E wn 37 Parameter LINKET ce A A is 37 42 File Meda 27 G GENPATEL icc occ ees cog face ete a ene ae 44 52 Nada 47 91 A O R 31 A ies a i Ba eee E E A S wae ss 34 User s Manual MCUez Linker 180 Index MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Index L Libr ry Hale coe t aod eh eet ee ene seat eb eesshe Zee bead E a ia 52 TINK e203 3h es bot A a RR ae ee ee ee oe 47 93 Linker Meh 4 4 es 31 M IO aranne rre eae eed owe eee EENE 92 AP tian a a A a A ia ok Gah eae a eae 49 IMAP Fil cani ia PR RE 38 48 49 COPY DOWN oe g55 64 a ead as a os tee he ato hed a PSE G we dds 50 A fees eee te a ees O eat os 50 OBJECT ALLOCATION 0 00 000 ccc eee ees 50 OBJECT DEPENDENCY 0 0 0 0 ccc eens 50 SEGMENT ALLOCATION 0 0 0 0 00 0 00 ccc eee ees 50 STARTUP gt oo redacta risa 50 STATISTICS 255050 a Bate id a A 50 TARGE Dic eee dong faced een oe due dd a de dae 50 UNUSED OBJECTS vialidad 50 MAPFILE 0 00 ia ROS Oa EE eG ea eet 49 92 Ment AR i he tral da ir Da ira E a ae MESSAGE situ qe ba iden id oh Reo ends bawu Reo Shee ba tae 31 Message ERROR o ui a be We eae ib ia e 108 FATAL e a dd aes 108 WARNING
19. Allocation is performed for the first segment in the list until this segment is full Then allocation continues for the next segment in the list and so on until all objects are allocated Example LINK test abs NAMES test o startup o END SEGMENTS RAM_ AREA READ_WRITE 0x00100 TO Ox002FF STK_AREA READ_WRITE 0x00300 TO Ox003FF NON_BANKED_AREA READ ONLY 0x0C000 TO OxOFFFF BANKO_AREA READ ONLY 0x08000 TO OxOBFFF BANK1_AREA READ_ONLY 0x18000 TO Ox1BFFF BANK2_AREA READ_ONLY 0x28000 TO Ox2BFFF END PLACEMENT data INTO RAM_AREA stack INTO STK_AREA init startData rodatal NON_BANKED copy INTO NON_BANKED_AREA text INTO BANKO_AREA BANK1_AREA BANK2_AREA END In the previous example e Functions implemented in section text are allocated first in segment BANKO_AREA When memory for this segment is filled allocation continues in segment BANK_1_ AREA then in BANK2_AREA NOTE Segment names specified in the PLACEMENT block must be valid segment names defined in the SEGMENTS block The linker is case sensitive Segments Ram_Area and RAM_AREA are different segments User s Manual MCUez Linker 64 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker
20. END STACKSIZE 0x60 Set rese VECTOR ADDR OxBOO TO OXBFF MY_ROM MY_RAM MY_STK t vector on _Startup ESS OXFFFE _Startup In the previous example the initial value for the stack pointer is evaluated as OxB00 0x60s 2 OxB5DE User s Manual MCUez Linker 150 Linker Messages For More Information On This Product Go to www freescale com MOTOROLA Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 51 L1204 STACKTOP Command Defines Initial Value of lt Stack Top gt But stack Specifies Initial Value of lt Initial Value gt Type Error Description The stack is defined through both a STACKTOP command and placement of the stack section in a READ_WRITE or NO_INIT segment However the value specified in the STACKTOP command is bigger than the end address of the segment where the stack is allocated Example a ERROR STACKTOP command defines an initial value of OxCFE but stack specifies an initial value of OxBFF LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO STK_1 END STACKTOP OxCFE Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup
21. None Prints the linker version and project directory V None Don t print information messages lt parameter file gt lt option gt None None Suppresses all information messages Warning and error messages are printed test prm W1 None Don t print information and warning messages lt parameter file gt lt option gt None None Suppresses all information and warning messages Only errors are printed test prm W2 None MCUez Linker 94 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com 5 3 11 Wmsg8x3 Freescale Semiconductor Inc Environment Variables Linker Options Wmsg8x3 Convert filenames to DOS 8 3 format Syntax lt parameter file gt lt option gt Arguments None Default None Description Reduces long filenames to eight characters plus extension Example test prm Wmsg8x3 See also None 5 3 12 WmsgFb v m WmsgFb vlm Sets message file format for batch mode Syntax lt parameter file gt lt option gt Arguments vim Default M Description Sets the message file format to verbose mode or Microsoft format Verbose mode displays more information than the Microsoft format Example test prm WmsgFbv See also None 5 3 13 WmsgFi v m WmsgFi vim Sets message format for interactive mode Syntax lt parameter file gt lt option gt Arguments v m Default V Description Sets the message file format to verbose mo
22. The linker uses the paths in the environment variables GENPATH OBJPATH LIBPATH TEXTPATH and ABSPATH to determine where to look for files and write output files Default predefined sections are named data text stack copy rodatal rodata startData and init The order of commands in the parameter file does not matter However ensure that the SEGMENTS block is specified before the PLACEMENT block 4 3 2 Mandatory Parameter File Linker Commands User s Manual A linker parameter file always contains at least the LINK NAMES and PLACEMENT commands All other commands are optional This example shows the minimal parameter file LINK mini abs Name of resulting ABS file NAMES mini o startup o Files to link END STACKSIZE 0x20 in bytes PLACEMENT text INTO READ_ONLY 0xA00 TO OXxBFF data INTO READ_WRITE 0x800 TO Ox8FF END The first placement statement text INTO READ_ONLY OxA00 TO OxXxBFF reserves the address range from 0xA00 to OxBFF for allocation of read only objects hence the qualifier READ_ONLY The text section includes all linked MCUez Linker 44 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands functions constant variables string constants and initialization part
23. fo ok Keo w L A8Y a JANIZINON jenuen sasn 134U17 ZINIIN Freescale Semiconductor Inc For More Information On This Product Go to www freescale com Freescale Semiconductor Inc MCUEZLNK D Rev 1 MCUez Linker User s Manual AN MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual Important Notice to Users While every effort has been made to ensure the accuracy of all information in this document Motorola assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document its updates supplements or special editions whether such errors are omissions or statements resulting from negligence accident or any other cause Motorola further assumes no liability arising out of the application or use of any information product or system described herein nor any liability for incidental or consequential damages arising from the use of this document Motorola disclaims all warranties regarding the information contained herein whether expressed implied or statutory including implied warranties of merchantability or fitness for a particular purpose Motorola makes no representation that the interconnection of products in the manner described herein will not infringe on existing or future patent rights nor do the descriptions contained herein imply the granting or license
24. gt Used as a separator to refer to an object located in a section inside a LAYOUT or OBJECT_ALLOCATION block e Plus and minus and This may cause a problem when used as a filename suffix in the NAMES block Example NAMES file 1 o ERROR or gt not allowed in filename restric tion END or NAMES filel o file gt 2 1lib ERROR or gt not allowed in filename restric tion END Tip Change the filename and avoid the illegal characters MCUez Linker User s Manual MOTOROLA Linker Messages 115 For More Information On This Product Go to www freescale com Description User s Manual Type Example Tip Example Freescale Semiconductor Inc Linker Messages 6 3 12 L1008 Only Single Object Allowed at Absolute Address Error Multiple objects are placed at an absolute address in an OBJECT_ALLOCATION block Only single objects are allowed there OBJECT_ALLOCATI ON varl var2 RROR Only sin or OBJECT_ALLOCATI AT 0x0800 A gle object allowed at absolute address ON O E ND file o DATA AT 0x900 A RROR Only single object allowed at absolute address Specify the objects on separate lines OBJECT_ALLOCATI ON varl AT 0x0800 var2 AT 0x0802 END MCUez Linker 116 Linker Messages MOTOROLA For More Information On This Product Go to www freescale
25. modify the memory range and place it on the first 64 Kbytes of memory MCUez Linker 144 Linker Messages For More Information On This Product Go to www freescale com MOTOROLA Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 46 L1127 Object Allocated Outside of Segment Bounds HC12 Type Warning Description The application has been assembled or compiled in the small memory model and the memory area specified for a segment is not located on the first 64 Kbytes 0x0000 to OXFFFF Example x ERROR In small memory model code and data must be located on bank 0 LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x10810 TO 0x10AFF MY_STK READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip If memory above OxFFFF is required for the application the application must be assembled or compiled using the medium memory model If not modify the memory range and place it on the first 64 Kbytes of memory MCUez Linker User s Manual MOTOROLA Linker Messages 145 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 47 L1200
26. AAA o sends 95 Sale A AAA A Leena ees 95 5 2 13 WO PN AAA AAA AAA 95 Ste MAIN carrier rr 96 a 2 A ee eee ee eee ee wee ee eee 96 A AA 96 5 4 Setting Environment Variables in MCUez Shell 97 5 4 1 Pa VO shay ar ous boas AAA 97 3 3 Vatiable Disco c ioravo aprisa cierre 97 Jal A eek eed toate Gl waned OEE AS ees 98 5 3 2 OBJPATH eee eee ee eee eee ee ee ee re ee eee ee eee 99 IAI LIBFA AA EEE RAAT 99 5 5 4 ABSPATH o caridad ta EAE E EAA 100 he a PA 100 5 5 6 1 A 101 AF te e ere ere Ar ee ee 102 User s Manual MOTOROLA Environment Variables 89 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Environment Variables 5 2 Introduction This section describes environment variables used by the MCUez linker Environment variables are set in the Paths or Additional tab of the MCUez Shell New Configuration or Current Configuration dialog box Refer to the MCUez Installation and Configuration User s Manual Motorola document order number MCUEZINS D Environment variables that define paths such as GENPATH OBJPATH ABSPATH etc are used by the linker and other MCUez applications 5 3 Linker Options User s Manual The MCUez linker offers a number of options to control linker operation Options are composed of a hyphen followed by one or more letters or digits no spaces Anything not starting with a hyphen is assumed to be the name of a parameter file to be linked
27. Both STACKTOP and STACKSIZE Defined Type Error Description The STACKTOP and STACKSIZE commands are specified in the prm file This is not allowed because it generates ambiguity in defining the stack Example ERROR Both STACKTOP and STACKSIZE defined LINK fibo abs NAMES fibo o startup o END STACKTOP OXxBFE SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM END STACKSIZE 0x60 Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Remove either the STACKTOP or STACKSIZE command from the prm file User s Manual MCUez Linker 146 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 48 L1201 No Stack Defined Type Warning Description The parameter file does not contain a stack definition In that case it is the programmer s responsibility to initialize the stack pointer inside the application code The stack can be defined in the parameter file in one of three ways 1 Through the STACKTOP command 2 Through the STACKSIZE command 3 Through specification of the stack section in the placement block Example WARNING No stack defined LINK fibo abs NAMES fibo
28. Commands 4 4 8 3 Predefined Sections NOTE rodatal rodata COPy stack MCUez Linker When linking a high level language ANSI C or C application a couple of predefined section names can be grouped into sections named by the run time routines For instance e Sections for things besides variables and functions rodatal copy Stack e Sections for grouping large sets of objects data text e A section for placing objects initialized by the linker startData e A section to allocate read only variables rodata The sections dataand text provide default sections for allocating objects All string literals for example This is a string are allocated in section rodatal If this section is associated with a segment qualified as READ_WRITE the strings are copied from ROM to RAM at startup Any constant variable declared as const in a C module or as DC in an assembler module which is not allocated in a user defined section is allocated in section rodata Usually the rodata section is associated with the READ _ ONLY segment Initialization data belongs to section copy If a source file contains the declaration int all 1 2 3 the hex string 000100020003 six bytes which is copied to a location in RAM at program startup belongs to segment copy If the rodatal or rodata section is allocated to a READ_WRITE segment all strings or constants also belong to the
29. END STACKTOP OxBFE AMES fibo o star tup o END EAD WRITE 0x800 TO 0x80F EAD ONLY 0x810 TO OXxAFF EAD WRITE 0xB00 TO OxBFF INTO MY_ROM data stack INTO STK_1 Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Specify the stack section in a placement line where the stack alone is specified User s Manual MCUez Linker 152 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 53 L1206 Stack Overlaps with a Segment Which Appears in PLACEMENT Block Type Error Description The stack is defined through the command STACKTOP and the initial value is inside a segment which is used in the PLACEMENT block This is not allowed because the stack may overlap with allocated objects Example ERROR stack overlaps with a segment which appears the PLACEMENT block LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxXxBFF END PLACEMENT text INTO MY_ROM data INTO STK_1 END STACKTOP OxBFE Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Define the stack initial value outside all seg
30. L1003 Only a Single SEGMENTS or SECTIONS ERES MUA a AAA AA 113 LIOA lt Separator gt Expected cusoiovsrorardas rie 113 L1005 Fill Pattern Will Be Truncated gt OxFF 114 L10006 lt Token gt not ALOE cisinicrnasirs rr 114 L1007 lt Character gt not Allowed in Filename Restriction 115 L1008 Only Single Object Allowed at Absolute Address 116 L1009 Segment Name lt Segment Name gt Unknown 117 L1010 Section Name lt section name gt Unknown 118 L1011 Incompatible Segment Qualifier lt Qualifier1 gt in Previous Segment and lt Qualifier2 gt in lt Segment Name gt 119 L1012 Segment is not Aligned on a lt bytes gt Boundary 120 L1015 No Binary Input File Specified 2 4 lt 4262444 120 L1016 File lt Filename gt Found Twice in NAMES Block 121 L137 Linking of lt parameter file gt Failed 121 L1038 Success Executable File Written to lt absfile gt 121 L1039 Limited Version Too Many Objects or Code Linked 122 L1050 R nning lt versiontyp gt 62545 d 53 4ase eee RA 122 LWIS2 User Reguested ODA AAA AR ARA 122 L1100 Segments lt Segment1 Name gt and lt Segment2 Name gt Overlap sirs sisiseiredsiads tasak 123 L1102 Out of Allocation Space in Segment lt Segment Name gt at Address lt First Address Free gt ooooooooo o 124 L1103 lt Section Name gt not Specified im PLACEMENT Block os eadseeass ease
31. Linker Messages 6 3 14 L1010 Section Name lt section name gt Unknown Type Error Description The section name specified in a command in the OBJECT_ALLOCATION block was not previously specified in the PLACEMENT block lt section name gt name of unknown section Example LINK fibo abs NAMES fibo o startl2s o ansis lib END SEGMENTS MY RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OXAFF MY_STK READ_WRITE OxBOO TO OXxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END OBJECT_ALLOCATION fibo o DATA IN dataSec MA RROR Section Name dataSec unknown ND Set reset vector on _Startup ECTOR ADDRESS OxFFFE _Startup o le Tip Specify the section in the PLACEMENT block Example LINK fibo abs NAMES fibo o startl1l2s o ansis lib END SEGMENTS MY RAM READ_WRITE 0x800 TO 0x80F MY _ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXBFF END PLACEMENT text INTO MY_ROM data dataSec INTO MY_RAM stack INTO MY_STK END OBJECT_ALLOCATION fibo o DATA IN dataSec END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup User s Manual MCUez Linker 118 Linker Messages MOTOROLA For More Information On This Product Go to www
32. Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 39 L1119 Vector Allocated at Absolute Address lt Address gt Overlaps with Sections Placed in Segment lt Segment Name gt Type Error Description The specified vector is allocated inside a segment specified in the PLACEMENT block This is not allowed because the vector may overlap with objects defined in the sections A vector may be allocated inside a segment that does not appear in the PLACEMENT block Example ERROR Vector allocated at absolute address OXxFFFE overlaps with sections placed in segment ROM_2 LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF ROM_2 READ_ONLY OxFFOO TO OXxFFFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM Stack INTO MY_STK rodata INTO ROM_2 END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Tip Define the specified segment outside the vector table Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x800 TO 0x80F MY_ROM READ ONLY 0x810 TO OxAFF MY_STK READ WRITE OxBOO TO OXxBFF ROM_2 READ_ONLY 0xC00 TO OxCFF END PLACEMENT text
33. S record file extension is s e IfSRECORD S2 the extension is s2 e IfSRECORD S3 the extension is s3 e If SRECORD is not set the Motorola S record file extension is sx This file is written to the directory specified in the environment variable ABSPATH If the variable contains more than one path the S record file is written to the first directory specified If this variable is not set the S record file is written to the directory where the parameter file was found After a successful link session the linker generates a map file containing information about the link process Figure 3 1 This file is written to the directory specified in the environment variable TEXTPATH If the variable contains more than one path the map file is written to the first directory specified If this variable is not set the map file is written to the directory where the parameter file was found map files always get the extension map MCUez Linker 38 Files MOTOROLA For More Information On This Product Go to www freescale com MCUez Linker Freescale Semiconductor Inc Files Map Files 1 PROJECT DIR 1 PROJECT DIR z prm 2 GENPATH ib 2 OBJPATH abs 3 GENPATH LINKER ERRORFILE She 1 ABSPATH 1 TEXTPATH i E 2 PROJECT DIR 2 PROJECT DIR err txt Figure 3 1 Related Linker Files and Location User s Manual MOTOROLA Files For More Information On This Product Go to www freescale com 39
34. Warning 622544460444 eeeseseeu aaa 174 LIY ELF sdelil ANE sida ARA 175 L19360 ELF Output lt details gt ENO 2 4 cdwsc eese sess ddan dy 176 L1938 Type Clash in Segment Corrupt Object lt name gt 177 L4000 Could not Open Object File lt objFile gt NAMES Ligh so wh cd ped G ese ds Ces eee Rad wa 177 L4001 Link Parameter File lt PRMFile gt not Found bee User s Manual MOTOROLA Linker Messages 107 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 63 125 6 3 126 63 127 6 3 128 6 3 129 6 3 130 6 2 Introduction L4002 NAMES Section was not Found in Linker Parameter PUSS PROMESA 177 L4004 Linking lt PRM File gt as ELF DWARF Format Link Parameter Para AA A 178 L4005 Illegal File Format of Object File lt objFile gt A NAMES A 178 L4006 Failed to Create Temporary File 178 L4007 Include File Nesting too Deep W Link Parameter A 178 L4008 Include File lt includefile gt not Found 178 This chapter lists and defines all messages generated by the MCUez linker 6 3 Linker Messages Reference Four types of messages are generated by the linker 1 Information A message is displayed and linking continues Information messages do not interrupt linking and provide programming related information 2 Warning A message is displayed and linking continues Warning messages
35. all ini files in the project directory Select a configuration file to be loaded Select File Save Configuration to store the current settings in the project configuration file displayed on the window title bar Select File Save Configuration as to open a standard Save As dialog box and display a list of all ini files Specify the name and location of the configuration file to store the current settings Click OK Select File Configuration to specify an editor to be used for error feedback and additional information to be saved in the configuration file Click Save in the Save Configuration tab to instantly save settings in the EDITOR section of the project ini file See Figure 2 6 User s Manual MCUez Linker 28 Graphical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Linker Graphical User Interface Configuration Ea Editor Settings Save Configuration C Global Editor Shared by all Tools and all Projects A A AAA C Editor started with Command Line C Editor started with DDE Editor Name Moped Editor Executable je MCUE2 Prog Motpad EXE E Editor Arguments a z use f for the filename and I for the line number Cancel Help Figure 2 6 Configuration Dialog Box Some editors may contain modifiers The f modifier refers to the filename including path where an error has been
36. application error e An object specified ina VECTOR or VECTOR ADDRESS command is not found in the application error e No startup structure detected in the application warning e An object function or variable referenced in another object is not found in the application error e An object function or variable specified in the ENTRIES block is not found in the application error Example LINK SEGMENTS MY_RAM MY_ROM MY_STK END PLACEMENT text data stack END ERROR globInt not found fibo abs NAMES fibo o startup o END READ_ WRITE READ_ONLY READ_ WRITE rodata INTO INTO MY_RAM INTO MY_STK OBJECT_ALLOCATION Se VECT MCUez Linker globI nt AT 0xC02 E 0x800 TO Ox80F 0x810 TO OXxAFF E 0xB00 TO OxBFF MY_ ROM t reset vector on _Star OR ADDR tup ESS OxFFFE _Star tup User s Manual MOTOROLA Linker Messages For More Information On This Product Go to www freescale com 129 Freescale Semiconductor Inc Linker Messages Tips The missing object must be implemented in one of the modules building the application Ensure that path definitions are correct for OBJPATH and GENPATH and that the linker uses the last version of the object files Ensure that all binary files building the applica
37. com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 13 L1009 Segment Name lt Segment Name gt Unknown Type Error Description Segment specified in a PLACEMENT or LAYOUT command line was not previously defined in the SEGMENTS block lt segment name gt name of unknown segment Example LINK fibo abs NAMES fibo o startl2s o ansis lib END SEGMENTS MY_RAM READ WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OXBFF END PLACEMENT text INTO ROM_AREA ERROR Segment Name ROM_AREA unknown data INTO MY_RAM Stack INTO MY_STK END Set reset vector on _Startup ECTOR ADDRESS OxFFFE _Startup lt Tip Define the segment names in the SEGMENTS block Example LINK fibo abs NAMES fibo o startl1l2s o ansis lib END SEGMENTS RAM_AREA READ WRITE 0x800 TO Ox80F ROM_AREA READ ONLY 0x810 TO OxAFF STK_AREA READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO ROM_AREA data INTO RAM_AREA stack INTO STK_AREA END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup MCUez Linker User s Manual MOTOROLA Linker Messages 117 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc
38. detected The l modifier refers to the line number in the file that contains an error Check the MCUez Installation and Configuration User s Manual Motorola document order number MCUEZINS D to define the command line used to start an editor when an error occurs Error messages are listed in the linker window To open the editor double click on a line that refers to the file that contains an error CAUTION The 31 modifier can be used only with an editor that can be started with a line number as a parameter Editors such as WinEdit version 3 1 or lower and Notepad do not allow this modifier MCUez Linker User s Manual MOTOROLA Graphical User Interface GUI 29 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Configuration x Editor Settings Save Configuration ltems to Save Save MV Editor Configuration Save As IV Appearance Position Size Font I Save on Exit All marked items are saved Already contained not changed items remain valid Cancel Help Figure 2 7 Save Configuration Dialog Box The Save Configuration tab of the Configuration dialog is used to save all user defined settings to the project ini file Under Items to Save check the items to be saved and uncheck items to not be saved Options refers to settings specified in the Option Settings dialog box This dialog is accessed by the Linker Option
39. dialog are applied to information displayed in the content area e Select View Log Clear Log to clear the content area This menu consists of these selections Select Help Tip of the Day to display the tips dialog box Select Help Help Topics to open the help file Select Help About to display version information and the current working directory 2 3 5 Specifying the Input File The input file to be linked can be specified in several ways During the link session the options will be set according to the configuration set by the user in the Option Settings dialog box Before linking a file ensure that a project directory is associated with the linker 2 3 5 1 Using the Command Line User s Manual Linking a new file A new filename and additional linker options can be entered on the command line Click the Link or Enter buttons to link the specified file Linking a file that has already been linked Previously linked files can be displayed by selecting the arrow button on the right side of the command line Select a file and click the Link button MCUez Linker 34 Graphical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Linker Graphical User Interface 2 3 5 2 Using the Menu Entry File Link Select File Link to open a standard Open File dialog box Select an input file and cli
40. ensure that a vector table which has been defined as a constant table of function pointers or as a constant section is linked with the application ENTRIES myVarl myVar2 myProcl myProc2 END In this example the variables myVar1 and myVar2 and functions myProcl and myProc2 are specified to be additional entry points in the application User s Manual MOTOROLA Operating Procedures 79 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures 4 5 2 Mandatory Linking from All Objects Defined in a File The user can choose to link all objects defined in a specified object file Example ENTRIES myFilel o myFile2 o END In this example all objects functions variables constant variables or string constants defined in myFilel o and myFile2 o are specified as additional entry points in the application 4 5 3 Switching Off Smart Linking for the Application Switch smart linking off to link all objects in the application Example ENTRIES END In this example smart linking is switched off for the whole application All objects defined in one of the binary files that builds the application are linked with the application 4 5 4 Linking an Assembly Application The example shows how to link an application When an application consists only of assembly files the linker PRM file can be
41. errors in the directory tmp ERRORFILE sf err Writes all errors to a file with the same name as the source file but with extension err The error file is placed in the same directory as the source file For example if the file sources test prm is linked an error list file sources test err will be generated ERRORFILE dirl Sn err For a source file test prm an error list file dirI test err is generated ERRORFILE p errors txt For a source file dirl dir2 test prm an error list file dirl dir2 errors txt will be generated If ERRORFILE is not set errors are written to the default error file The default error file is determined by how the assembler is configured and started If a filename is provided on the assembler command line errors are written to the EDOUT file in the project directory If no filename is provided errors are written to the errtxt file Open the Current Configuration dialog box Select the Additional tab Enter the environment variable definition in the list box MCUez Linker 102 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker 6 1 Contents MCUez Linker 6 2 6 3 6 3 1 6 3 2 6 3 3 6 3 4 63 5 6 3 6 63 7 6 3 8 6 3 9 6 3 10 6 3 11 6 3 12 6 3 13 6 3 14 6 3 15 6 3 16 6 3 17 6 3 18 6 3 19 6 3 20 6 3 21 6 3 22 6 3 23 6 3 24 S
42. far dest _Copy typedef void _PFunc void typedef struct _PFunc startup address of startup desc _LibInit typedef struct _PFunc initFunc address of init function _Cpp MCUez Linker 84 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com MCUez Linker Freescale Semiconductor Inc Operating Procedures Program Startup extern struct _tagStartup unsigned short flags _PFunc main unsigned short stackOffset unsigned short nofZeroOuts _Range pZero0ut _Copy toCopyDownBeg unsigned short nofLibInits _Liblnit liblnits unsigned short nofInitBodies _PFunc initBodies _startupData The linker expects the _startupl the application Data variable to be declared somewhere in struct _tagStartup _startupData Fields of this struct are initialized by the linker and struct is allocated in ROM in the startData section If this variable is not declared the linker does not create a startup descriptor In this case there is no copy section and the stack is not initialized The fields have the following semantics flags Contains flags to detect special conditions at startup Currently two bits are used Table 4 8 Setting Startup Descriptor Flags Bit Number Set If There is no stack specification The application has been linked as a ROM library
43. instance address following the last address used Example In the following example assume the section data contains a character variable and a structure of five bytes Out of allocation space in segment MY_RAM at address 0x801 LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x803 MY_ROM READ ONLY 0x805 TO OxAFF MY_STK READ_WRITE OxBOO TO OXBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Tip Set the end address of the specified segment to a higher value User s Manual MCUez Linker 124 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 26 L1103 lt Section Name gt not Specified in PLACEMENT Block Type Description Example Tip NOTE MCUez Linker Error Indicates that a mandatory section is not specified in the PLACEMENT block Sections always specified in the PLACEMENT block are text and data A ERROR text not specified in the PLACEMENT block LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK REA
44. objects referenced in the absolute file 4 4 11 3 Initializing Vector Table in Assembly Source File Using an Absolute Section User s Manual Initializing the vector table in the assembly source file requires that all entries in the table be initialized Unused interrupts must be associated with a standard handler Labels or functions inserted in the vector table must be implemented in one of the assembly source files The vector table can be defined in an assembly source file in an additional section containing constant variables shown in the next example MCUez Linker 76 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands Example for HC12 XDEF ResetFunc Datasec SECTION Data DS W 5 Each interrupt increments element of table CodeSec SECTION Implementation of the interrupt functions IRQFunc LDAB 0 BRA int XIROFunc LDAB 2 BRA int SWIFunc LDAB 4 BRA int OpCodeFunc LDAB 6 BRA int ResetFunc LDAB 8 BRA entry DummyFunc RTI int LDX Data ABX INC 0 X RTI entry LDS AFE loop BRA loop ORG FFF2 Definition of vector table in absolute section starting at address SFFF2 IRQInt DC W IROFunc XIRQOInt DC W XIRQ
45. to make use or sell equipment constructed in accordance with this description The computer program contains material copyrighted by Motorola Inc first published in 1997 and may be used only under a license such as the License For Computer Programs Article 14 contained in Motorola s Terms and Conditions of Sale Rev 1 79 Trademarks This document includes these trademarks MCUez is a trademark of Motorola Inc Microsoft Windows is a registered trademark of Microsoft Corporation WinEdit is a trademark of Wilson WindowWare Motorola Inc and HIWARE AG 1999 All Rights Reserved User s Manual MCUez HC12 Linker 4 MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker List of Sections Section 1 General Information 19 Section 2 Graphical User Interface GU 23 SUCTION PIE cbr 37 Section 4 Operating Procedures 41 Section 5 Environment Variables 89 Section 6 Linker Messages 103 A reteceucdescesasseuueace 179 MCUez Linker User s Manual MOTOROLA List of Sections 5 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc List of Sections User s Manual MCUez Linker 6 List of Sections MOTOROLA For More Information On This Product Go to www freescale com Freescale Semicon
46. wes er deeb aes 0sseess bt ene ees ess 79 4 5 1 Mandatory Linking from an Object ooooooooooooo o 79 4 5 2 Mandatory Linking from All Objects Defined in a File 80 4 5 3 Switching Off Smart Linking for the Application 80 4 5 4 Linking an Assembly ApplicatioN oooooomoomoom 80 4 5 5 Ware Messages sescnoparori 9s 545446945545 448 25484 81 4 6 Programi IND id A A 84 4 6 1 Startup Descriptor AAA ede bbe Lead bas eres 84 4 6 2 User Defined Startup Stricture 214 6 cnceeeiaeeeneecaues 87 4 6 3 User Defined Startup Routines 200 00 coros eee 88 User s Manual MCUez Linker 8 Table of Contents MOTOROLA For More Information On This Product Go to www freescale com MCUez Linker Freescale Semiconductor Inc Table of Contents Section 5 Environment Variables 5 1 CAN raid ad 89 A o Ao 90 da LIE IDU or AAA A 90 ll A A EE ee ene ea 91 53 2 OF A 91 ss e I EA EAS EA TAE E TERET EI TATEA ENA T ET 92 5 3 4 O A AN E ET 92 53 5 Arcen Gree ett teair e 8 6084425004 bee eee Eases 92 5 3 6 ENGRACIA ADA RNA 93 IAT E EEN ee ee ee eee eee ee TETEE LEATA EEEE 93 5 3 8 oY a E E A E E E 94 5 39 Sh Oe eee E ee a AA 94 O fee ee ee ee eee eee ee ee ere ree ee ree 94 o ee ear TEE EE gee ee eee E ee re 95 ore ka EU eee eae cee eee ae te ee tre ges eee eee eee ae 95 5 4 13 OW WISE PVE PA 95 Skee A eee SREO ERIRE 96 Sack A o A dense base ke saounsepas A 96 10 e o RSS oN N ee oe PETERT Sees 96 5 4
47. 0 TO 0x08FF MY_RAM READ_WRITE 0x0B00 TO 0x0CFF END PLACEMENT data INTO MY_RAM text INTO MY_ROM END INIT ResetFunc VECTOR ADDRESS OxFFF2 IRQFunc VECTOR ADDRESS OxFFF4 XIRQFunc VECTOR ADDRESS OxFFF6 SWIFunc VECTOR ADDRESS OxFFF8 OpCodeFunc VECTOR ADDRESS OxFFFE ResetFunc MCUez Linker User s Manual MOTOROLA Operating Procedures 73 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures NOTE The statement INIT Reset Func defines the application entry point Usually this entry point is initialized with the same address as the reset vector The statement VECTOR ADDRESS OXFFF2 IRQFunc specifies that the address of function TROFunc should be written at address OxFFF2 4 4 11 2 Initializing Vector Table in Assembly Source File Using a Relocatable Section Initializing the vector table in the assembly source file requires that all entries in the table be initialized Unused interrupts must be associated with a standard handler The labels or functions inserted in the vector table must be implemented in one of the assembler source files The vector table can be defined in an assembly source file in an additional section containing constant variables Example for HC12 XDEF ResetFunc DataSec SECTION Data DS W 5 Each interrupt increments element CodeSec SECTION Implementation of the interrupt f
48. 00 TO 0x18FF ROM_1 READ_ONLY 0x8000 TO Ox8FFF ROM_2 READ_ONLY 0xA000 TO OXAFFF END PLACEMENT text INTO ROM_1 ROM_2 END In the previous example objects from section text are allocated first in segment ROM_1 and continue in section ROM_2 A statement inside the PLACEMENT block can be split over several lines and terminated with a semicolon The SEGMENTS block must always be defined before the PLACEMENT block because segments referenced in the PLACEMENT block must be defined previously in the SEGMENTS block Some restrictions apply to commands specified in the PLACEMENT block The copy section should be the last section in the section list to be specified in the PLACEMENT block When the stack section is specified in the PLACEMENT block along with other sections an additional STACKSIZE command is required in the PRM file Predefined sections text and data must always be specified in the PLACEMENT block They are used to retrieve the default placement for code or variable sections All code or constant sections which do not appear in the PLACEMENT block are allocated in the same segment list as the text section All variable sections which do not appear in the PLACEMENT block are allocated in the same segment list as the data section MCUez Linker 62 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating
49. 0A00 TO OxOBEF END PLACEMENT data INTO MY_RAM text INTO MY_ROM END INIT ResetFunc ENTRIES 2 END The statement ENTRY END switches smart linking off If this statement is missing in the prm file the vector table will not be linked with the application because itis never referenced The smart linker only links referenced objects in the absolute file MCUez Linker 78 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com 4 5 Smart Linking Freescale Semiconductor Inc Operating Procedures Smart Linking Smart linking links referenced objects with the application Application entry points are e The application init function e The functions or constants located in an absolute section section defined with ORG in the assembly source file e The function specified ina VECTOR command All previously listed entry points and the objects they referenced are automatically linked with the application The user can specify additional entry points using the ENTRIES command in the PRM file 4 5 1 Mandatory Linking from an Object Example MCUez Linker The user can choose to link non referenced objects in an application This may be useful to ensure that a software version number is linked with the application and stored in the final product EPROM This may also be useful to
50. 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF ROM_2 READ_ONLY 0x500 TO OxX7FF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE Startup 6 3 36 L1114 lt Section Name gt Section Has Segment Type lt Segment Qualifier gt Initialization Problem Type Warning Description The specified section is loaded in a segment that has been defined with the qualifier NO_INIT or PAGED This may generate a problem because the section contains some initialized constants which will not be initialized at application startup This message is generated when e The section rodata is placed in a NO_INIT or PAGED segment e The section rodatal is placed in a NO_INIT or PAGED segment MCUez Linker User s Manual MOTOROLA Linker Messages 135 For More Information On This Product Go to www freescale com Example Tip Example User s Manual Freescale Semiconductor Inc Linker Messages A WARNING The rodata section has segment type NO_INIT initialization problem LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO MY ROM READ_ONLY 0x810 TO MY_STK READ _WRITE 0xB00 TO RAM_2 NO_INIT 0x500 TO END PLACEMENT text INTO MY_ROM data INTO MY_RAM Stack INTO MY_STK rodata INT
51. 108 Motorola S File ooooooooro ooo o o 38 N NAMES errei paca ed Bie O GaSe Ne 44 52 NO INTS aa id das 35 O O OPHION eiiaoe meg cowed ened este yet ona A sy a E EN 93 Object File cocuberusini nsida reta ti taitin ea Ka dara dl db 32 OBJIPA TH A A eo 44 52 Option O E aye os ieee 91 O ea os Se 92 Oo 5h SS hee O wh Rew nd ade shes 93 ies 93 MCUez Linker User s Manual MOTOROLA Index 181 For More Information On This Product Go to www freescale com User s Manual Freescale Semiconductor Inc AY Hee dacewnbelsueied eats E E EE EE EE 91 94 Waa eh oa ES A ee N nda 94 Weeds darla ds bisa bese ensue eed ae ae 94 95 96 UNDG ood 2 eaaa 28 oe end a eee dea tendo dee as eee ane dae es 31 P PAGED veia ad E E E E a rd cd a radica tdi 55 Parameter Fil Linker AA O 37 42 Parametet Miley us ri rela tdi das E aae n Ei 37 Path List onda see ae Ba a kale Deed Bae THe cele Pa RA eee oes 97 PLACEMEN Dinso0 250 A can See eee eae 44 61 66 Program Startup also see Startup 2 0 0 cece eee eee 84 Q QUGNNGE sica AAA 33 39 NO INIT abuso rara OS Ea Owe bed ARAT da E 55 PAGED An 55 READ ONLY ii esse soe ssa ds DA Robe eee tae 55 READ WRITE Girardi rele eae 55 R READ ONLY een orar ie dy ken tuy tes ees a ae READ WRITE c bcnsteentacawnsd kacade Paes et eee nea eee kee ok as 55 S oo Orar EEE q Section CODY lt a e E a a E a G E E 65 85 Gab ais arrer tind chiara aneirin a Share a a E a deere EGA 65 66 Ara de da
52. 1902 lt Cmd gt Command not Supported Type Error Description There are command keywords in the linker parameter file that are not yet implemented Tip Only use commands specified in the linker manual MCUez Linker User s Manual MOTOROLA Linker Messages 169 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 98 L1903 Unexpected Symbol in Link Parameter File Description Type Tip Error Syntax error in linker parameter file An illegal character appeared Ensure that the linker parameter file is specified as the file argument on the command line and not an executable file If the file is a link parameter file edit it and replace the invalid character or symbol 6 3 99 L1905 Invalid Section Attribute for Program Header Description Type Tip Error Illegal object file Recompile source files Contact a Motorola representative if error continues to appear 6 3 100 L1906 Fixup Out of Buffer lt Obj gt Referenced at Offset lt Address gt Description Type Tip Error An illegal relocation of an object is detected in the object file lt Object gt at address lt Address gt Check the relocation at that address The offset may be out of range for this relocation type If not it may be caused by a corrupt object file 6 3 101 L1907 Fixup Overflow in lt Object gt Type lt objType gt at Offset lt Address gt
53. 2 04 224 scence dado rra tee os 84 Assembly is js 21222 dondebecqescepeesoedeh stew den ee tea 47 80 Smart LINKINE visitadores hee daa eas ea ne 81 C Command ENTRIES 2cc eveseucotseuees teeter cetetecnseeresceds 45 79 80 MN ec eee neat aes eet resets bem see come eset aut 47 91 LINK 2 ioceedeottersntcivecsebeiSesthttasndesbecisessaees 47 93 MAIN eisai a ea aa o a Mies Jae Rae RA Da 49 MAPFILE spore apd atne ea Eae a E OAS DERE SRS 49 92 NAMED 2er eV aia ended sees awe ee 44 52 PLACEMEN TD ct cena eds teers eet eens eeu eens ed eo ees 2 44 61 66 SEGMENTIS 462536 s3cnu Geer see ee Sud rios 44 53 User s Manual MOTOROLA Index For More Information On This Product Go to www freescale com 179 Freescale Semiconductor Inc STACK SIZE cocaina tata 68 STACKTOP reaa gos foe lee oa See daa a 69 VECTOR 000 sus daa a as as dentro ea ed ae Mee Da 70 D Drag and Drops cst iae ateceuseeceds barda era aa 35 E E OPIO a2 bevidides ee a dd 91 ENTRIES uc da 45 79 80 Environment Variable ABSPATH c048os eeeeey innota r EL se SEE ROSE SRS EES 38 44 47 100 ERRORFILE ose cece tet peed a win ae had ada 102 GENPA TED coord nad 37 44 52 98 99 LINKPTIONS ratere na td BS Baa etn 90 OBIPA TH oc a east a eee a ae Meat aah 44 52 99 SRECORD 0 6 o6 e054 sow ain dt oe a E ed 38 101 TEXTPATH sees eek enced ta tia 38 44 48 100 Error feedback 0 0 0 0 cece eee ce eee ence eee EEEn EEE EErEE 35 F File
54. 20 View Men ra aaiae anea aaa Pad BY e a ee 34 WwW SW INODORO ia 94 WA OPUOR rara rd 94 95 96 WIDdOW citar aed Ghee e a eral Gd bi ane 25 MCUez Linker User s Manual MOTOROLA Index 183 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker 184 Index MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc For More Information On This Product Go to www freescale com Technical support for MCUez development tools is available through your regional Motorola office or by contacting Motorola Inc 6501 William Cannon Drive West MD 0E17 Austin Texas 78735 Phone 800 521 6274 Fax 602 437 1858 CRC CRC email sps mot com Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any prod uct or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each cus
55. 3 Out of Memory in lt Function Name gt 166 L1804 No ELF Section Header Table Found in lt Filename gt 166 L1806 ELF File lt Filename gt Appears to be Corrupted 167 MCUez Linker 12 Table of Contents MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 6 3 87 6 3 88 6 3 89 6 3 90 6 3 91 6 3 92 6 3 93 6 3 94 6 3 95 6 3 96 6 3 97 6 3 98 6 3 99 6 3 100 6 3 101 6 3 102 6 3 103 6 3 104 6 3 105 6 3 106 6 3 107 6 3 108 6 3 109 6 3 110 MCUez Linker Table of Contents L1808 String Overflow in lt Function Name gt Lonac Vend errno bed obiieuecovasewes e bi tances 167 L1809 Section lt Section Name gt Located in a Segment with Invalid AINE v4 55 oy da dee KS SR eas 167 L1811 Symbol lt Symbol Number gt lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt 167 L1818 Symbol lt Symbol Number gt lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt 168 L1820 Weak Symbol lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt 168 L1821 Symbol lt id1 gt Conflicts with lt id2 gt in File lt File gt SAME CONE 44 0004 a ee 48 ede deere eas ERS 168 L1822 Symbol lt Symbol Name gt in File lt Filename gt a A 949SSS695 SR 00S Ko ee Hoe es 168 L1823 External Object lt Symbol
56. 560 34 2d Using the Menu Entry File Link ocooomoocirrommmocnos 35 Ae Te Using Drag and AA 35 236 Error Feedba sr A A AR 33 The MCUez linker is a Microsoft Windows compatible application that uses a standard graphical user interface GUI This section describes e The MCUez linker graphical user interface How to start the linker User s Manual MOTOROLA Graphical User Interface GUI 23 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI 2 3 Linker Graphical User Interface User s Manual Click the ezLink icon on the MCUez Shell toolbar to run the linker see Figure 2 1 MCUez Shell al xX ce eL eL ca mcu ASM DEBUG LINK Figure 2 1 MCUez Shell When the linker is started a standard Tip of the Day window see Figure 2 2 containing features about the linker is displayed Tip of the Day x Y D id yo u kn ow Vv You can also link a file by simply dragging it from the file manager or explorer to the linker window M Show Tips on StartUp Figure 2 2 MCUez Linker Tip of the Day Window Click Next Tip to view more information about the linker Click Close to close the Tip of the Day dialog To disable the tips window when the linker is started uncheck Show Tips on StartUp Select Help Tip of the Day then check Show Tips on StartUp to re enable the tips window MCUez Linker 24 Graph
57. ACKSIZE 0x60 In the previous example the section stack is allocated from address OxB5F down to address OxB00 The stack initial value is set to OxXBSE In an assembly application the stack pointer must be initialized in the source code Defining the stack in the prm file only ensures no overlap between the stack and the code or data sections in the application 4 4 10 STACKTOP Define Stack Pointer Initial Value Syntax Description Example MCUez Linker STACKTOP Number The STACKTOP command is optional in a PRM file Additionally the user cannot specify both STACKTOP and STACKSIZE commands in a PRM file The STACKTOP command defines the initial value for the stack pointer If STACKTOP is defined as STACKTOP OxBFF the stack pointer will be initialized with OxBF F at application startup User s Manual MOTOROLA Operating Procedures 69 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Example When the stack is defined by a STACKTOP command alone a default size is assigned to the stack This size depends on the processor and is big enough to store the target processor PC When the stack is defined by a STACKTOP command associated with the placement of the stack section the stack should start at the specified address It is defined down to the start address of the segment where stack has been placed
58. ATH The map file consists of up to nine sections Table 4 2 lists and defines each section The MAPF ILE command is optional and controls generation of the map file MAPFILE ALL is the default The ALL option creates a map file that contains all sections which provide link time information Table 4 3 lists all command options and information generated by each one A map file is not created if objects are not found in an object file and the linking process fails User s Manual MOTOROLA Operating Procedures 49 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Table 4 2 Map File Sections Section Description TARGET This section names the target processor and memory model This section lists the names of all files from which objects were used or referenced FILE during the link process In most cases these are the same names listed in the linker parameter file between the keywords NAMES and END This section lists the prestart code and the values used to initialize the startup STARTUP descriptor _startupData The startup descriptor is listed member by member with the initialization data at the right hand side of the member name This section lists segments in which at least one object was allocated At the right SEGMENT ALLOCATION hand side of the segment name is a pair of numbers which gives the address range the objects belonging to the segm
59. D_WRITE 0xB00 TO OXxBFF END PLACEMENT init rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Insert the missing section in the PLACEMENT block The section DEFAULT_RAM is a synonym for data and DEFAULT_ROM is a synonym for text These two section names have been defined for compatibility with previous versions of the linker User s Manual MOTOROLA Linker Messages 125 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 27 L1104 Absolute Object lt Object Name gt Overlaps with Segment lt Segment Name gt Type Error Description An absolute object overlaps with a segment This is not allowed because this may cause multiple objects to be allocated at the same address Example dl ERROR Absolute object glob MY_RAM LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x8 MY_ROM READ_ONLY 0x8 MY_STK READ_WRITE 0xB END PLACEMENT text rodata INTO data INTO MY_RAM stack INTO MY_STK END OBJECT_ALLOCATION fiboCount AT 0x802 END Set reset vector on _Sta VECTOR ADDRESS OxFFFE _Star Tip Move the object to a free address Examp
60. EA at address 0x300 e The data section dataSec2 defined in the assembly input file is allocated next to the section dataSec1 at address 0x302 e The code section codeSec defined in the assembly input file is allocated in the segment ROM_AREA at address 0x8000 MCUez Linker User s Manual MOTOROLA Operating Procedures 83 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures 4 6 Program Startup This section deals with advanced material and is relevant only for high level language ANSI C or C applications First time users of MCUez may skip this section Standard startup modules are delivered with the MCUez programs and examples Include startup modules to link the parameter file For more information about startup modules see the file startup txt in the LIB subdirectory Prior to calling root function main e Initialize the processor registers Zero out memory e Copy initialization data from ROM to RAM Depending on the processor and application different startup routines may be necessary In MCUez there are standard startup routines for every processor and memory model Startup routines are based on a startup descriptor containing all information 4 6 1 Startup Descriptor User s Manual The linker startup descriptor is declared as typedef struct unsigned char far beg int size _Range typedef struct int size unsigned char
61. EAD_ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup MCUez Linker User s Manual MOTOROLA Linker Messages 143 For More Information On This Pr oduct Go to www freescale com Type Description Example User s Manual Tip Freescale Semiconductor Inc Linker Messages 6 3 45 L1125 In Small Memory Model Code and Data Must Be Located on Bank 0 Error The application has been assembled or compiled in a small memory model and the memory area specified for a segment is not located on the first 64 Kbytes O END vs H j D 1 E H K J E 0x800 0x10810 E Ox BOO INTO INTO MY_ MY_ 0x0000 to OxFFFF ERROR In small memory model located on bank 0 LINK fibo abs NAMES fibo o startup SEGMENTS MY_RAM READ MY_ROM READ_O MY_STK READ_WI END PLACEMENT text data Stack END INTO MY EM Stare up code and data must be TO Ox80F TO Ox TO Ox10AFF ROM RAM _ST K Set reset vector on _Startup VECTOR ADDRESS OxFFF BFF If memory higher than OxFFFF is required for the application the application must be assembled or compiled using the banked memory model If no memory above OxFFFF is required
62. FE _Startup Tip Move the section copy to the last position in the section list or define it on a separate PLACEMENT line in a separate segment Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OxBFF ROM_2 READ_ONLY 0xC00 TO OxDFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM Stack INTO MY_STK copy INTO ROM_2 END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup MCUez Linker User s Manual MOTOROLA Linker Messages 141 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 43 L1123 Invalid Range Defined for Segment lt Segment Name gt End Address Must Be Bigger Than Start Address Type Description User s Manual Example Tip Error The memory range specified in the segment definition is not valid The segment end address is smaller than the segment start address LINK fibo abs NAMES fibo o startup o END SEGMENTS Ai ERROR Invalid range MY_RAM READ_WRITE 0x800 TO 0x7FF A defined for segment MY_RAM End address must be bigger than start address MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF
63. File 157 L1401 Incompatible Memory Model lt Memory Model Name gt in Previous Files and lt Memory Model Name gt in Current File 157 L1403 Unknown Processor lt Processor Constant gt 158 L1404 Unknown Memory Model lt Memory Model Constant csnsrirrrardicnshacrbaset 158 L1501 lt Symbol Name gt Cannot be Moved in Section lt Section Name gt Invalid Qualifier Segment als ripear 159 L1502 lt Object Name gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt oooooooooo ooo 160 L1503 lt Object Name gt from file lt Filename gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt 161 User s Manual MOTOROLA Linker Messages 105 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 68 L1504 lt Object Name gt from section lt Section Name gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt 162 6 3 69 L1600 Main Function Detected in ROM Library 163 6 3 70 L1601 Startup Function Detected in ROM Library 163 6 3 71 L1620 Bad Digit in Binary Number 163 6 3 72 11621 Bad Digit in Octal Number ooomosirosonas reses 163 6 3 73 11622 Bad Digit in Decimal N mbeT sovomccrn
64. IC Motorola Semiconductors H K Ltd Silicon Harbour Centre 2 Dal King Street Tai Po Industrial Estate Tai Po New Territories Hong Kong 852 26668334 Mfax Motorola Fax Back System RMFAX0 email sps mot com http sps motorola com mfax TOUCHTONE 1 602 244 860 US amp Canada ONLY 1 800 774 1848 HOME PAGE http motorola com sps Mfax is a trademark of Motorola Inc AA MOTOROLA Semiconductor Products Sector Juj AOJONPUODIWIIS 3989914
65. INTO MY_ROM data INTO MY_RAM stack INTO MY_STK rodata INTO ROM_2 Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup MCUez Linker User s Manual MOTOROLA Linker Messages 139 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 40 L1120 Vector Allocated at Absolute Address lt Address gt Placed in Segment lt Segment Name gt Which Has No READ_ONLY Qualifier Type Description Example Tip Error The specified vector is defined inside a segment not defined with the qualifier READ_ONLY The vector table should be initialized at application load time during the debug phase It should be burned into the EPROM when application development is terminated For this reason the vector table must always be located in a READ_ONLY memory area Le ERROR Vector allocated at absolute address OxFFFE placed in segment RAM_2 which has not READ_ONLY qual ifier LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF RAM_2 READ_WRITE OxFFOO TO OXxFFFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup ECTOR ADDRESS OxFFFE _Startup lt
66. L lt HexByte gt lt HexByte gt Example SEGMENTS ROM_1 READ_ONLY 0x800 TO Ox8FF FILL OxAA 0x55 END In the previous example fill bytes are initialized with the pattern OxAA55 If the size of an object to be initialized is higher than the size of the specified pattern the pattern is repeated as many times as required to fill the objects In the previous example an object of four bytes will be initialized with OxAASSAASS If the size of an object to be initialized is smaller than the size of the specified pattern the pattern is truncated to match the size of the object In the previous example an object of one byte will be initialized with OxAA When the value specified in an element of a fill pattern does not fit in a byte it is truncated to a byte value Example SEGMENTS ROM_1 READ_ONLY 0x800 TO Ox8FF FILL OxAA55 END MCUez Linker User s Manual MOTOROLA Operating Procedures 59 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures In the previous example fill bytes are initialized with the pattern 0x55 The specified fill pattern is truncated to a 1 byte value Fill patterns provide an initial value to the padding bytes inserted between two objects during object allocation This marks the unused position with a specific marker and can be detected inside the application For example an unused position inside a code section can be initialized with the hexadecimal c
67. Library Type Warning Description An application entry point has been detected in a ROM library An application entry point is not required in a ROM library Tips e Remove the INIT command from the parameter file e If the application contains a _Startup function rename it 6 3 71 L1620 Bad Digit in Binary Number Type Error Description Syntax error Illegal character in a binary number 6 3 72 L1621 Bad Digit in Octal Number Type Error Description Syntax error Illegal character in an octal number 6 3 73 L1622 Bad Digit in Decimal Number Type Error Description Syntax error Illegal character in a decimal number MCUez Linker User s Manual MOTOROLA Linker Messages 163 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 74 L1623 Number too Big Type Description Tip Error Syntax error An identifier in the linker parameter file is limited to a length of 31 characters Reduce the length of the identifier 6 3 75 L1624 Ident too Long Cut after 31 Characters Type Description Tip Error Syntax error An identifier in the linker parameter file is limited to a length of 31 characters The identifier string is truncated after 31 characters Reduce the length of the identifier 6 3 76 L1625 Comment not Closed Type Description Tip Error An ANSI C comment
68. M_AREA END PLACEMENT data INTO text INTO i 2 i 2 END STACKSIZE 0x50 EAD_WRITE 0x00000 TO Ox0O7FFF EAD_ONLY 0x08000 TO OXOFFFF RAM_AREA ROM_AREA User s Manual MOTOROLA Operating Procedures For More Information On This Product Go to www freescale com 53 Freescale Semiconductor Inc Operating Procedures Example Using the banked memory model a segment can be defined for the RAM area another for the non banked ROM area and one for each target processor bank LINK test abs NAMES test o startup o END SEGMENTS RAM_AREA READ_WRITE 0x00000 TO OXO7FFF NON_BANKED_AREA READ_ONLY 0x0C000 TO OxOFFFF BANKO_AREA READ_ONLY 0x08000 TO OXOBFFF BANK1_AREA READ_ONLY 0x18000 TO Ox1BFFF BANK2_AREA READ_ONLY 0x28000 TO Ox2BFFF END PLACEMENT data INTO RAM_AREA init startData rodatal NON_BANKED copy INTO NON_BANKED_AREA text INTO BANKO_AREA BANK1_AREA BANK2_AREA END STACKSIZE 0x50 A physical segment may be split into several virtual segments allowing a better structuring of object allocation and taking advantage of processor properties Example In the small memory model the user can define a segment for the direct page area another fo
69. Manual MCUez Linker 166 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 86 L1806 ELF File lt Filename gt Appears to be Corrupted Type Error Description The specified binary file is not a valid ELF binary file Tips e Ensure that the correct binary file is used e Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory 6 3 87 L1808 String Overflow in lt Function Name gt Contact Vendor Type Error Description A section name detected in a section table is longer than 100 characters Tip Ensure all section names are smaller than 100 characters 6 3 88 L1809 Section lt Section Name gt Located in a Segment with Invalid Qualifier Type Error Description Attributes associated with a section and used in several binary files are not compatible In one file the section contains variables in the other it contains constants variables or code Tip Check usage of the different sections in all binary files A specific section should contain the same type of information throughout the project 6 3 89 L1811 Symbol lt Symbol Numbers lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt Type Error Description The specified global symbol is defined
70. Name gt in lt Filename gt Created by Default 6 idska ccuwesed cen keseb Ni 169 L1824 Invalid Mark Type for lt Ident gt 169 L1826 Can t Read File lt Filename gt is not an ELF Library Containing ELF Objects ELF Objects Expected 169 L1902 lt Cmd gt Command not Supported 169 L1903 Unexpected Symbol in Link Parameter File 170 L1905 Invalid Section Attribute for Program Header 170 L1906 Fixup Out of Buffer lt Obj gt Referenced at Offset Address inem dd a idad 170 L1907 Fixup Overflow in lt Object gt Type lt objType gt a MAA teh eda ewe R EEA 170 L1908 Fixup Error in lt Object gt Type lt objType gt at Offset SACO sorpass eek e s he hides on ee osnee ews 171 L1910 Invalid Section Attribute for Program Header 171 L1911 Program Header End is not Aligned on the End ne EE E E E es i71 L1912 Object lt obj gt Overlaps with Another last addr lt addr gt Object Address lt objadr gt 171 L1913 Object Filler Overlaps with Something Else 171 L1914 Invalid Object Olbleci sicionisocion idad ra 172 L1915 Gap in lt Ident gt at lt address gt efore ayer is t00 BiZ ir ARA 172 L1916 Section Name lt Section gt is too Long Name is Cut to 90 Characters Length 172 L1919 Duplicate Definition of lt Object gt in Library File s lt File1 gt and or lt File2 gt Discarded 172 User s Man
71. Number gt lt alignment gt defaultAlignment is used to specify the alignment factor for objects that are not specified by a condition in the alignment list in Table 4 6 If no alignment list is specified the default alignment factor applies to all objects allocated in the segment The default alignment factor is optional The specified alignment applies to each object inside the segment MCUez Linker User s Manual MOTOROLA Operating Procedures 57 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Table 4 6 Segment Alignment Items List Notation Meaning lt size gt lt align gt Size is equal to lt size gt Size is bigger or equal to lt sz1 gt lt sz1 gt to lt sz2 gt lt align gt gn gt and smaller or equal to lt sz2 gt lt lt size gt lt align gt Size is smaller than lt size gt lt lt size gt lt align gt Size is smaller or equal to lt size gt gt lt size gt lt align gt Size is bigger than lt size gt gt lt size gt lt align gt Size is bigger or equal to lt size gt Example SEGMENTS RAM_1 READ_WRITE 0x800 TO Ox8FF ALIGN 2 1 1 RAM_2 READ_WRITE 0x900 TO Ox9FF ALIGN 2 TO 3 2 gt 4 4 RAM_3 READ_WRITE 0xA00 TO OxAFF ALIGN 1 gt 2 2 END In the previous example e Inside segment RAM_1 all objects with s
72. O 5 3 7 S MCUez Linker NOTE Freescale Semiconductor Inc O Syntax Arguments Default Description Example See also S Syntax Arguments Default Description Example See also Environment Variables Linker Options Define absolute filename lt parameter file gt lt option gt lt FileName gt lt FileName gt Name of absolute file None This option defines the name of the abs file to be generated test prm Otest abs Similarly the user can use the command LINK test abs in the prm file 4 4 3 LINK Specify Name of Output File Do not generate DWARF information lt parameter file gt lt option gt None None This option excludes DWARF sections from being generated in the absolute file This will reduce the amount of memory used on the PC test prm S None If the absolute file does not contain DWARF information the file cannot be debugged User s Manual MOTOROLA Environment Variables 93 For More Information On This Product Go to www freescale com 5 3 8 V 5 3 9 W1 5 3 10 W2 User s Manual Freescale Semiconductor Inc V Syntax Arguments Default Description Example See also W1 Syntax Arguments Default Description Example See also W2 Syntax Arguments Default Description Example See also Environment Variables Prints the linker version lt option gt None
73. O RAM_2 END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Ox80F OxAFF OxBFF Ox7FF Place the specified section in a segment defined with the READ_ONLY or READ_WRITE qualifier LINK fibo abs NAMES fibo o startup o END SEGMENTS MY RAM READ WRITE 0x800 TO 0x80F MY_ROM READ ONLY 0x810 TO OxAFF MY _ STK READ WRITE OxBOO TO OXxBFF RAM_2 NO_INIT 0x500 TO Ox7FF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK rodata INTO MY_ROM END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup MCUez Linker 136 Linker Messages For More Information On This Product Go to www freescale com MOTOROLA Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 37 L1115 Function lt Function Name gt not Found Type Error Warning Description The specified function is not found in the application This message is generated when e No main function is available in the application This function is not required for an assembly application For ANSI C applications if no main function is available the programmer must ensure that application startup is performed correctly Usually the main function is called main but a personal main function can be defined using the linker command MAIN e No
74. OFunc SWIInt DC W SWIFunc OpCodeInt DC W OpCodeFunc COPResetInt DC W DummyFunc No function attached to COP Reset ClMonResInt DC W DummyFunc No function attached to Clock MonitorReset ResetInt DC W ResetFunc MCUez Linker User s Manual MOTOROLA Operating Procedures For More Information On This Product Go to www freescale com 77 Freescale Semiconductor Inc Operating Procedures NOTE Example NOTE User s Manual Each constant in the section VectorTab1e is defined as a word 2 byte constant because the entry in the HC12 vector table is 16 bits wide In the previous example the constant TRQInt is initialized with the address of the label TROFUNC In the previous example the constant XIRQInt is initialized with the address of the label XTRQF unc All labels specified as an initialization value must be defined published using XDEF or imported using XREF before the vector table section Forward referencing is not allowed in the DC directive The statement ORG SFFF2 specifies that the following section must start at address F FF2 When developing a banked application ensure that interrupt functions are located in the non banked memory area The section should now be placed at the expected address This is performed in the linker parameter file shown in the next example LINK test abs NAMES test o END SEGMENTS MY_ROM READ_ONLY 0x0800 TO 0x08FF MY_RAM READ_WRITE 0x
75. OR lt Number gt is only valid when the vector table starts at address 0x0000 The address where the vector is allocated is evaluated as lt Number gt lt Size of a Function Pointer gt The syntax VECTOR ADDRESS is valid in any case The size of entries in the vector table depends on the target processor The vector target can be specified e Asa function name e As an absolute address Different syntaxes are available for the VECTOR command Table 4 7 VECTOR Command Syntax Command Meaning VECTOR ADDRESS Indicates that the value 0x1000 must be stored at address OxFFFE 0x1000 OxFFFE VECTOR ADDRESS Indicates that the address of the function name FName OxFFFE FName must be stored at address OxFFFE Indicates that the address of the function FName incremented by 2 must be stored at address OxFFFE This syntax may be useful when working with a common interrupt service routine VECTOR ADDRESS OxFFFE FName 2 Example VECTOR ADDRESS OXFFFE _Startup VECTOR ADDRESS OxFFFC 0x400 VECTOR 0 _Startup VECTOR 1 OxA0O In the previous example if the size of a function pointer is coded on two bytes e The vector located at address OXFFFE is initialized with the address of the function _Startup e The vector located at address OXFFFC is initialized with the absolute address OxA0O0 e Vector number 0 located at address 0x000 is initialized with the address of the function Startup e Vector number 1
76. OXAFF MY_STK READ _WRITE 0xB00 TO OxXxBFF PLACEMENT Ttext INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Tip Insert missing command in the PRM file LINK fibo abs NAMES fibo o startl1l2s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXxBFF PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup User s Manual MCUez Linker 110 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 5 L1001 lt Command Name gt Multiply Defined Type Error Description This message is generated when a linker command is detected more than once in the parameter file These linker commands cannot be specified more than once in a parameter file e LINK Contains the name of the absolute file to generate e NAMES Lists files building the application e SEGMENTS Associates a name with a memory area e PLACEMENT Sections are assigned to a memory range ENTRIES Lists objects linked with the application MAPFILE Specifies information to be stored in the m
77. Ox80F MY _ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXBFF END SECTIONS MY_RAM READ_WRITE 0x800 TO 0x80F MY _ROM READ_ONLY 0x810 TO OXAFF MY_STK READ_WRITE OxBOO TO OXBFF PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Remove either the SEGMENTS or SECTIONS block 6 3 8 L1004 lt Separator gt Expected Type Error Description This message is generated when the specified lt separator gt is missing from an expected position lt separator gt character or expression Example SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox8FF ALIGN 2TO 4 4 ERROR expected Tip Insert the specified separator at the expected position MCUez Linker User s Manual MOTOROLA Linker Messages 113 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 9 L1005 Fill Pattern Will Be Truncated gt 0xFF Type Description Example Tip Example Warning This message is generated when the constant specified as a fill pattern cannot be coded on a byte The constant truncated to a byte value will be used as the fill pattern MY_RAM READ_WRITE 0x0800 TO Ox8FF FILL 0xA34 To avoid this message split the constant into 2 byte constants SEGMENTS M
78. Procedures Linker Commands 4 4 8 1 Specifying a List of Sections When several sections are specified in a PLACEMENT block the sections are allocated in the sequence where they are listed Example LINK test abs NAMES test o startup o END SEGMENTS RAM _ AREA READ_WRITE 0x00100 TO 0x002FF STK_AREA READ_WRITE 0x00300 TO 0Ox003FF ROM_AREA READ_ONLY 0x08000 TO OXOFFFF END PLACEMENT data dataSecl dataSec2 INTO RAM AREA text myCode INTO ROM_AREA stack INTO STK_AREA END In the previous example e Inside segment RAM_AREA the objects defined in the data section are allocated first then objects defined in section dataSecl and finally objects defined in section dataSec2 e Inside segment ROM_AREA objects defined in the text section are allocated then objects are defined in section myCode NOTE The linker is case sensitive Section names specified in the PLACEMENT block must be valid predefined or user defined sections Sections DataSec1 and dataSecl are different sections MCUez Linker User s Manual MOTOROLA Operating Procedures 63 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures 4 4 8 2 Specifying a List of Segments When several segments are specified in a PLACEMENT block the segments are used in the sequence where they are listed
79. ROLA Operating Procedures 47 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Example User s Manual A successful link session also creates a map file with the same base name as the absolute file with extension map If the environment variable TEXTPATH is defined the map file is generated in the first directory assigned to the variable Otherwise it is written to the directory where the parameter file was found If a file with this name already exists it is overwritten A successful link session also creates an S record file with the same base name as the absolute file with extension Sx If the environment variable ABSPATH is defined the S record file is generated in the first directory assigned to the variable Otherwise it is written to the directory where the parameter file was found If a file with this name already exists it is overwritten LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x1000 TO Ox18FF MY_ROM READ_ONLY 0x8000 TO OXx8FFF MY_STK READ_WRITE 0x1900 TO Ox1FFF PLACEMENT DEFAULT_ROM INTO MY_ROM DEFAULT_RAM INTO MY_RAM SSTACK INTO MY_STK END VECTOR ADDRESS OxFFFE _Startup set reset vector The files fibo abs fibo sx and fibo map are generated after a successful link session MCUez Linker 48 Opera
80. Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Tip Specify at least one filename in the NAMES block User s Manual MCUez Linker 120 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 18 L1016 File lt Filename gt Found Twice in NAMES Block Type Error Description A filename is detected twice in the NAMES block lt filename gt Name of file detected twice in the NAMES block Example LINK fibo abs NAMES fibo o startup o fibo o END A ERROR File fibo o found twice in the NAMES block SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Remove the second occurrence of the specified file 6 3 19 L1037 Linking of lt parameter file gt Failed Type Error Description An error occurred in the linking process Linking is interrupted and no output is written The destination absolute file and the map file are not created Tip Ensure that parameter file is valid and can be located 6 3 20 L1038 Success Executable File Written to lt absfile gt Type Inf
81. Setting Environment Variables in MCUez Shell 97 5 4 1 Pathi Variables voracidad ckhves eas A 97 5 5 Variable Descrip oc kbcsnGechded esssddtawesaaaaeses RES 97 3 0 1 GENPA A oeebeesetdseeeseuetdead ees 98 5 35 2 OBIPATH eee ee eee eee er pidas ik eare ba ea 99 5 2 0 LIBPA AAA A a ee eran pe rere rere ree 99 5 5 4 PURPA 2 sie ian dicaededs UOueees sede ERORA 100 e a A 100 5 5 0 SE E rs ARIAS E O KES od es 101 5 3 7 ERRORFILE siria eri dees erdeti MA 102 6 1 i a ee ee Eres eee ee ere eae 103 6 2 WI ds once ction N EET E EN A T 108 6 3 Linker Messages Referent soso 108 6 3 1 Li Unknown Message Occurred 2 2442 44ese9sseese40048 109 6 3 2 L2 Message Overflow Skipping lt type gt Messages 109 6 3 3 L64 Line Continuation Occurred in lt FileName gt 109 6 3 4 L1000 lt Command Name gt not Found 1202 60 ne0see00ns 110 6 3 5 L1001 lt Command Name gt Multiply Defined 111 User s Manual MOTOROLA Table of Contents 9 For More Information On This Product Go to www freescale com User s Manual Freescale Semiconductor Inc Table of Contents 6 3 6 6 3 7 6 3 8 6 3 9 6 3 10 6 3 11 6 3 12 6 3 13 6 3 14 6 3 15 6 3 16 6 3 17 6 3 18 6 3 19 6 3 20 6 3 21 6 3 22 6 3 23 6 3 24 6 3 25 6 3 26 6 3 27 6 3 28 6 3 29 6 3 30 6 3 31 6 3 32 6 3 33 6 3 34 L1002 Command lt Command Name gt Overwritten by Option lt Option MAMMA 112
82. TH 6 3 124 L4001 Link Parameter File lt PRMFile gt not Found Type Description Tip Error The specified source file does not exist or the search paths are not correctly set Ensure that path settings are correct Linker parameter files are searched for in the current directory and in the list of paths specified with the environment variable GENPATH 6 3 125 L4002 NAMES Section was not Found in Linker Parameter File lt PRM File gt Type Description Tip MCUez Linker Error The NAMES section was not found in the linker parameter file Ensure that a correct parameter file is passed to the linker User s Manual MOTOROLA Linker Messages 177 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 126 L4004 Linking lt PRM File gt as ELF DWARF Format Link Parameter File Type Information Description If the first file in the NAMES section is an ELF DWARF object file this message is issued and the ELF DWARF object file format is started 6 3 127 L4005 Illegal File Format of Object File lt objFile gt in NAMES List Type Error Description No object file in the NAMES list contains a known file format This message prints out the name of the last file in the NAMES list that was opened lt objFile gt Tip Ensure that path settings are correct 6 3 128 L4006 Failed to Create Temporary File Type Error Descriptio
83. The application entry point is stored inthe init section This section also has to be associated with a READ_ONLY segment The data and text sections must always be associated with a segment MCUez Linker 66 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands 4 4 8 4 Allocating User Defined Sections MCUez Linker Not all sections need to be listed in the PLACEMENT block Segments in which sections are allocated depend on the type of section For example e Sections containing data are allocated next to the data section e Sections containing code constant variables or string constants are allocated next to the text section In the segment where data is placed allocation is performed as follows e Objects from section data are allocated e Objects from section bss are allocated if bss is not specified in the PLACEMENT block e Objects from the first user defined data section not specified in the PLACEMENT block are allocated e Objects from the next user defined data section not specified in the PLACEMENT block are allocated e This continues until all user defined data sections are allocated e Ifthe section stack is not specified in the PLACEMENT block and is defined with a STACKSIZE command the stack is allocated user data user data user data section 1 sec
84. The section bss is placed ina READ_ONLY segment e The section st artData is placed ina READ_WRITE NO_INIT or PAGED segment e Thesection init is placedinaREAD_WRITE NO_INIT or PAGED segment e Thesection copy is placed ina READ_WRITE NO_INIT or PAGED segment e Thesection text is placedinaREAD_WRITE NO_INIT or PAGED segment e The section data is placed ina READ ONLY segment Example R ERROR The illegal NAMES fibo data section has segment type RI LINK fibo abs O startup o END HAD ONLY SEGMENTS MY RAM READ WRITE 0x800 TO 0x80F MY_ROM READ ONLY 0x810 TO OxAFF MY STK READ WRITE OxBOO TO OxBFF ROM_2 READ ONLY 0x500 TO Ox7FF END PLACEMENT text rodata INTO MY_ROM data INTO ROM_2 stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup User s Manual MCUez Linker 134 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference Tip Place the specified section in a segment that has been defined with an appropriate qualifier Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY ROM READ_ONLY
85. Tips e To avoid this message either adapt the address specified in the STACKTOP command to fit into the segment where stack is allocated or simply remove the command STACKTOP e Ifthe command STACKTOP is removed from the previous example the stack pointer initial value will be set to OXBFE MCUez Linker User s Manual MOTOROLA Linker Messages 151 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_ RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup lt ECTOR ADDRESS OxFFFE _Startup 6 3 52 L1205 STACKTOP Command Incompatible with stack Being Part of List of Sections Type Error Description The stack is defined through both a STACKTOP command and placement of the stack section in a READ_WRITE or NO_INIT segment The stack section is specified in a list of sections in the PLACEMENT block Example a ERROR STACKTOP command incompatible with stack be ing part of a lis t of sections als LINK fibo abs N S EGMENTS MY_RAM RI MY_ROM RI STK_1 RI END PLACEMENT text
86. Y_RAM READ_WRITE 0x0800 TO Ox8FF FILL OxA 0x34 END 6 3 10 L1006 lt Token gt not Allowed Type Description Example Tip Example User s Manual Error This message is generated when a filename followed by an asterick is specified in an OBJECT_ALLOCATION or LAYOUT block This is not possible because a section is either a read only or a read write section When all objects defined in a file are moved to a section the destination section will contain both code and variables This is logically not possible OBJECT_ALLOCATION fibo o INTO mySec RROR not allowed ND a E Move either all functions variables or constants to the destination section OBJECT_ALLOCATION fibo o CODE INTO mySec END MCUez Linker 114 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 11 L1007 lt Character gt not Allowed in Filename Restriction Type Error Description A filename specified in the parameter file contains an illegal character These specific characters are not allowed in a filename e Colon Used as separator to specify a local object function or variable in a parameter file e Semi colon Used as delimiter for a command line ina LAYOUT or OBJECT_ALLOCATION block e Greater than symbol
87. _Startup ECTOR ADDRESS OxFFFE _Startup lt Tip Define a single segment with the READ_WRITE or NO_INIT qualifier to allocate the stack User s Manual MCUez Linker 148 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 50 L1203 STACKSIZE Command Defines a Size of lt Size gt But stack Specifies a Stacksize of lt Size gt Type Error Description The stack is defined through both a STACKSIZE command and placement of the stack section in a READ_WRITE or NO_INIT segment However the size specified in the STACKSIZE command is bigger than the size of the segment where the stack is allocated Example ERROR STACKSIZE command defines a size of 0x120 but stack specifies a stacksize of 0x100 LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxXxBFF END PLACEMENT EXE INTO MY_ROM data INTO MY_RAM stack INTO STK_1 END STACKSIZE 0x120 Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Tip e To avoid this message either adapt the size specified in the STACKSIZE command to fit into the segment where stack is allocated or simply remov
88. a a ee Re de a 65 BACK A eben She eee ee eee aes 65 statala mom rara ds askew as toe erate dades Deer ae eet 65 85 A dh ea eee adie Hidde edna Od Dade kee eas 65 Segment AMP code cia pasala ri e 53 56 Pill Patten c side sends decade ssdesar ee aseecandeidesas tates aa PU PAG bra ake bain Ak ar Saheb ehh sad 59 QuallMer scicicias rta rare 33 39 SEGMENTS 000 a e T aa Ra ae 44 53 Smart LINKINE 422 hc ride viba rito vibra adela 19 79 STACKS Bess 0 IAE EI DARA 68 MCUez Linker 182 Index MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Index STACK TOP econtra nee dada PRs Hoe dada 69 Startup Application daa 84 Startup F nctiol 25 3004 40edeeedeues dea did sue o dan add a 88 User Defined iia a ad 88 Startup UCI ERA AAA ARIAS 84 AS O 85 IntB odias voii tantra ed is 87 MA his eaae aada he ee eee pase bis Maes 86 87 Mapen ee is e Sm PN Ce Ee 86 NOMMUCBOIES occ 5c bee 5 Oe eee hee hele be oe he aoe ew abe a 87 AAA A A AE 86 87 NOPZETOOUWS 20000 a id a Bele es 86 A eee oles eed AE Ea E E a aE 86 StackOff s t tir tad 86 fOCOpy DOWNB ES sesane peed en ds e a i E E 86 User Defined e reana aa doe od a a a ee 87 An E EE EE 84 Status Bar iii ia ia E a a 27 T TEXTPATH uta oa 38 44 Toolbar via A we gear ao EErEE 25 V eV OPON esee eraa e E eea eo ER E N ee 91 94 VECTOR ooo a ots ai a a ai a ene doe ia a a oe daa 70 D0 AEE EEE E O E as em acts E E N E EE E E
89. a battery backed RAM Sections placed in a NO_INIT segment should not contain an initialized variable variable defined as int c 8 This is only the case when linking a high level language ANSI C or C application NO_INIT Qualifies a segment where read and write accesses are allowed Objects within such a segment remain unchanged during application startup Additionally objects located in two PAGED segments may overlap This qualifier is used for memory areas PAGED where some user defined page switching mechanism is required Sections placed in a NO_INIT segment should not contain an initialized variable variable defined as int c 8 This is only the case when linking a high level language ANSI C or C application Example SEGMENTS ROM READ_ONLY 0x1000 SIZE 0x2000 CLOCK NO_INIT OxFFOO TO OxFFFEF RAM READ_WRITE 0x3000 TO Ox3EFF Page0 PAGED 0x4000 TO Ox4FFF Pagel PAGED 0x4000 TO Ox4FFF END In the previous example e Segment ROM isa READ ONLY memory area It starts at address 0x 1000 and is 0x2000 bytes from address 0x1000 to Ox2FFF MCUez Linker User s Manual MOTOROLA Operating Procedures 55 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures e Segment RAM isa READ WRITE memory area It starts at address 0x3000 and ends at Ox3FFF size 0x1000 byt
90. aesneeabaeds 125 L1104 Absolute Object lt Object Name gt Overlaps with Segment lt Sepment Name 21 2 pscieosctucaweees 126 L1105 Absolute Object lt object name gt Overlaps with Another Absolute Allocated Object or with a Vector 127 L1106 lt Object Name gt not Found 2 442444200sieedee00 4 128 L1107 lt Object Names not Found 26 44 06d206esineseeae as 129 L1109 lt Segment Name gt Appears Twice m SEGMENTS Blocks waive seb ease shee dyewdseenss 130 L1110 lt Segment Name gt Appears Twice 1 PLACEMENT Block 1 cedeeyeuiweices veda 131 L1111 lt Section Name gt Appears Twice i PLACEMENT Bie cosida ned eon 132 L1112 lt Section name gt Section Has Segment Type lt Segment Qualifier gt Hegal orcos 132 MCUez Linker 10 Table of Contents MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 6 3 35 6 3 36 6 3 37 6 3 38 6 3 39 6 3 40 6 3 41 6 3 42 6 3 43 6 3 44 6 3 45 6 3 46 6 3 47 6 3 48 6 3 49 6 3 50 6 3 51 6 3 52 6 3 53 6 3 54 6 3 55 6 3 56 6 3 57 MCUez Linker Table of Contents L1113 lt Section name gt Section Has Segment Type lt Segment Qualifier gt Hegal isc acess cde rar 134 L1114 lt Section Name gt Section Has Segment Type lt Segment Qualifier gt Initialization Problem 135 L1115 Function lt Function Name gt not Found 137 L1118 Vector Allocated at Absolute Add
91. ailable Information about the initialization value for objects allocated in RAM will be written to COPYDOWN the map file COPYDOWN section This section is only relevant for high level language ANSI C or C applications FILE Information about application source files will be inserted in the map file NONE No map file will be generated Information about allocated objects will be inserted in the map file OBJECT ee eee ALLOCATION section OBJ_UNUSED List of all unused objects will be inserted in the map file UNUSED OBJECTS section OBJ DEP Dependencies between objects in the application will be inserted in the map file OBJECT DEPENDENCY section SEC_ALLOC Information about sections used in the application will be inserted in the map file SECTION ALLOCATION section Information about the startup structure will be inserted in the map file STARTUP section This section is only relevant for high level language ANSI C or C applications Statistic information about the link session will be inserted in the map file STATISTICS section TARGET MCUez Linker Information about the target processor and memory model will be inserted in the map file TARGET section User s Manual MOTOROLA Operating Procedures 51 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures 4 4 6 NAMES List Files Syntax Description Example User s Manua
92. ap file e MAIN Defines the application main function e INIT Defines the application entry point e STACKSIZE Defines the stack size e STACKTOP Defines the stack pointer initial value When the LINK command is detected more than once the message will be LINK multiple defined Example LINK fibo abs NAMES fibo o start12s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OXAFF MY_STK READ_WRITE 0xB00 TO OxXxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END LINK fibo abs Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup MCUez Linker User s Manual MOTOROLA Linker Messages 111 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Tip Remove one of the duplicated commands LINK fibo abs NAMES fibo o startl2s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXxBEFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup 6 3 6 L1002 Command lt Command Name gt Overwritten by Opti
93. ation ensure that interrupt functions are located in the non banked memory area The section should now be placed at the expected address This is performed in the linker parameter file shown in the next example MCUez Linker User s Manual MOTOROLA Operating Procedures 75 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Example NOTE LINK test abs NAMES test o END SEGMENTS MY_ROM READ_ONLY 0x0800 TO OxO8FF MY_RAM READ _WRITE 0x0A00 TO OXxOBFF Define memory range for vector table Vector READ_ONLY OxFFF2 TO OXxFFFF END PLACEMENT data INTO MY_RAM text INTO MY_ROM VectorTable INTO Vector END INIT ResetFunc ENTRIES END The statement Vector READ_ONLY OXFFF2 TO OxFFFF defines the memory range for the vector table The statement VectorTable INTO Vector specifies that the vector table should be loaded in the read only memory area vector The constant TRQInt will be allocated at address OxFFF2 the constant XIRQInt will be allocated at address OxFFF4 and so on The constant Reset Int will be allocated at address OxFFFE The Statement ENTRIES END switches smart linking OFF If this statement is missing from the PRM file the vector table will not be linked with the application because it is never referenced The smart linker only links
94. cified in a PRM file The STACKSIZE command defines the stack size Use this command if it does not matter where the stack is allocated but only how large it is When the stack is defined by a STACKSIZE command alone the stack is placed next to the data section SEGMENTS MY_RAM READ_WRITE 0xA00 TO OXAFF MY_ROM READ_ONLY 0x800 TO OXx9FF END PLACEMENT text IN MY_ROM data IN MY_RAM END STACKSIZE 0x60 MCUez Linker 68 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Example Freescale Semiconductor Inc Operating Procedures Linker Commands In the previous example if the section data is four bytes wide from address 0xA00 to OxA03 the section stack is allocated next to it from address 0xA63 down to address OxA04 The stack initial value is set to OxA62 When the stack is defined by a STACKSIZE command associated with the placement of the stack section the stack should start at the segment start address It is incremented by the specified value and defined to the start address of the segment where stack has been placed SEGMENTS MY_STK NO_INIT OxB00 TO OxBFF MY_RAM READ_WRITE 0xA00 TO OxAFF MY_ROM READ_ONLY 0x800 TO OXx9FF END PLACEMENT text IN MY_ROM data IN MY_RAM Stack IN MY_STK END ST
95. ck OK to link the selected file 2 3 5 3 Using Drag and Drop A filename can be dragged from another program for example File Manager and dropped into the linker window The dropped file will be linked as soon as the mouse button is released 2 3 6 Error Feedback After a parameter prm file has been linked any error or warning messages will have this format gt gt lt FileName gt line lt line number gt col lt column number gt pos lt absolute position in file gt lt Portion of code generating the problem gt lt message class gt lt message number gt lt Message string gt Example gt gt in placemen tstpla8 prm line 23 col 0 pos 668 fpm_data_sec INTO MY_RAM2 ERROR L1110 MY_RAM2 appears twice in PLACEMENT block MCUez Linker User s Manual MOTOROLA Graphical User Interface GUI 35 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI User s Manual MCUez Linker 36 Graphical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker Section 3 Files 3 1 Contents A MAA ae 32 Parameter Files IA a A aes ae 34 Absolute Files OG escorias rro 38 353 Motorola Filer IDOL IA 38 3 6 E AMA 48d bee oe breree EE 38 3 2 Introduction This section describes the files used and genera
96. cription The lt details gt specify the cause of the error Possible causes are User s Manual Cannot open lt File gt see 6 3 60 L1309 Cannot Open lt File gt Out of memory in lt File gt see 6 3 84 L1803 Out of Memory in lt Function Name gt Wrong file type for lt action gt Write error in lt File gt No ELF Section Header defined in lt File gt String buffer overrun in lt File gt Wrong section type Internal buffer overflow in lt Function gt All local symbols before the first global one Currently no file open Request is not valid Internal MCUez Linker 176 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 122 L1938 Type Clash in Segment Corrupt Object lt name gt Type Description Tip Error The object file is corrupt Recompile sources and link again Contact a Motorola representative if the error continues 6 3 123 L4000 Could not Open Object File lt objFile gt in NAMES List Type Description Tip Error The linker could not open any object file in the NAMES list This message prints out the name of the last file found in the NAMES list lt objFile gt Ensure that path settings are correct Object files are searched for in the current directory and in the list of paths specified in the environment variables OBJPATH and GENPA
97. ction lt Section Name gt Invalid Qualifier lt Segment Qualifier gt 159 L1502 lt Object Name gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt o oooooooooooooo o 160 L1503 lt Object Name gt from file lt Filename gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt 161 L1504 lt Object Name gt from section lt Section Name gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt 162 L1600 Main Function Detected in ROM Library 163 L1601 Startup Function Detected in ROM Library 163 L1620 Bad Digit in Binary Number 2 4 2 4 205 600544 163 L1621 Bad Digit in Octal Number 244520402042 00 weed see 163 L1622 Bad Digit in Decimal Number 424220240252 163 LAGES DUDE WO Bif cards 164 L1624 Ident too Long Cut after 31 Characters 164 LABS Comment NOt ose rd 164 L1626 Unexpected End of File cccsieccuseacarceaxe eens 164 L1627 PRESTART Command not Supported Yet 165 L1628 HEXFILE Command not Supported Yet 165 L1629 START_DATA Command not Supported Yet 165 L1700 File lt Filename gt Should Contain DWARF Information 165 L1701 Startup Data Structure is Empty 42 seas eacdcasds 166 L100 Read Error in lt Files ccc ccucacieetieasteesasancns 166 L180
98. d error A ERROR globInt not found LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY STK READ_WRITE 0xB00 TO OXxBFF END PLACEMENT text rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END ENTRIES globInt END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup The missing object must be implemented in one of the modules building the application Ensure that the definitions of OBJPATH and GENPATH are correct and the linker uses the latest version of object files Check the NAMES block to ensure all binary files building the application are listed MCUez Linker 128 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 6 3 30 L1107 lt Object Name gt not Found Type Error Warnin 8 Linker Messages Linker Messages Reference Description An object referenced in the parameter file or in the application is not found anywhere in the application This message is generated in the following cases e An object moved to another section in the OBJECT_ALLOCATION block is not found anywhere in the application warning e An object placed at an absolute address in the OBJECT_ALLOCATION block is not found anywhere in the
99. d smaller or equal to size2 alignment User s Manual Defines the alignment value for objects matching the condition defined in the current alignment block enclosed in square brackets MCUez Linker 56 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands Example LINK test abs NAMES test o startup o END SEGMENTS DIRECT_RAM READ WRITE 0x00000 TO Ox000FF ALIGN 2 lt 2 1 RAM_AREA READ_WRITE 0x00100 TO Ox0O7FFF ALIGN 1 1 2 3 2 gt 4 4 ROM_AREA READ_ONLY 0x08000 TO OXxOFFFF END PLACEMENT myRegister INTO DIRECT_RAM data INTO RAM_AREA text INTO ROM_AREA END STACKSIZE 0x50 In the previous example In DIRECT_RAM segment objects whose size is one byte are aligned on byte boundary all other objects are aligned on 2 byte boundary e In RAM_AREA segment 1 byte objects are aligned on byte boundary objects equal to two or three bytes are aligned on 2 byte boundary and all other objects are aligned on 4 byte boundary e Default alignment rule applies to the ROM_AREA segment An alignment rule can be specified as follows ALIGN lt defaultAlignment gt lt Number gt lt Number gt TO lt Number gt lt gt lt gt lt
100. de or Microsoft format Verbose mode displays more information than the Microsoft format Example test prm WmsgFim See also None MCUez Linker User s Manual MOTOROLA Environment Variables 95 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Environment Variables 5 3 14 WmsgNe User s Manual WmsgNe Sets maximum number of error messages Syntax lt parameter file gt lt option gt lt value gt Arguments None Default None Description Sets the maximum number of error messages to be gener ated before the process is halted Enter a value between O and 100 Example test prm WmsgNel0 See also None 5 3 15 WmsgNi WmsgNli Sets maximum number of information messages Syntax lt parameter file gt lt option gt lt value gt Arguments None Default None Description Sets the maximum number of information messages to be generated Enter a value between 0 and 100 Example test prm WmsgNil0 See also None 5 3 16 WmsgNw WmsgNw Sets maximum number of warning messages Syntax lt parameter file gt lt option gt lt value gt Arguments None Default None Description Sets the maximum number of warning messages to be gen erated Enter a value between 0 and 100 Example test prm WmsgNw10 See also None MCUez Linker 96 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com Freescale Semicon
101. ductor Inc Environment Variables Setting Environment Variables in MCUez Shell 5 4 Setting Environment Variables in MCUez Shell The syntax for environment variables set in the shell is Variable Definition NOTE No spaces are allowed in the definition of an environment variable Q Example ENPATH C INSTALL LIB 5 4 1 Path Variables Environment variables that contain paths indicate where to look for files A path list is a list of directory names separated by semicolons or a directory name preceded by an asterick If a directory name is preceded by an asterisk the programs recursively search the whole directory tree for a file not just the given directory Directories are searched in the order they appear in the path list Syntax DirSpec DirSpec DirSpec DirectoryName Example GENPATH C INSTALL LIB D PROJECTS TESTS LIBPATH C INSTALL LIB 5 5 Variable Descriptions This section describes these variables e GENPATH e OBJPATH e LIBPATH e ABSPATH e TEXTPATH e SRECORD e ERRORFILE MCUez Linker User s Manual MOTOROLA Environment Variables 97 For More Information On This Product Go to www freescale com User s Manual NOTE Freescale Semiconductor Inc Environment Variables 5 5 1 GENPATH Syntax Arguments Description GENPATH lt path gt lt path gt Path separated by semicolons without spaces The
102. ductor Inc User s Manual MCUez Linker MCUez Linker 1 1 12 1 3 1 4 Es 2 1 2 2 23 2a 23 23 23 2 3 Ze a3 23 Zea 2 3 23 RS 23 1 32 33 3 4 Ed 3 6 Table of Contents Section 1 General Information COMENS A INMECUCHON esorrorino rodri Functional ESOO cris ri dnai eEs O A II Typographic Styles in This Manual c coocosisrardas oras n Section 2 Graphical User Interface GUI COMES se sk bg be oe bes KOS eh ee ESE GH wes Ree ae A RRS aA T E E E E E EE EE EEE 2 COMIC AGG PAM ie PE AA A AN 4 AAA 4 1 Pile MEMI sra a IA oD AA A CA 4 2 Linke AA th deae ties esaseasieeartas 4 3 o inn tage A dane eee eeen ees 44 Help Me AAA Specitying the al AMA Sl Using the Command Line i s02iseigseseeeiceeds eas een dle Using the Menu Entry File Link ooocorrosircic roses a Usine Drag and redacta 6 Emor POC MAMMA e tyscbascdueeuetce ns tense besurdse ee eeenenesess e A ee E ae oa es Parameter Fies Mpi MA des EETA RAE Absolute Files UU cccaercreacicicadednesscaeeeescned Motorola S Files CANDIA ws ches o es cheb see eK e A A User s Manual MOTOROLA Table of Contents For More Information On This Product Go to www freescale com 7 Freescale Semiconductor Inc Table of Contents Section 4 Operating Procedures 4 1 ONIS 2 pra E AI AAA AAA 41 2 0 AAA 42 4 3 Parameter A ee rod 4hGoee res 4eue5 G45 42 4 3 1 Syntax Ol he Parmeter Pile sii A 42 4 3 2 Mandatory Param
103. e abs The file is termed an absolute file because it contains absolute code not relocatable code that can be loaded into the target and burnt onto an EPROM erasable programmable read only memory using the MCUez debugger 1 3 Functional Description MCUez Linker Linking is the process of assigning memory to all global objects functions global data strings and initialization data needed for a given application and combining these objects into a format suitable for downloading into a target system or an emulator The MCUez linker is a smart linker only linking objects actually used by the application Various optimization capabilities ensure low memory requirements for the linked program Unused functions and variables will not occupy memory in the target system Also initialization of global variables is stored in compact form and memory is reserved only once for identical strings User s Manual MOTOROLA General Information 19 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc General Information 1 4 Features The most important features supported by the MCUez linker are Complete control over placement of objects in memory It is possible to allocate different groups of functions or variables to different memory areas segmentation Initialization of vectors When linking high level language modules C C etc the linker supports these features U
104. e the command STACKSIZE e Ifthecommand STACKSIZE is removed from the previous example the linker will initialize a stack from 0x100 bytes The stack pointer initial value will be set to OXBFE MCUez Linker User s Manual MOTOROLA Linker Messages 149 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages fibo abs Example LINK NAMES fibo SEGMENTS _ RAM MY END MY_ MY_STK ROM PLAC END Set VECTOR If the size specified ina STACKS EM text d s tack rese O startup o READ_WRITE READ_ONLY READ_WRITE END 0x800 TO 0x80F 0x810 TO OxAFF INTO INTO INTO OxBOO TO OXBFF MY_ROM MY_RAM MY_STK t vector on _Startup ADDRESS OxFFFE _ Startup ZE command is smaller than the size of the segment where the section stack is allocated the stack pointer initial value will be evaluated as follows lt segment start address gt lt size in STACKSIZE gt Byte Required by the processor gt END 0x800 TO Ox80F 0x810 TO OxAFF lt Additional LINK fibo abs NAMES fibo o startup o SEGMENTS MY RAM READ WRITE MY ROM READ ONLY MY STK READ _ WRITE END PLACEMENT text INTO data INTO stack INTO
105. ecified file has been compiled or assembled with the correct option to generate an ELF binary file Ensure that paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the working directory User s Manual MCUez Linker 156 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 60 L1309 Cannot Open lt File gt Type Error Description An input file is missing or the linker cannot open it Tip Ensure that paths are defined correctly 6 3 61 L1400 Incompatible Processor lt Processor Name gt in Previous Files and lt Processor Name gt in Current File Type Error Description The binary files building the application have been generated for a different target processor In this case the linked code cannot be compatible Tips e Make sure all sources are compiled and assembled for the same processor e Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory 6 3 62 L1401 Incompatible Memory Model lt Memory Model Name gt in Previous Files and lt Memory Model Name gt in Current File Type Error Description The binary files building the application have been generated for a different memory mod
106. ection The problem may occur when linking object files from different vendors The debug information may be better than no debug 6 3 114 L1928 Limitation Code Size lt num gt Type Description Tip MCUez Linker Error This message appears in the demo version of the MCUez linker The size of linked code is limited to 1 Kbyte Contact a Motorola representative User s Manual MOTOROLA Linker Messages 173 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 115 L1929 Limitation Too many Mections lt num gt Type Description Tip Error This message appears in the demo version of the MCUez linker The number of sections is limited Contact a Motorola representative 6 3 116 L1930 Unknown Fixup Type in lt ident gt Type lt type gt at Offset lt offset gt Type Description Tip Error The object file is corrupt or linker version does not support compiler instructions Recompile sources and link again 6 3 117 L1931 Program Header Begin is not Aligned on the Beginning of a Section Type Description Warning The program has to be aligned with the start of a section 6 3 118 L1932 Program Header Overflow in lt name gt at lt index gt Type Description Tip Error Overflow of the internal data structures This may be caused by corrupt input files The limit is defined for all ima
107. ection 6 Linker Messages a AAA 108 Linker Messages ESTEROS 2 smcriccdi AR A ecs 108 L1 Unknown Message Occurred 52560 srrrrA 109 L2 Message Overflow Skipping lt type gt Messages 109 L64 Line Continuation Occurred in lt FileName gt 109 L1000 lt Command Name gt not Found 110 L1001 lt Command Name gt Multiply Defined 111 L1002 Command lt Command Name gt Overwritten by Option lt Option Name ses raras 112 L1003 Only a Single SEGMENTS or SECTIONS Block AN radar ia 113 LA lt Separator gt Expected ccdiwasegnsiasscuatawades 113 L1005 Fill Pattern Will Be Truncated gt 0xFF 114 LADOS lt Token gt not Allowed cir sr daa 114 L1007 lt Character gt not Allowed in Filename Restriction 115 L1008 Only Single Object Allowed at Absolute Address 116 L1009 Segment Name lt Segment Name gt Unknown 117 L1010 Section Name lt section name gt Unknown 118 L1011 Incompatible Segment Qualifier lt Qualifier1 gt in Previous Segment and lt Qualifier2 gt e NRE AM 119 L1012 Segment is not Aligned on a lt bytes gt Boundary 120 L1015 No Binary Input File Specified ccsociosioisicrs ra 120 L1016 File lt Filename gt Found Twice in NAMES Block 121 L1037 Linking of lt parameter file gt Failed 2 121 L1038 Success Executable File Written to lt absfile gt 121 L1039 Limited Versio
108. ection Name gt Located in a Segment with Invalid Qualifier Programming language incompatible Incompatible memory model lt m1 gt in previous files and lt m2 gt in current file see 6 3 62 L1401 Incompatible Memory Model lt Memory Model Name gt in Previous Files and lt Memory Model Name gt in Current File Incompatible processor lt cpul gt in previous files and lt cpu2 gt in current file see 6 3 61 L1400 Incompatible Processor lt Processor Name gt in Previous Files and lt Processor Name gt in Current File String buffer overrun in lt File gt lt File gt is not a valid ELF file see 6 3 57 L1303 lt Filename gt is not a Valid ELF File lt File gt is a not an ELF object file see 6 3 59 L1305 lt Filename gt is not an ELF Format Object File ELF Object File Expected File lt File gt not found see 6 3 56 L1302 File lt Filename gt not Found User s Manual MOTOROLA Linker Messages 175 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Requested section not found Program header not found Currently no file open Request is not valid Object lt name gt has an unknown type Fixup error lt cause gt File is not a valid library file File is not a valid ELF library file ELF file corrupted DWARF fixup incorrect lt cause gt Internal 6 3 121 L1936 ELF Output lt details gt Error Type Error Des
109. ed in Section lt Section Name gt Invalid Qualifier lt Segment Qualifier gt Type Error Description An invalid move operation has been detected from an object inside a section which appears only in the parameter file In that case the first object moved in a section determines the attribute associated with the section e Ifthe object is a function the section should be a code section e Ifthe object is a constant the section should be a constant section e Otherwise it should be a data section This message is generated e When a variable is moved in a section which is placed in a READ_ONLY segment e When a function is moved in a section which is placed in a READ_WRITE NO_INIT or PAGED segment Example ERROR counter cannot be moved in section sec2 in valid qualifier READ_ONLY LINK fibo abs NAMES fibo o startup o END SEGMENTS MY RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxBFF END PLACEMENT text sec2 INTO MY_ROM data INTO MY_RAM stack INTO STK_1 END OBJECT_ALLOCATION counter IN sec2 END Set reset vector on _Startup VECTOR ADDRESS OxFFFE Startup Tip Move the section in a segment with the required qualifier or remove the move Operation MCUez Linker User s Manual MOTOROLA Linker Messages 159 For More In
110. egments MY_RAM and MY_ROM overlap LINK fibo abs NAMES fibo SEGMENTS MY_RAM MY_ROM MY_STK END PLACEMENT text data stack END Set rese V o startup o END READ_WRITE 0x800 TO 0x80F READ_ONLY 0x805 TO 0xAFF READ_WRITE 0xB00 TO 0xBFF INTO MY_ROM INTO MY_RAM INTO MY_STK t vector on _Startup ECTOR ADDRESS OxFFFE _Startup Tip Modify the segment definition to remove the overlap Example LINK fibo NAMES fibo SEGMENTS MY_ROM END PLACE Set rese anew MCUez Linker MY_RAM MY_STK abs o startup o END READ_WRITE 0x800 TO 0x80F READ_ONLY 0x810 TO OXAFF READ_WRITE 0xB00 TO OxBFF INTO MY_ROM INTO MY_RAM INTO MY_STK t vector on _Startup ECTOR ADDRI ESS OXFFFE _Startup User s Manual MOTOROLA Linker Messages 123 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 25 L1102 Out of Allocation Space in Segment lt Segment Name gt at Address lt First Address Free gt Type Error Description The specified segment is not big enough to contain all objects from sections placed in it e lt segment name gt Name of the undersized segment e lt first address free gt First address free in this segment for
111. el In this case the linked code cannot be compatible Tips e Make sure all sources are compiled and assembled in the same memory model e Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory MCUez Linker User s Manual MOTOROLA Linker Messages 157 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 63 L1403 Unknown Processor lt Processor Constant gt Type Error Description The processor encoded in the binary object file is not a valid processor constant Tip Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory 6 3 64 11404 Unknown Memory Model lt Memory Model Constant gt Type Error Description The memory model encoded in the binary object file is not valid for the target processor Tip Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory User s Manual MCUez Linker 158 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 65 L1501 lt Symbol Name gt Cannot be Mov
112. ent were allocated VECTOR ALLOCATION _ This section provides the address and initial value and function for the vector This section contains the names of all allocated objects and their addresses The objects are grouped by module If an address of an object is followed by the sign the object comes from a ROM library In this case the absolute file contains no code for the object if it is a function but the object s address was used for COREG T ALECA linking If an address of a string object is followed by a dash the string is a suffix of some other string As an example if the strings abc and bc are present in the same program the string bc is not allocated and its address is the address of abc plus 1 UNUSED OBJECTS This section lists all objects found in the object files that were not linked COPYDOWN This section lists all blocks copied from ROM to RAM at program startup OBJECT DEPENDENCY This section lists the names of global objects used by functions and variables User s Manual STATISTICS This section generates information about the size of the code generated MCUez Linker 50 Operating Procedures For More Information On This Product Go to www freescale com MOTOROLA Freescale Semiconductor Inc Operating Procedures Linker Commands Table 4 3 Map File Options STARTUP_STRUCT STATISTIC Option Meaning ALL A map file will be generated containing all information av
113. es e Segment CLOCK is a READ_WRITE memory area It starts at address OxFFOO and ends at OXFFFF size 256 bytes e Segments PageO and Pagel are READ_WRITE memory areas These are overlapping segments It is the user s responsibility to select the correct page before accessing data from these segments 4 4 7 2 Segment Alignment The HC12 HC08 and HCOS processors do not require alignment for code or data objects Users can choose to define their own alignment rule for a segment An alignment rule can be associated with each segment in the application This may be useful when specific alignment rules are expected on a certain memory range due to hardware restrictions The alignment rule has this format defaultAlignment Ob jSizeRange alignment Table 4 5 Segment Alignment Rule Format Item defaultAlignment ObjSizeRange Description The alignment value for all objects that do not match the conditions of a defined range Defines a certain condition The condition has the form size rule applies to objects where size is equal to size lt size rule applies to objects where size is smaller than size gt size rule applies to objects where size is bigger than size lt size rule applies to objects where size is smaller or equal to size gt size rule applies to objects where size is bigger or equal to size From size1 to size2 the rule applies to objects where size is greater or equal to size1 an
114. eter File Linker Commands 44 4 4 Linker 0 AAA 45 4 4 1 ENTRIES List of Objects to Link with Application 45 4 4 2 INIT Specify Application Entry Point ooooooo 47 4 4 3 LINK Specify Name of Output File 2 4 lt 64e869 405083544 47 4 4 4 MAIN Specify Root Function 66sx essa wee cee siweexeeeeus 49 4 4 5 MAPFILE Configure Map Plle oosocoriosrarsrimoron as ees 49 4 4 6 NAMES LANE sd sb 32 4 4 7 SEGMENTS Define Memory Map 53 4 4 7 1 Samer QUANNE 5 44460255 5456459 0446025064405 098 i 4 4 7 2 a ino ok ok Conk eee shake ae rene ees 56 4 4 7 3 Segment Pill Pater iccoripas ricas oa cues 39 4 4 8 PLACEMENT Place Sections into Segments 61 4 4 8 1 Speci ving a List of DECO rior pre 63 4 4 8 2 Specifying a List of Segments 2 642 eo sseyseoesae ees e s 64 4 4 8 3 Predefined SEONG ARA 65 4 4 8 4 Allocating User Defined SectiOMS o ooooooooooo 67 4 4 9 STACKSIZE Define Stack Rize occ ccatcsaescanedesas cas 68 44 10 STACKTOP Define Stack Pointer Initial Value 69 4 4 11 VECTOR Initialize Vector Table si 4 244444442 7442498048 70 4 4 11 1 Initializing Vector Table in Linker Parameter File 72 4 4 11 2 Initializing Vector Table in Assembly Source File Using a Relocatable Section 00e0208eu004 74 4 4 11 3 Initializing Vector Table in Assembly Source File Using an Absolute Section 2 424 ss sessee0 76 4 5 E oss a becdedce
115. fined in a section inside of another section This message is generated when a variable is moved in a code or constant section or a function is moved in a data or constant section Example a ERROR counter from section data cannot be moved from section data to section text LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE OxBOO TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO STK_1 END OBJECT_ALLOCATION data gt IN text ND Set reset vector on _Startup ECTOR ADDRESS OxFFFE _Startup Xx Ha Tip Move the specified object into a section with the required attribute or remove the move operation User s Manual MCUez Linker 162 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 69 L1600 Main Function Detected in ROM Library Type Warning Description A main function has been detected in a ROM library A main function is not required in a ROM library since they are not self executable applications Tips e Remove the MAIN command from the parameter file e Ifthe application contains the function main rename it 6 3 70 L1601 Startup Function Detected in ROM
116. formation On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 66 L1502 lt Object Name gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt Type Error Description An invalid move operation has been detected from an object inside a section which also appears in a binary file This message is generated when a variable is moved in a code or constant section or a function is moved in a data or constant section Example i ERROR counter cannot be moved from section data to section text LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxBFF END PLACEMENT SCEE INTO MY_ROM data INTO MY_RAM stack INTO STK_1 END OBJECT_ALLOCATION counter IN text END Set reset vector on _Startup VECTOR ADDRESS OxFFFE Startup Tip Move the object into a section with the required attribute or remove the move operation User s Manual MCUez Linker 160 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 67 L1503 lt Object Name gt from file lt Filename gt Cannot be Moved from Section lt So
117. freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 15 L1011 Incompatible Segment Qualifier lt Qualifier1 gt in Previous Segment and lt Qualifier2 gt in lt Segment Name gt Type Description Example Tip Example MCUez Linker Error Two segments specified in the same statement in the PLACEMENT block are not defined with the same qualifier lt qualifier1 gt Segment qualifier associated with the previous segment in the list This qualifier may be READ_ONLY READ_WRITE NO_INIT or PAGED lt qualifier2 gt Segment qualifier associated with the current segment in the list This qualifier may be READ_ONLY READ_WRITE NO_INIT or PAGED lt segment name gt Name of the current segment in the list LINK fibo abs NAMES fibo o startl2s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F SEC_RAM READ_WRITE 0x020 TO 0x02F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OXBFF END PLACEMENT data INTO MY_RAM text INTO MY_ROM SEC_RAM ERROR Incompatible segment qualifier READ_ONLY in previous segment and READ_WRITE in SEC_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup Modify the qualifier associated with the specified segment LINK fibo abs NAMES fibo o sta
118. ginable cases and raised constantly with the amount of resources available on a modern PC Recompile sources If this occurs again then too many sections have been defined 6 3 119 L1933 ELF lt details gt Warning Type Description User s Manual Warning Data in the file is not complete or consistent The lt details gt specify the cause of the warning Possible causes are listed in message L1934 MCUez Linker 174 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 120 L1934 ELF lt details gt Error Type Error Description Error while reading an ELF object file The lt details gt specify the cause of the error Possible causes are MCUez Linker Cannot open lt File gt see 6 3 60 L1309 Cannot Open lt File gt Read error in lt File gt Out of memory in lt File gt see 6 3 84 L1803 Out of Memory in lt Function Name gt No ELF Section Header Table found in lt File gt see 6 3 85 L1804 No ELF Section Header Table Found in lt Filename gt ELF file lt File gt is corrupted see 6 3 86 L1806 ELF File lt Filename gt Appears to be Corrupted String in lt File gt is too long see 6 3 87 L1808 String Overflow in lt Function Name gt Contact Vendor Section lt File gt located in a segment with invalid qualifier see 6 3 88 L1809 Section lt S
119. gment Qualifier gt legal css ioig ricin pei 132 L1113 lt Section name gt Section Has Segment Type Segment Qualifier legal cesi n eds 134 L1114 lt Section Name gt Section Has Segment Type lt Segment Qualifier gt Initialization Problem 135 L1115 Function lt Function Name gt not Found 137 L1118 Vector Allocated at Absolute Address lt Address gt Overlaps with Another Vector or an Absolute Allocated OE cdc csiownteeee bea is A 138 L1119 Vector Allocated at Absolute Address lt Address gt Overlaps with Sections Placed in Segment Apeement INIA cry rar 139 L1120 Vector Allocated at Absolute Address lt Address gt Placed in Segment lt Segment Name gt Which Has No READ_ONLY Qualifier 140 L1121 Out of Allocation Space at Address lt Address gt for copy AO A e A 140 L1122 Section copy Must Be Last Section in Section List 141 L1123 Invalid Range Defined for Segment lt Segment Name gt End Address Must Be Bigger Than Start Address conosiiosinsrinisirss 142 L1124 or Should Directly Follow Filename 143 MCUez Linker 104 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com MCUez Linker Freescale Semiconductor Inc 6 3 45 6 3 46 6 3 47 6 3 48 6 3 49 6 3 50 63 51 CEE 6 3 53 6 3 54 6 3 55 6 3 56 6 3 57 6 3 58 6 3 59 6 3 60 6 3 61 6 3 62 6 3 63 6 3 64
120. gt Object Address lt objadr gt Description The object lt obj gt overlaps with another object at address lt addr gt The address of the object is given in lt objadr gt Tip Place one of the objects somewhere else 6 3 106 L1913 Object Filler Overlaps with Something Else Type Error Description An object filler overlaps with another object This is not allowed MCUez Linker User s Manual MOTOROLA Linker Messages 171 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 107 L1914 Invalid Object lt Object gt Type Description Tip Error An object of unknown type is detected in an object file This is an internal error and may be caused by a corrupt object file or incompatible object formats Recompile sources and try to link again Contact a Motorola representative if this error continues to appear 6 3 108 L1915 Gap in lt Ident gt at lt address gt before lt Object gt is too Big Type Description Tip Error Gaps more than 32 bytes are not allowed between succeeding objects in a section Only gaps caused by alignment are allowed This is an internal error Contact a Motorola representative if this error continues to appear 6 3 109 L1916 Section Name lt Section gt is too Long Name is Cut to 90 Characters Length Type Description Tip Warning The length of a name is limited to 90 characters Re
121. he application This notation is only valid when referring to a symbol defined in a high level language ANSI C or C module lt File Name gt lt Object Name gt All objects defined within the specified file will be lt File Name gt linked with the application All objects will be linked with the application This switches off smart linking for the application Symbols defined in an assembly module which are used as additional entry points must be published specified in XDEF directive Example NAMES startup o END In the previous example the application is built from the files fibo o and Startup o Example NAMES fibo o startup o END END In the previous example the application is built from the files fibo o and startup o The file fibo o specified in the NAMES block is the same as the one specified in the ENTRIES block User s Manual MCUez Linker 46 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com NOTE Freescale Semiconductor Inc Operating Procedures Linker Commands It is strongly recommended to avoid switching smart linking off when the ANSI library is linked with the application The ANSI library contains the implementation of all run time and standard functions This generates a large amount of code which is not required by the application 4 4 2 INIT Specify Application Entry Point Sy
122. ical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com 2 3 1 Toolbar MCUez Linker Freescale Semiconductor Inc Graphical User Interface GUI Linker Graphical User Interface Figure 2 3 is an example of the main linker window The linker window provides a menu bar toolbar content area and status bar Linker D mcuez DEMO hcO8 project ini File Linker View Help Menu Bar Dilem e ln z el Lal Elle Toolbar Content Area Status Bar Figure 2 3 MCUez Linker Main Window Figure 2 4 illustrates the linker toolbar Note that The New Load and Save buttons are linked to the corresponding entries of the File menu e The and Context Help buttons correspond with entries in the Help menu The command line is for entering linker commands or selecting previously entered commands Click the Link button to execute a command e The Options button opens the Options dialog box e The Message button opens the Message Settings dialog box e The Clear button clears all information in the content area User s Manual MOTOROLA Graphical User Interface GUI 25 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Linker D motorolaproject mcuez DEMO hcO8 project ini File Linker View Help New Configuration 2 3 2 Content Area User s Manual Clear Com
123. in two different binary files Tip Rename the symbol defined in one of the specified files MCUez Linker User s Manual MOTOROLA Linker Messages 167 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 90 L1818 Symbol lt Symbol Numbers lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt Type Error Description The specified global symbol is defined in two different binary files Tip Rename the symbol defined in one of the specified files 6 3 91 L1820 Weak Symbol lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt Type Warning Description The specified weak symbol is defined in two different binary files Tip Rename the symbol defined in one of the specified files 6 3 92 L1821 Symbol lt id1 gt Conflicts with lt id2 gt in File lt File gt Same Code Type Error Description A static symbol is defined twice in the same module Tip Rename one of the symbols in the module 6 3 93 L1822 Symbol lt Symbol Name gt in File lt Filename gt is Undefined Type Error Description The specified symbol is referenced in the file but not defined anywhere in the application Tips e Check if an object file is missing in the NAMES block and if the correct binary file is used e Check if paths are defined correctly The binary files must be located in one of the paths listed i
124. indicate possible programming errors 3 Error A message is displayed and linking stops Error messages indicate illegal syntax in the parameter prm file 4 Fatal A message is displayed and linking is aborted A fatal message indicates a severe error Linker messages are identified by a message code L for linker and a 4 to 5 digit number Messages are documented in increasing order Each message is described by its type a description an example if available and tips to fix a problem User s Manual MCUez Linker 108 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 1 L1 Unknown Message Occurred Type Fatal Description The linker tried to emit an undefined message This is an internal error Tip None 6 3 2 L2 Message Overflow Skipping lt type gt Messages Type Information Description The maximum number of messages of a specific type have been displayed The number of messages to display is controlled by the WmsgNi WmsgNw and WmsgNe options Tip Increase maximum setting in the Message tab of the Option Settings dialog box 6 3 3 L64 Line Continuation Occurred in lt FileName gt Type Information Description In a parameter file the back slash character at the end of a path is interpreted as a line continuation function The MS DOS path separa
125. ing L1304 lt File gt is not a valid Hex file L1305 lt File gt is not an ELF format object file ELF obje Errar L1400 Incompatible processor lt Processor gt in previot L1401 Incompatible memory model lt Model gt in previo 11403 Unknown processor lt Processor gt Default L1404 Unknown memory model lt Model gt L1501 lt Object gt cannot be moved in section lt Sectior y b Reset All Figure 2 9 Message Settings Dialog Box MCUez Linker 32 Graphical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Linker Graphical User Interface Table 2 3 Message Group Definitions Message Group Description Lists all disabled messages Messages displayed in this list box Disabled will not be generated by the linker Lists all information messages Information messages depict Information i action taken by the linker Lists all warning messages When such a message is Warning generated linking continues and an absolute file is generated Lists all error messages When such a message is generated Error linking of the input application continues but no absolute file will be generated Lists all fatal error messages When such a message is Fatal generated linking stops immediately Each message has a character L for linker message followed by a 4 to 5 digit number This n
126. init function is available The init function defines the entry point in the application This function is required for ANSI C and assembly applications Usually the init function is called _ Startup but a personal init function can be defined using the linker command INIT Tip Provide application with the requested function MCUez Linker User s Manual MOTOROLA Linker Messages 137 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 38 L1118 Vector Allocated at Absolute Address lt Address gt Overlaps with Another Vector or an Absolute Allocated Object Type Error Description A vector overlaps with an absolute object or another vector Example l ERROR Vector allocated at absolute address OxXFFFE overlaps with another vector or an absolute allocated object LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OXAFF MY_STK READ_WRITE OxBOO TO OxBFF END PLACEMENT text rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup VECTOR ADDRESS OXFFFF 0x000A Tip Move the object or vector to a free position User s Manual MCuUez Linker 138 Linker Messages MOTOROLA For More Information On This
127. ircancrrisa 163 G20 LIGA Numbertog Bigscscsvscedseds revs ssurceessceress 164 6 3 75 L1624 Ident too Long Cut after 31 Characters 164 6 3 76 L1625 Comment not Closed cccccceesiewerie tinge oaee8 164 So L1G20 Unexpected End Of Pile wes cuss russian 164 6 3 78 L1627 PRESTART Command not Supported Yet 165 6 3 79 L1628 HEXFILE Command not Supported Yet 165 6 3 80 L1629 START_DATA Command not Supported Yet 165 6 3 81 L1700 File lt Filename gt Should Contain DWARF Informati h 22 ccs nteceasdigisvaciassdnes 165 6 3 82 L1701 Startup Data Structure is Empty 2 is cuncdcnciwes en 166 63 25 L11800 Read Error in Mile i icrocirorireceriitinreredsa 166 6 3 84 L1803 Out of Memory in lt Function Name gt 166 6 3 85 1L1804 No ELF Section Header Table Found in lt Filename gt 166 6 3 86 L1806 ELF File lt Filename gt Appears to be Corrupted 167 6 3 87 L1808 String Overflow in lt Function Name gt LO A eee se eeesackuase 167 6 3 88 L1809 Section lt Section Name gt Located in a Segment with Inyalid SEE oc ridad 167 6 3 89 L1811 Symbol lt Symbol Number gt lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt 167 6 3 90 L1818 Symbol lt Symbol Number gt lt Symbol Name gt Duplicated in lt First Filename gt and lt Second Filename gt 168 6 3 91 L1820 Weak Symbol lt Symbol Name gt Duplicated in lt Fir
128. ize equal to one byte are aligned on a 1 byte boundary and all other objects are aligned on a 2 byte boundary e Inside of segment RAM_2 all objects with size equal to two or three bytes are aligned on a 2 byte boundary and all objects bigger or equal to four are aligned on a 4 byte boundary One byte objects follow the default processor alignment rule e Inside segment RAM_3 all objects bigger or equal to two bytes are aligned on a 2 byte boundary and all other objects are aligned on a 1 byte boundary User s Manual MCUez Linker 58 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands 4 4 7 3 Segment Fill Pattern A fill pattern can be associated with each segment in the application This may be useful to automatically initialize uninitialized variables in the segments with a predefined pattern For assembly applications the fill pattern can be used only in READ_ONLY segments The default fill pattern for code and data segments is the null character Users can define their own fill pattern for a segment The fill pattern definition in the segment block overrides the default fill pattern A fill pattern can be defined for the READ_WRITE memory area only when linking a high level language ANSI C C application A fill pattern can be specified like this Syntax FIL
129. l NAMES lt FileName gt lt FileName gt END The NAMES block contains the list of all binary files building the application This is the only place absolute library or object library files can be specified This block is mandatory and can be specified only once in a prm file The linker reads all files given between NAMES and END The files are searched for in the project directory then in the directories specified in the environment variables OBJPATH LIBPATH and GENPATH The files may be either object files absolute files or libraries Since the linker is a smart linker only referenced objects variables and functions are linked to the application A plus sign after a filename for example FileName switches off smart linking for the specified file No blank space is allowed between the filename and the plus sign All objects defined in this file will be linked with the application regardless of whether they are used or not This is equivalent to specifying the filename followed by a FileName in the ENTRIES block LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x1000 TO Ox18FF MY_ROM READ_ONLY 0x8000 TO Ox8FEF MY_STK READ_WRITE 0x1900 TO Ox1FEFF PLACEMENT DEFAULT_ROM INTO MY_ROM DEFAULT_RAM INTO MY_RAM SSTACK INTO MY_STK END VECTOR ADDRESS OxFFFE _Startup set reset vector In
130. le LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x8 MY ROM READ ONLY 0x8 MY_STK READ_WRITE OxB END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END OBJECT_ALLOCATION fiboCount AT 0xC00 END Set reset vector on _Sta VECTOR ADDRESS OxFFFE _Star nt overlaps with segment 00 TO Ox80F 10 TO OxAFF 00 TO OxBFF MY_ROM rtup tup 00 TO 0x80F 10 TO OxAFF 00 TO OxBFF rtup tup NOTE An absolute object can also be placed in a segment where no sections are assigned User s Manual MCUez Linker 126 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Example Freescale Semiconductor Inc Linker Messages Linker Messages Reference LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x800 TO Ox80F MY_ROM READ_ONL 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OXBFF ABS_MEM READ_WRITE 0xC00 TO OxCOF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END OBJECT_ALLOCATION fiboCount AT 0xC00 END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup 6 3 28 L1105 Absolute Object lt object name gt Overlaps with Another Absolute Allocated Object or with a Vector Type Description Example MCUez Linker Tip
131. linker will look for the prm file in the project directory then in the directories listed in the environment variable GENPATH The object and library files specified in the linker prm file are searched for in the project directory then in directories listed in the environment variables OBJPATH and LIBPATH and finally in directories specified in GENPATH If a directory specification starts with an asterisk the directory tree is searched recursively Within one level in the tree the search order of the subdirectories is indeterminate Example MCUez Shell GENPATH obj lib Click the Change button to open the Current Configuration dialog box Select the Paths tab In the Configure selection box select General Path Enter directories in the list box one directory on each line MCUez Linker 98 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com 5 5 2 OBJPATH 5 5 3 LIBPATH MCUez Linker Freescale Semiconductor Inc Environment Variables Variable Descriptions Syntax OBJPATH lt path gt Arguments lt path gt Paths separated by semicolons without spaces Description The linker searches the project directory for the object files specified in the linker prm file The linker then searches the directories specified in the environment variables OBJPATH and GENPATH Example OBJPATH sources bin headers MCUez Shell Select Change
132. located at address 0x002 is initialized with the absolute address OXxA00 MCUez Linker User s Manual MOTOROLA Operating Procedures 71 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Example The user can specify an additional offset when the vector target is a function name In this case the vector will be initialized with the address of the object plus the specified offset VECTOR ADDRESS OxFFFE CommonISR 0x10 In the previous example the vector located at address OxFFE is initialized with the address of the function Common ISR plus 0x10 bytes If Common ISR starts at address 0x800 the vector will be initialized with 0x810 This notation is useful for the common interrupt handler All objects specified in a VECTOR command are entry points in the application They are always linked with the application as well as the objects they refer to 4 4 11 1 Initializing Vector Table in Linker Parameter File Example User s Manual Initializing the vector table from the parameter file allows initialization of single entries in the table shown in next example The user can initialize all entries in the vector table The labels or functions must be inserted in the vector table and implemented in the assembly source file All labels must be published otherwise they cannot be addressed in the linker parameter file XDEF TRQOFunc XIRQOFunc SWIFu
133. lue 69 4 4 11 VECTOR Initialize Vector Tables s6 054sa0ehee0saeos oes 70 4 4 11 1 Initializing Vector Table in Linker Parameter File 72 4 4 11 2 Initializing Vector Table in Assembly Source File Using a Relocatable Sect 445 podar 74 4 4 11 3 Initializing Vector Table in Assembly Source File Using an Absolute Secon coosmcosionsrarricr rra 76 User s Manual MOTOROLA Operating Procedures 41 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures 4 2 Introduction 4 3 Parameter File 4 5 SAR LINN cichecrdvaredciGaseesdiReseees air 79 4 5 1 Mandatory Linking from an Object ooo ooooooooooo 79 4 5 2 Mandatory Linking from All Objects Defined in a File 80 4 5 3 Switching Off Smart Linking for the Application 80 4 5 4 Linking an Assembly Application 2 2 002 lt esseeescdesivs 80 4 5 5 Warming Messages x44 2c he rt ARAS 81 4 6 Program AA 84 4 6 1 Startup Desens cepedirerreraair anrea ere e epas 84 4 6 2 User Defined Starp SMUCUTE sc cesoorosicrir bysa wirta 87 4 6 3 User Defined Startup Routines 444266240461 e4eeebseeeeees 88 This section provides operating procedures for the MCUez linker The linker parameter file prm is an ASCII text file that is required for each application It contains linker commands that define the linking process This section describes the parameter file in detail giving exa
134. ly modules 4 5 5 Warning Messages An assembly application does not need a startup structure or root function Ignore these two warnings WARNING _startupData not found and WARNING Function main not found Smart Linking When an assembly application is linked smart linking is performed on section level instead of object level Sections containing referenced objects are linked with the application MCUez Linker User s Manual MOTOROLA Operating Procedures 81 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Examples for HC12 Assembly source file XDEF entry dataSecl SECTION datal DS W 1 dataSec2 SECTION data2 DS W 2 codeSec SECTION entry NOP NOP LDX datal LDD 5645 STD 07 X loop BRA loop Linker prm file LINK test abs NAMES test o END SEGMENTS RAM_AREA READ_WRITE 0x00300 TO Ox0O7FFF ROM_AREA READ_ONLY 0x08000 TO OXxOFFFF END PLACEMENT data INTO RAM_AREA text INTO ROM_AREA END INIT entry VECTOR ADDRESS OxFFE entry In the previous examples The ENTRY function is defined as an application entry point and also specified as a reset vector e The data section dataSec1 defined in the assembly input file is allocated in the segment RAM_AREA at address 0x300 This secti
135. mand Line Lists Commands Context Help eS eae j Displays Help File Options Saves Current Configuration Dialog Box Loads a Configuration Executes Link Process Figure 2 4 MCUez Linker Toolbar The content area displays information about the link session This information consists of e The name of the prm parameter file being linked e The name including full path of the files building the application e A list of error warning and information messages Additional information is available for all lines related to errors Double click on a line to open the related file in the project editor or select the line and click the right mouse button to open a menu If the menu contains an Open entry for the selected line it will open the related file and highlight the line that has an error See 2 3 5 Specifying the Input File MCUez Linker 26 Graphical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Linker Graphical User Interface 2 3 3 Status Bar Figure 2 5 shows the linker status bar Change Linker options 20 38 12 y j Status Bar t Message Field Current Time Provides status info and brief description of menu options and toolbar buttons Figure 2 5 MCUez Linker Status Bar 2 3 4 Menu Bar The menus listed in Table 2 1 are available on the menu bar Refer to Figure 2 3 for an illustration of the
136. ments specified in the PLACEMENT block Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM STACKTOP OxBFE Set reset vector on _Startup VECTOR ADDRESS OxFFFE tartup n MCUez Linker User s Manual MOTOROLA Linker Messages 153 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 54 L1207 STACKSIZE Command is Missing Type Error Description The stack is defined by placing the stack section ina READ_WRITE or NO_INIT segment although the stack section is not alone in the section list In this case a STACKSIZE command is required to specify the stack size Example A ERROR STACKSIZE command is missing LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_ RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data stack INTO STK 17 END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Specify the stack size in a STACKSIZE command User s Manual MCUez Linker
137. menu bar Table 2 1 Menu List Menu Entry Description File Linker configuration file management Linker Linker option settings View Linker window settings Help Standard windows help menu 2 3 4 1 File Menu The File menu provides options to manage project configuration files Typical linker settings in the project ini file consist of e Settings specified in the Options Settings dialog box e Editor associated with the linker Linker configuration information is stored in the project ini file under the LINKER and EDITOR sections MCUez Linker User s Manual MOTOROLA Graphical User Interface GUI 27 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI Project configuration files are ASCII files with a ini extension The user can define as many of these files as needed for a project Switch between different configuration files by selecting File Load Configuration and File Save Configuration or by clicking the corresponding toolbar buttons Select File Linker to open a standard Open File dialog box that displays a list of all prm files in the project directory Select the input file to be linked and click OK Select File New Default Configuration to reset the linker settings to the values contained in the current project ini file Select File Load Configuration to open the Open File dialog box and display a list of
138. mples that can be used as templates Also refer to the example parameter files included during the MCUez installation 4 3 1 Syntax of the Parameter File User s Manual This is the EBNF Extended Backus Naur Form syntax of the parameter file ParameterFile Command Command LINK NameOfABSFile NAMES ObjFile ObjFile END SEGMENTS SegmentDef END PLACEMENT Placement END STACKTOP STACKSIZE exp IAPFILE MapSecSpecList ENTRIES EntrySpec EntrySpec END VECTOR InitByAddr InitByNumber MCUez Linker 42 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Parameter File INIT FuncName MAIN FuncName NameOfABSFile FileName ObjFile FileName ObjName Ident QualIden FileName Ident FuncName ObjName QualIdent apSecSpecList MapSecSpec MapSecSpec EntrySpec FileName Ob jName apSecSpec ALL NONE TARGET FILE STARTUP SEC_ALLOC OBJ_ALLOC OBJ_DEP OBJ_UNUSED COPYDOWN STATISTIC SegmentDef SegmentName SegmentSpec SegmentName Ident SegmentSpec StorageDevice Range Alignment FILL CharacterList StorageDevice READ_ONLY READ WRITE PAGED NO_INIT T Range exp TO SIZE exp Alignment
139. n The linker creates a temporary file in the current directory when prescanning the linker parameter file If this fails the linker cannot continue Tip Enable read access to linker files in the current directory 6 3 129 L4007 Include File Nesting too Deep in Link Parameter File Type Error Description Include files can only be nested six deep 6 3 130 L4008 Include File lt includefile gt not Found Type Error Description The include file lt includefile gt was not found User s Manual MCUez Linker 178 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker MCUez Linker Index Symbols OS aie saree see et is E AA Gata eee Eee 19 38 CODY aida pteee owen asaedapt ss ieoketes ede nthe O EEEa 65 85 A nO a a a 65 66 WIAD io eee AA ESE RSET EE Re AAA AAA 38 PI es ead Boke isos A ieee ee a HOUMA cin oak fa chee ee Ree AK Sede Aid add 65 a A y cteyeo e Wkne sh Ain seed Pale oes Aa dae eo eae ee eS 65 IS in fee ek GSR PARA aa A LAGS ENDED AER AT AA AAA EE EGA 38 E shecanex 38 O E ee ee ee ee ee ere ee 38 SACK AE o eee been seeaSe re See PSE E ee Sere eee sees 65 TADA ca rd ds askew entre erate dades leia dot 65 85 Vi A ee ee A Se ere ee ARA AAA AA A 38 a ene aye PARAS PS ae MS E 65 A Absoltit Fll ocios a a ia SAS 19 38 47 52 ABSPATE perra al irene 38 44 Application Startup also see Startup
140. n Too Many Objects or Code Linked 122 L10050 Rinne EROS cs roren riwttti 122 L11052 User Requested StoP si02cseeideo senna rad 122 L1100 Segments lt Segmentl Name gt and lt Sepments Name gt Overlap ocvsccisicispic sinsaa 123 User s Manual MOTOROLA Linker Messages 103 For More Information On This Product Go to www freescale com User s Manual Freescale Semiconductor Inc Linker Messages 6 3 25 6 3 26 6 3 27 6 3 28 6 3 29 6 3 30 6 3 31 6 3 32 6333 6 3 34 6 3 35 6 3 36 6317 6 3 38 6 3 39 6 3 40 6 3 41 6 3 42 6 3 43 6 3 44 L1102 Out of Allocation Space in Segment lt Segment Name gt at Address lt First Address Free gt csi cs cia rociar ed 124 L1103 lt Section Name gt not Specified in PLACEMENT Bae dar A 125 L1104 Absolute Object lt Object Name gt Overlaps with Segment lt Segment Name gt 06 126 L1105 Absolute Object lt object name gt Overlaps with Another Absolute Allocated Object OP TOE VOC da AAA 127 L1106 lt Object Name gt not Found 224 cdeecins bi edoewedes 128 L1107 lt Object Name gt not Found 2 64 6 e008 die eeeeouen 129 L1109 lt Segment Name gt Appears Twice ii SEGMENTY Blok crio 130 L1110 lt Segment Name gt Appears Twice in PLACEMENT Block 30 caera 131 L1111 lt Section Name gt Appears Twice in PLACEMENT Block osmosis 132 L1112 lt Section name gt Section Has Segment Type lt Se
141. n the environment variables OBJPATH or GENPATH or in the project directory User s Manual MCuUez Linker 168 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 94 L1823 External Object lt Symbol Name gt in lt Filename gt Created by Default Type Warning Description The specified symbol is referenced in the file but not defined in the application However an external declaration for this object is available in at least one of the binary files The object should be defined in the first binary file where it is externally defined This is only valid for ANSI C applications In this case an external definition for a variable var is extern int var The definition of the corresponding variable is int var Tip Define the specified symbol in one of the files building the application 6 3 95 L1824 Invalid Mark Type for lt Ident gt Type Error Description Internal error The object file is corrupt Tip Recompile sources and contact a Motorola representative if error occurs again 6 3 96 L1826 Can t Read File lt Filename gt is not an ELF Library Containing ELF Objects ELF Objects Expected Type Error Description The specified file is not a valid library The linker is only able to link uniform binary files together Tip Recompile the source file to ELF object file format 6 3 97 L
142. n the startup structure the field initBodies must not be present initBodies A pointer to a vector of function pointers containing addresses of the global C constructors They are sorted in the order they need to be called It has exactly nofInitBodies elements If an application does not contain any C modules the vector is empty This field is not required if the application does not contain C modules If this field is not present in the startup structure the field nofInitBodies must not be present 4 6 2 User Defined Startup Structure The user can define a startup structure If the startup structure is changed adapt the startup function to match the modifications Example If there is no RAM area to initialize at startup and no ROM libraries and C modules the user can define the startup structure as follows extern struct _tagStartup unsigned short flags _PFunc main unsigned short stackOffset _startupData MCUez Linker User s Manual MOTOROLA Operating Procedures 87 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures The startup code must be adapted accordingly extern void near _Startup void purpose 1 initialize the stack 2 call main parameters NONE do forever initialize program call root procedure asm LDD startupData flags BNE Initialize LDS star
143. name the section and recompile 6 3 110 L1919 Duplicate Definition of lt Object gt in Library File s lt File1 gt and or lt File2 gt Discarded Type Description User s Manual Tip Warning An object definition is duplicated in a library Rename one of the objects and recompile MCUez Linker 172 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 111 L1921 Marking Too Many Nested Procedure Calls Type Description Tip Error The object file is corrupt Recompile and try to link again 6 3 112 L1922 File lt filename gt Has DWARF Data of Different Version DWARF Data may not be Generated Type Description Tip Warning The linked files have different versions of debug information sections ELF DWARF When linking object files from different vendors this message might occur if the linker does not recognize the debug info in all object files This message may also appear if some object files do not have debug information The generated absolute file may have some correct debug information but probably not for all modules Recompile with one version for output 6 3 113 L1927 Fixups for DWARF Section lt sectionname gt not Correctly Generated Type Description Tip Error The linker has problems in generating fixups for a specific DWARF debug s
144. nc OpCodeFunc ResetFunc DataSec SECTION Data DS W 5 Each interrupt increments another table element CodeSec SECTION Implementation of the interrupt functions IROFunc LDAB 0 BRA int XIRQOFunc LDAB 2 BRA int SWiFunc LDAB 4 BRA int OpCodeFunc LDAB 6 BRA int MCUez Linker 72 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ResetFunc LDAB 8 BRA entry int ABX 7X RTI entry LDS SAFE loop BRA loop Operating Procedures Linker Commands LDX Data Load address of symbol Data in X address of element in table INC 0 X The table element is incremented NOTE The functions IROFunc XIROFunc SWIFunc OpCodeFunc and ResetFunc are published This is required because they are referenced in the PRM file Since the HC12 processor automatically pushes all registers on the stack when an interrupt occurs the interrupt function does not need to save and restore the registers it is using All interrupt functions must be terminated with an RTI return from interrupt instruction The vector table is initialized using the linker command VECTOR ADDRESS Example LINK test abs NAMES testo END SEGMENTS MY_ROM READ_ONLY 0x080
145. nge In the linker parameter file each section is associated with a segment so the linker knows where to allocate objects belonging to a section A programmer may decide to organize data into sections e To enhance application structure e To ensure that common purpose data is grouped together e To take advantage of target processor specific addressing mode PLACEMENT SectionName sectionName INTO SegSpec SegSpec SectionName sectionName INTO SegSpec SegSpec END The PLACEMENT block is mandatory in a prm file Each placement statement between the PLACEMENT and END defines a relation between logical sections and physical memory ranges called segments SEGMENTS MY_RAM READ_WRITE 0x1000 TO Ox18FF ROM_1 READ ONLY 0Ox8000 TO Ox8FFF END PLACEMENT text rodata INTO ROM_1 END In the previous example objects from section text are allocated first and then objects from section rodata are allocated into segment ROM_1 Starting with the first section objects are allocated in the first memory range in the list If a segment is full allocation continues in the next segment User s Manual MOTOROLA Operating Procedures 61 For More Information On This Product Go to www freescale com User s Manual Example Freescale Semiconductor Inc Operating Procedures SEGMENTS MY_RAM READ_WRITE 0x10
146. ntax Description Example INIT FuncName The INIT command is recommended for an assembly application and can only be specified once in the PRM file This command defines the entry point for the application When INIT is not specified in the PRM file the linker looks for a function named _Startup and uses it as the application entry point If an NIT command is specified in the PRM file the linker uses the specified function as the application entry point Specify any static or global function as an entry point INIT MyGlobStart Specify a global variable as application entry point INIT myFile o myLocStart Specify a local variable as application entry point Local symbols defined in an assembly module cannot be specified as an entry point for an application 4 4 3 LINK Specify Name of Output File Syntax Description MCUez Linker LINK lt NameOfABSFile gt The LINK command defines the file to be generated by the link session This command is mandatory and can be specified only once in a PRM file After a successful link session the output file is created If the environment variable ABSPATH is defined the absolute file is generated in the first directory assigned to the variable Otherwise it is written to the directory where the parameter file was found If a file with this name already exists it is overwritten User s Manual MOTO
147. nual MCUez Linker 16 List of Figures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker List of Tables Table Title Page 2 1 A AnS 27 Pe o o rreratu pa ENEON EARE EL 31 2 3 Message Group Definitions 2 3 copiar d seen r EY 33 4 1 ENTRIES Block Supported seus ileso roces 46 a2 Map Pi Sections sensacion 50 d A FS Oe erstes raid 51 44 Segment Qualifier Descriptions n se senna neurea 55 4 5 Segment Alignment Rule Format 0 0 0 0008 56 4 6 Segment Alignment Items LiSt ocopoocomosrossinasinsoros 58 a7 VECTOR Command Syntax seses easan ens eewew oad ws 71 4 8 Setting Startup Descriptor FlagS o oooooooomoo 85 MCUez Linker User s Manual MOTOROLA List of Tables 17 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc List of Tables User s Manual MCUez Linker 18 List of Tables MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker 1 1 Contents 1 2 Introduction Section 1 General Information Lae TOIL AA 19 1 3 cta E MAA eh ese ee ee aes 19 1 4 O AA 20 1 5 Typographic Styles in This Manual occiso 20 This manual describes Motorola s MCUez linker The linker merges the various object files of an application into one file an absolute fil
148. o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Define the stack in one of the three ways specified NOTE Ifthe programmer initializes the stack pointer inside the source code initialization from the linker will be overridden MCUez Linker User s Manual MOTOROLA Linker Messages For More Information On This Product Go to www freescale com 147 Freescale Semiconductor Inc Linker Messages 6 3 49 L1202 Stack Cannot Be Allocated on More Than One Segment Type Error Description The section stack is specified on a PLACEMENT line where several segments are listed This is not allowed because the memory area reserved for the stack must be contiguous and cannot be split over different memory ranges Example x ERROR stack cannot be allocated on more than one seg LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE OxBOO TO OXxBFF STK_2 READ_WRITE 0xD00 TO OXDFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO STK_1 STK_2 END Set reset vector on
149. ode for the NOP instruction High level language LINK test abs C C Example NAMES test o startup o END SEGMENTS DIRECT_RAM READ_WRITE 0x00000 TO Ox000FF FILL OxAA RAM_AREA READ _WRITE 0x00100 TO 0x07FFF FILL 0x22 ROM_AREA READ_ONLY 0x08000 TO OxOFFFF END PLACEMENT myRegister INTO DIRECT_RAM data INTO RAM_AREA etext INTO ROM_AREA END STACKSIZE 0x50 In the previous example In DIRECT_RAM alignment bytes between objects are initialized with OxAA In RAM_AREA alignment bytes are initialized with 0x22 e In ROM_AREA alignment bytes are initialized with 0x00 User s Manual MCUez Linker 60 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands 4 4 8 PLACEMENT Place Sections into Segments Description MCUez Linker Syntax Example The PLACEMENT block allows the user to physically place each section in a specific memory area segment The sections specified in a PLACEMENT block may be linker predefined sections or user sections specified in one of the source files used to build the application A section is a named group of global objects declared in the source file such as functions and global variables A segment is not necessarily a contiguous memory ra
150. on lt Option Name gt Type Warning Description This message is generated when a command line option overrides a command in the parameter file lt command name gt Name of the command in the prm file lt option name gt Linker command line option Commands that may be overridden by a command line option are e LINK Overridden by the option O defines the output filename MAPFILE Overridden by the option M enables generation of the map file e INIT Overridden by the option E defines the application entry point When the LINK command is detected in the parameter file and the option O is specified on the command line this message is generated Command LINK overwritten by option O User s Manual MCUez Linker 112 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 7 L1003 Only a Single SEGMENTS or SECTIONS Block is Allowed Type Error Description This error occurs when the parameter file contains both a SECTIONS and a SEGMENTS block The SECTIONS block is a synonym for the SEGMENTS block It is supported for compatibility with an older version of the parameter file Example LINK fibo abs NAMES fibo o startl2s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO
151. on is linked with the application because the label data1 is referenced in the function entry User s Manual MCUez Linker 82 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Smart Linking e The code section codeSec defined in the assembly input file is allocated in the segment ROM_AREA at address 0x8000 It is linked with the application because ent ry is the application entry point e The data section dataSec2 defined in the assembly input file is not linked with the application because the symbol dat a2 is never referenced The user can choose to switch smart linking off so that assembly code and objects will be linked with the application For the previous example the parameter file used to switch smart linking off will look like this LINK test abs NAMES test o END SEGMENTS RAM_AREA READ_WRITE 0x00300 TO Ox0O7FFF ROM_AREA READ_ONLY 0x08000 TO OXxOFFFF END PLACEMENT data INTO RAM_AREA text INTO ROM_AREA END INIT entry VECTOR ADDRESS OxFFE entry ENTRIES END In the previous example e The ENTRY function is defined as an application entry point and also specified as a reset vector e The data section dataSec1 defined in the assembly input file is allocated in the segment RAM_AR
152. oooooo o 177 L4004 Linking lt PRM File gt as ELF DWARF Format Link Parameter File escitas nr rr dea 178 L4005 Illegal File Format of Object File lt objFile gt WNAMES LS rs AAN 178 L4006 Failed to Create Temporary Pile 2s oscescd uns iy 178 L4007 Include File Nesting too Deep in Link Parameter File 178 L4008 Include File lt includefile gt not Found 178 Index Wet ho E PE ET E ane A P Gene 179 MCUez Linker 14 Table of Contents MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker MCUez Linker Figure 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 1 5 1 List of Figures Title Page o O MAA 24 MC Vez Linker Tip of the Day WindoW cirocoricerears as 24 M CUez Linker Main Window sos 064558eerebssees oes eegerey 25 AC Clee Linker LOOSE ee dew isit dr IA ewe EE ERINES INE 26 MCUez Linker Status RARA aT Configuration Dialog BOX eses correr es es shee se oe 4 29 Save Configuration Dialog BOX 2 6 0ssceiccdaeiescenessavi sees 30 Option Settings Dialog BOX 0 ERA AS 31 Message Settings Dialog Dor cri 32 Related Linker Files and Location cis ARA 39 Linker Command Lie sspe perser ttrt iph r ERI ETE REI RETI 90 User s Manual MOTOROLA List of Figures 15 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc List of Figures User s Ma
153. or in lt Object gt Type lt objType gt o ARA 171 L1910 Invalid Section Attribute for Program Header 171 L1911 Program Header End is not Aligned gn he Endof a Seton beer sir 171 L1912 Object lt obj gt Overlaps with Another last addr lt addr gt Object Address lt objadr gt 171 L1913 Object Filler Overlaps with Something Else 171 L1914 Invalid Object lt Object gt cs wciceccseneteasiaaass 172 L1915 Gap in lt Ident gt at lt address gt before lt Object gt is too Big 172 L1916 Section Name lt Section gt is too Long Name is Cut to 90 Characters Length 172 L1919 Duplicate Definition of lt Object gt in Library File s lt Filel gt and or lt File2 gt Discarded cisocrsrrcsicos ars 172 L1921 Marking Too Many Nested Procedure Calls 173 L1922 File lt filename gt Has DWARF Data of Different Version DWARF Data may not e Cen AA 173 L1927 Fixups for DWARF Section lt sectionname gt mot Comectly Generated soscrcoorissirccrsrs area 173 L1928 Limitation Code Size lt num gt nsnsnrne nnan 173 L1929 Limitation Too many Mections lt num gt 174 L1930 Unknown Fixup Type in lt ident gt Type lt type gt A Se SO AA 174 L1931 Program Header Begin is not Aligned on the Beginning of a Section on noose esa eesenviaere as 174 L1932 Program Header Overflow in lt name gt at lt index gt 174 L1933 ELF lt details gt
154. ormation Description No error occurred during the linking process The destination absolute file and map file have been created by the linker MCUez Linker User s Manual MOTOROLA Linker Messages 121 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 21 L1039 Limited Version Too Many Objects or Code Linked Type Error Description This message indicates that the user is running a demo version The limits for demo versions are e 1024 bytes of code Maximum of 32 global objects linked 6 3 22 L1050 Running lt versiontype gt Type Information Description This message indicates that the user is running a special version of the linker for example a time limited version 6 3 23 L1052 User Requested Stop Type Error Description The user has clicked the Stop button in the toolbar The linker stops execution as soon as possible User s Manual MCUez Linker 122 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 24 L1100 Segments lt Segment1 Name gt and lt Segment2 Name gt Overlap Type Error Description Two segments defined in the PRM file overlap each other e lt segmentl name gt Name of the first overlapping segment e lt segment2 name gt Name of the second overlapping segment Example A S
155. orrectly e Check if paths are defined correctly The parameter file must be located in one of the paths listed in the environment variable GENPATH or in the project directory MCUez Linker User s Manual MOTOROLA Linker Messages 155 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 57 L1303 lt Filename gt is not a Valid ELF File Type Error Description The specified file is not a valid ELF binary file The linker is only able to link ELF binary files Tips e Check that the specified file has been compiled or assembled with the correct option to generate an ELF binary file e Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory 6 3 58 L1304 lt Filename gt is not a Valid Hex File Type Error Description The file specified in a HEXFILE command is not a valid hex file Tips Ensure that the file was generated correctly Ensure that paths are defined correctly The hex files must be located in one of the paths listed in the environment variable OBJPATH or GENPATH or in the working directory 6 3 59 L1305 lt Filename gt is not an ELF Format Object File ELF Object File Expected Type Error Description The specified file is not an ELF binary file The linker is only able to link ELF binary files Tips Ensure that the sp
156. put generated Input Lists options related to input files Messages Lists options that control generation of error messages User s Manual MOTOROLA Graphical User Interface GUI 31 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI NOTE User s Manual When options requiring additional parameters are selected an edit box or subwindow appears in the dialog box Check options to be defined and enter additional information if applicable to that option Click OK to activate selected options However save settings to the project ini file by using the Configuraton dialog as mentioned in 2 3 4 1 File Menu Figure 2 9 shows the Message Settings dialog box This dialog box allows the user to map linker messages to a different message class For example a linker message such as L1404 Unknown memory model lt Model gt can be specified as a warning message instead of an error message Table 2 3 identifies and defines each message class Message Settings x Disabled Information Waming Error Fatal L1205 STACKTOP command incompatible with stack a Move to L1206 stack overlaps with a segment which appear ii Disabled L1207 STACKSIZE command is missing L1301 Cannot open file lt File gt 4 Information 11302 File lt File gt not found 11303 lt File gt is not a valid ELF file Warm
157. r in several lines in the PLACEMENT block if it is the only segment specified in the segment list Sections specified in both PLACEMENT lines are merged into one list of sections which are allocated in the specified segment Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ WRITE 0x800 TO 0x80F MY ROM READ _ ONLY 0x810 TO OxAFF MY_STK READ WRITE OxBOO TO OxBFF ROM_2 READ ONLY 0x500 TO Ox7FF END PLACEMENT text rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK codeSecl codeSec2 INTO ROM_2 MY_ROM ERROR MY_ROM appears twice in PLACEMENT block END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Remove one instance of the segment from the PLACEMENT block MCUez Linker User s Manual MOTOROLA Linker Messages For More Information On This Product Go to www freescale com 131 Freescale Semiconductor Inc Linker Messages 6 3 33 L1111 lt Section Name gt Appears Twice in PLACEMENT Block Type Error Description The specified section appears multiple times in a PLACEMENT block Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OXxAFF MY STK READ WRITE O
158. r the rest of the RAM area and another one for the ROM area LINK test abs NAMES test o startup o END SEGMENTS DIRECT_RAM vs EAD_WRITE 0x00000 TO OxOOOFF RAM_AREA READ_WRITE 0x00100 TO Ox0O7FFF ROM_AREA READ_ONLY 0x08000 TO OXxOFFFF END PLACEMENT myRegister INTO DIRECT_RAM data INTO RAM_AREA text INTO ROM_AREA END STACKSIZE 0x50 User s Manual MCUez Linker 54 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands 4 4 7 1 Segment Qualifier Different qualifiers are available for segments Table 4 4 identifies and defines all available qualifiers Table 4 4 Segment Qualifier Descriptions Qualifier Meaning Qualifies a segment where read only access is allowed Objects READ ONCY within such a segment are initialized at application loading time Qualifies a segment where read and write accesses are allowed Objects within such a segment are initialized at application startup This is only the case when linking a high level language ANSI C or C application READ_WRITE Qualifies a segment where read and write accesses are allowed Objects within such a segment remain unchanged during application startup This qualifier may be used for segments referring to
159. rent Configuration dialog box Select the Paths tab In the Configure selection box select Absolute Enter directories in the list box one directory on each line Syntax TEXTPATH lt path gt Arguments lt path gt Paths separated by semicolons without spaces Description Set this environment variable to store the map file created by the linker in the first directory specified If TEXTPATH is not set the generated map file will be stored in the directory where the prm file is located Example TEXTPATH sources usr local txt MCUez Shell Click the Change button to open the Current Configuration dialog box Select the Paths tab In the Configure box select Text Enter directories in the list box one directory on each line MCUez Linker 100 Environment Variables MOTOROLA For More Information On This Product Go to www freescale com 5 5 6 SRECORD NOTE MCUez Linker Freescale Semiconductor Inc Syntax Arguments Description Environment Variables Variable Descriptions SRECORD lt RecordType gt lt Record Type gt Specify the type of Motorola S record that must be generated The value can be S1 S2 or S3 When this environment variable is defined the linker will generate a Motorola S file containing records for the specified type S1 records when S1 is specified S2 records when S2 is specified and S3 records when S3 is specified If SRECORD is set the user is re
160. ress lt Address gt Overlaps with Another Vector or an Absolute Allocated DINO so ba seas rra 138 L1119 Vector Allocated at Absolute Address lt Address gt Overlaps with Sections Placed in Segment lt Segment AAA 139 L1120 Vector Allocated at Absolute Address lt Address gt Placed in Segment lt Segment Name gt Which Has No READ ONLY QUA pedorra 140 L1121 Out of Allocation Space at Address lt Address gt for COPY SOCUON se sascha cdeadecaseresiaseeuads hasten 140 L1122 Section copy Must Be Last Section in Section List 141 L1123 Invalid Range Defined for Segment lt Segment Name gt End Address Must Be Bigger Than Start Address 2 44 4 lt esesesseaseeass lt 142 L1124 or Should Directly Follow Filename 143 L1125 In Small Memory Model Code and Data Must Be Located on Bank 0 io 4 cscs weds wees wea eweess 144 L1127 Object Allocated Outside of Segment Bounds HC12 145 L1200 Both STACKTOP and STACKSIZE Defined 146 1 1201 No Stack Defined c ncocascana 147 L1202 Stack Cannot Be Allocated on More Than E hos ooo casa bed awe iwn dans IER 148 L1203 STACKSIZE Command Defines a Size of lt Size gt But stack Specifies a Stacksize of lt Size gt 149 L1204 STACKTOP Command Defines Initial Value of lt Stack Top gt But stack Specifies Initial Value OT CUM VAES AMA PP 151 L1205 STACKTOP Command Incompatible with stack Being Part of List of Sections
161. rst item to be copied from ROM to RAM at runtime All data to be copied is stored in a contiguous piece of ROM memory and has this format CopyData Sizeyy TargetAddr Byte 5 7 0x0 The size is a binary number whose most significant byte is stored first This field is not required No RAM memory area should be initialized at startup The number of ROM libraries linked with the application that must be initialized at startup This field is not required if no ROM libraries are linked with the application Be careful because if the nofLibInits field is not present in the startup structure the field 1ibInits must not be present MCUez Linker 86 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Program Startup libInits A vector of pointers to the _startupData records of all ROM libraries in the application It has exactly nofLibInits elements These addresses are needed to initialize the ROM libraries This field is not required if no ROM libraries are linked with the application NOTE Be careful because if the 1ibInits field is not present the field nofLibInits must not be present nofInitBodies The number of C global constructors that must be executed prior to invoking the application root function This field is not required if the application does not contain C modules If this field is not present i
162. rtl2s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F SEC_ROM READ_ONLY 0x020 TO Ox02F MY_ROM READ ONLY 0x810 TO OxAFF MY_STK READ_WRITE OxBOO TO OXxBFF END PLACEMENT data INTO MY_RAM text INTO MY_ROM SEC_ROM stack INTO MY_STK END Set reset vector on _Startup VECTOR ADDRESS OXFFFE _Startup User s Manual MOTOROLA Linker Messages 119 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 16 L1012 Segment is not Aligned on a lt bytes gt Boundary Type Warning Description Some targets M CORE require aligned access for some objects Example M CORE All 4 byte accesses must be aligned to four According to the EABI 8 byte doubles must be aligned to eight But if an 8 byte structure only contains chars then alignment is not needed Tip Check whether the section contains objects that must be aligned 6 3 17 L1015 No Binary Input File Specified Type Error Description No filenames specified in the NAMES block Example LINK fibo abs NAMES END SEGMENTS MY_RAM READ _WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END
163. ructure is not fixed by the linker and depends on the field and field position inside the user defined structure Tip Insert DWARF information and recompile the ANSI C file containing the startup structure definition MCUez Linker User s Manual MOTOROLA Linker Messages 165 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 82 L1701 Startup Data Structure is Empty Type Error Description The size of the user defined startup structure is O bytes Tip Check if a startup structure is needed If a startup structure is available ensure that the correct field name is listed 6 3 83 L1800 Read Error in lt File gt Type Error Description An error occurred while reading one of the ELF input object files The object file is corrupt Tip Recompile sources Contact a Motorola representative if the error appears again 6 3 84 L1803 Out of Memory in lt Function Name gt Type Error Description Insufficient memory to allocate the internal structure required by the linker 6 3 85 L1804 No ELF Section Header Table Found in lt Filename gt Type Error Description Section header table not detected in the binary file Tips e Ensure that the correct binary file is used e Check if paths are defined correctly The binary files must be located in one of the paths listed in the environment variables OBJPATH or GENPATH or in the project directory User s
164. s menu selection or the equivalent toolbar button Editor Configuration refers to the settings specified in the Editor Settings tab Appearance refers to the position and size of the linker window and the font specified in the View Log Change Font menu selection Check Save on Exit to save settings when exiting the MCUez linker Click the Save button to instantly save the settings or click Save As to save settings to a new project configuration file User s Manual MCUez Linker 30 Graphical User Interface GUI MOTOROLA For More Information On This Product Go to www freescale com 2 3 4 2 Linker Menu MCUez Linker Freescale Semiconductor Inc Graphical User Interface GUI Linker Graphical User Interface The Linker menu allows the user to define file and message options Linker Options and recategorize the class assigned to linker messages Linker Messages The Option Settings dialog box Figure 2 8 allows the user to set and reset linker options Available options are arranged in different groups Table 2 2 describes the option groups Option Settings Ed gropgesseseeceseseses Output Input Messages JGenerate a map file Specify the name of the output file Strip symbolic informations Cancel Help Figure 2 8 Option Settings Dialog Box Table 2 2 Option Groups Option Group Description Lists options related to generated output files type of files to be Out
165. s of variables copied to RAM at startup The second placement statement data INTO READ WRITE 0x800 TO Ox8FF reserves the address range from 0x800 to 0x8FF for allocation of variables 4 4 Linker Commands This section describes all linker commands 4 4 1 ENTRIES List of Objects to Link with Application Syntax Description MCUez Linker ENTRIES Filename ob jName The ENTRIES block is optional in a parameter PRM file Use the ENTRIES block to list objects referenced or not that are always linked with the application All objects referenced within these objects will also be linked with the application If a filename specified in the ENTRIES block is not present in the NAMES block the filename will be inserted in the list of binary files building the application The file specified in the ENTRIES block also may be present in the NAMES block Names of absolute ROM library or library files are not allowed in the ENTRIES block Table 4 1 identifies the syntax supported in the ENTRIES block User s Manual MOTOROLA Operating Procedures 45 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Table 4 1 ENTRIES Block Supported Syntax Meaning The specified global object will be linked with the lt Object Name gt E ai application The local object defined in the binary file will be linked with t
166. ser defined startup The application startup script is in a separate file written in inline assembly and can be easily modified The startup file is named startup c or startup o This is a generic filename that needs to be replaced by the real target startup file given in the LIB COMPILER directory Usually the filename is start c or start o where is the name or part of the MCU name and might also contain an abbreviation of the memory model Mixed language linking Modula 2 assembly and C object files can be mixed in the same application 1 5 Typographic Styles in This Manual These typographic conventions are used in this manual User s Manual Bold face type is used for literal strings that must be used exactly as shown in the example and for the names of menus windows dialog boxes icons and buttons Courier type face is used for all C code program listings command lines and directories Italics are used where the string is a place holder that may be substituted for a string of the user s own design Variable user inputs are in Courier italics Filenames are in italics with all lower case letters for example proj ext MCUez Linker 20 General Information MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc General Information Typographic Styles in This Manual These styles are used in this manual to define notational conventions
167. simplified For instance User s Manual No startup structure is required No stack initialization is required because the stack is directly initialized in the source file No main function is required An entry point in the application is required All symbols referenced in the prm file must be published specified in an XDEF directive No local symbol is defined in the assembler MCUez Linker 80 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Smart Linking Example LINK test abs NAMES test o test2 o END SEGMENTS DIRECT_RAM READ WRITE 0x00000 TO 0Ox000FF RAM _ AREA READ_WRITE 0x00300 TO OXxO7FFF ROM_AREA READ_ONLY 0x08000 TO OXOFFFF END PLACEMENT myRegister INTO DIRECT_RAM data INTO RAM_AREA ESXE INTO ROM_AREA END INIT Start Application entry point VECTOR ADDRESS OxFFFE Start Initialize Reset Vector In the previous example e All data sections defined in the assembly input files are allocated in the segment RAM_AREA e All code and constant sections defined in the assembly input files are allocated in the segment ROM_AREA e The START function defines an application entry point and a reset vector START must be a global symbol defined in one of the assemb
168. sponsible for specifying the appropriate S record type If S1 is specified while the code is loaded above OxF FFF the Motorola S file generated will not be correct since the addresses will be truncated to 2 byte values If this variable is not set the type of S record generated will depend on the size of the address loaded If the address can be coded on two bytes an Sl record is generated If the address is coded on three bytes an S2 record is generated Otherwise an S3 record is generated Example MCUez Shell SRECORD S2 Click the Change button to open the Current Configuration dialog box Select the Additional tab Enter the environment variable in the list box User s Manual MOTOROLA Environment Variables 101 For More Information On This Product Go to www freescale com 5 5 7 ERRORFILE User s Manual Freescale Semiconductor Inc Environment Variables Syntax Arguments Description Example MCUez Shell ERRORFILE lt filename gt lt filename gt Filename with format specifiers ERRORFILE specifies the error file used by the linker Possible format specifiers are Jon Substitute with the filename without the path p Substitute with the path of the source file f Substitute with the full path and filename ERRORFILE MyErrors err Writes all errors to the file MyErrors err in the project directory ERRORFILE tmp errors Writes all errors to the file
169. st Filename gt and lt Second Filename gt 168 6 3 92 L1821 Symbol lt id1 gt Conflicts with lt id2 gt in Pile Pile Same OE iia ees whee idrus 168 6 3 93 L1822 Symbol lt Symbol Name gt in File lt Filename gt a AAA ee ea eee es 168 6 3 94 L1823 External Object lt Symbol Name gt in lt Filename gt Created by Default asio osincidrasansric s robadas 169 6 3 95 L1824 Invalid Mark Type for lt Ident gt 169 6 3 96 L1826 Can t Read File lt Filename gt is not an ELF Library Containing ELF Objects ELF Objects Expected 169 User s Manual MCUez Linker 106 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com MCUez Linker Freescale Semiconductor Inc 6 3 97 6 3 98 6 3 99 6 3 100 6 3 101 6 3 102 6 3 103 6 3 104 6 3 105 6 3 106 6 3 107 6 3 108 6 3 109 6 3 110 6 3 111 6 3 112 6 3 113 6 3 114 6 3 115 6 3 116 63117 6 3 118 6 3 119 6 3 120 6 3 121 0 9 122 6 3 123 6 3 124 Linker Messages Contents L1902 lt Cmd gt Command not Supported 169 L1903 Unexpected Symbol in Link Parameter File 170 L1905 Invalid Section Attribute for Program Header 170 L1906 Fixup Out of Buffer lt Obj gt Referenced at Offset lt ACdress gt cc ncc ck ecm ace nese ew sew ba meen 170 L1907 Fixup Overflow in lt Object gt Type lt objType gt at Offset e MM 170 L1908 Fixup Err
170. ted by the MCUez linker 3 3 Parameter Files Input The linker parameter file is an ASCII text file that is required for each application It contains linker commands that define the linking process No special extension is required However it is suggested that parameter filenames have the extension prm Parameter files are searched for in the project directory and then in the GENPATH directories MCUez Linker User s Manual MOTOROLA Files 37 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 3 4 Absolute Files Output After a successful link session the linker generates an absolute file containing the target code as well as some debugging information This file is written to the directory assigned to the environment variable ABSPATH If the variable contains more than one path the absolute file is written to the first directory specified If this variable is not set the absolute file is written to the directory where the parameter file was found Absolute files always get the extension abs 3 5 Motorola S Files Output 3 6 Map Files User s Manual After a successful link session the linker generates a Motorola S record file which can be burnt into an EPROM This file contains information stored in all READ_ONLY sections in the application The extension for the generated Motorola S record file depends on the setting of the SRECORD variable e If SRECORD S1 the Motorola
171. this example the fibo abs application is built from the files fibo o and startup o MCUez Linker 52 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc 4 4 7 SEGMENTS Define Memory Map Syntax Description MCUez Linker Example lt startAddr gt TO lt endAddr gt ALIGN lt alignmentRule gt F END SEGMENTS READ_ONLY READ_WRITE SIZE Operating Procedures Linker Commands NO_INIT PAGED lt size gt ILL lt fillPattern gt The SEGMENTS block is optional in a PRM file The SEGMENTS command allows the user to assign meaningful names to address ranges on the target board These names can then be used in subsequent PLACEMENT statements thus increasing the readability of the parameter file Each address range defined is associated with e A qualifier e A start and end address or a start address and a size e An optional alignment rule e An optional fill pattern Segments are closely related to hardware memory areas For example there may be one READ_ONLY segment for each bank of the target board ROM area and another one covering the RAM area Using the small memory model the user can define a segment for the RAM area and another one for the ROM area LINK test abs NAMES test o startup o END SEGMENTS RAM_ AREA RO
172. ting Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands 4 4 4 MAIN Specify Root Function Syntax Description Example MAIN FuncName The MAIN command is optional If this command is specified in a prm file it defines the root function for an ANSI C or C application function invoked at the end of startup function When MATN is not specified in the prm file the linker looks for a function named MAIN and uses it as root The user can specify any static or global function as the application root function Assembly applications do not require a MAIN function MAIN MyGlobMain Specify a global variable as application root MAIN myFile o myLocMain Specify a local variable as application root Local symbols defined in an assembly module cannot be specified as the root function 4 4 5 MAPFILE Configure Map File Syntax Description NOTE MCUez Linker MAPFILE ALL NONE TARGET FILE STARTUP_STRUCT SEC_ALLOC OBJ_ALLOC OBJ_DEP OBJ_UNUSED COPYDOWN STATISTIC A protocol of the link process is written to a list file referred to as the map file The name of the map file is the same as the abs file but with extension map The map file is written to the directory given by the environment variable TEXTP
173. tion 2 section n Allocation in the segment where text is placed is performed as follows e Objects from section init are allocated if init is not specified in the PLACEMENT block e Objects from section startData are allocated if startData is not specified in the PLACEMENT block e Objects from section text are allocated User s Manual MOTOROLA Operating Procedures 67 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures e Objects from section rodata are allocated if rodata is not specified in the PLACEMENT block e Objects from section rodatal are allocated if rodatal is not specified in the PLACEMENT block e Objects from the first user defined code section not specified in PLACEMENT block are allocated e Objects from the next user defined code section not specified in the PLACEMENT block are allocated e This continues until all user defined code sections are allocated e Objects from section copy are allocated if copy is not specified in the PLACEMENT block init Start Data user user data text rodata rodatal E f copy section 1 section n 4 4 9 STACKSIZE Define Stack Size Syntax Description Example User s Manual STACKSIZE Number The STACKSIZE command is optional in a PRM file Additionally both STACKTOP and STACKSIZE commands cannot be spe
174. tion are listed in the NAMES block 6 3 31 L1109 lt Segment Name gt Appears Twice in SEGMENTS Block Type Error Description A segment name is specified twice in a parameter file This is not allowed When this segment name is referenced in the PLACEMENT block the linker cannot detect which memory area is referenced Example LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF MY_STK READ_WRITE 0xB00 TO OXxBFF MY_RAM READ_WRITE 0xC00 TO OxCFF ERROR MY_RAM appears twice in SEGMENTS block END PLACEMENT text rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK END Set rese V ECTOR ADDRI t vector on _Startup ESS OXFFFE _Startup Tip Change one of the segment names to generate unique segment names If the same memory area is defined twice remove one of the definitions User s Manual MCUez Linker 130 Linker For More Information On This Product Messages Go to www freescale com MOTOROLA Freescale Semiconductor Inc 6 3 32 L1110 lt Segment Name gt Appears Twice in PLACEMENT Block Type Error Linker Messages Linker Messages Reference Description The specified segment appears twice in a PLACEMENT block and one of the PLACEMENT lines is part of a segment list A segment name may appea
175. tion character is also a Slash Example list LIBPATH c mcuez lib OBJPATH c mcuez work Is interpreted by the compiler as LIBPATH c mcuez libOBJPATH c mcuez work Tip Entera period after paths that end with a slash or remove the trailing slash LIBPATH c mcuez lib OBJPATH c mcuez work MCUez Linker User s Manual MOTOROLA Linker Messages 109 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 4 L1000 lt Command Name gt not Found Type Error Description This message is generated when a mandatory linker command is missing from the parameter file Mandatory commands are LINK Contains the name of the absolute file to generate If the option O is specified on the command line and the LINK command is missing from the parameter file this message is not generated e NAMES Lists the files building the application PLACEMENT Associates at least the predefined sections text and data with a memory range If LINK command is missing the message is LINK not found If NAMES command is missing the message is NAMES not found If PLACEMENT command is missing message is PLACEMENT not found Example NAMES fibo o startl2s o ansis lib END SEGMENTS MY_RAM READ_WRITE 0x800 TO Ox80F MY_ROM READ_ONLY 0x810 TO
176. tomer application by customer s technical experts Motorola does not convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unin tended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death as sociated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer How to reach us USA EUROPE Locations Not Listed Motorola Literature Distribution P O Box 5405 Denver Colorado 80217 1 800 441 2447 or 1 303 675 2140 Customer Focus Center 1 800 521 6274 JAPAN Motorola Japan Ltd SPD Strategic Planning Office 141 4 32 1 Nishi Gotanda Shinagawa ku Tokyo Japan 03 5487 8488 ASIA PACIF
177. tupData stackOffset Initialize Here user defined code could be inserted the stack can be used call main _startupData main while 1 end loop forever NOTE Field names in the startup structure should not be changed Fields inside the structure can be removed but do not change names of the different fields 4 6 3 User Defined Startup Routines Two ways to replace the standard startup routine with a user defined routine 1 Provide a startup module containing a function named _Startup and link 1t with the application 2 Implement a personal function and define it as an entry point for the application using the command INIT NIT function_name User s Manual MCUez Linker 88 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc User s Manual MCUez Linker 5 1 Contents MCUez Linker Section 5 Environment Variables 32 a AAA 90 3 3 Linker OPONE A ae 90 5al sd ra AAA 91 e nn EAE A EE E E EET 91 ae eer eee ee eee Leer een ee eee ee ee ert ere ee ee 92 5 3 4 eee ee ee eee ee ee ee ee ee ee rere ee 92 e 5 POCO o ee ee ee 92 5 3 6 Wl EE dee ened emia de ches CE EEE ener ET 93 5 3 7 O E E E OEE P E T T OEE E E ET 93 5 3 8 a E E ee E EE E E E T E EE ere 94 33 9 Meee eee TT ee Cee eer eee EEES ET ETETEA EEA 94 A ES ee ee ee ee ee ee eee ee ee ee ee eee eee re 94 5 3 11 WU
178. ual MOTOROLA Table of Contents 13 For More Information On This Product Go to www freescale com User s Manual Freescale Semiconductor Inc Table of Contents 6 3 111 63 112 6 3 113 6 3 114 6 3 115 6 3 116 6 3 117 6 3 118 63 119 6 3 120 6 3 121 6 3 122 6 3 123 6 3 124 6 3 125 6 3 126 63 127 6 3 128 6 3 129 6 3 130 L1921 Marking Too Many Nested Procedure Calls 173 L1922 File lt filename gt Has DWARF Data of Different Version DWARF Data may not be Generated 173 L1927 Fixups for DWARF Section lt sectionname gt N t Correctly MM 173 L1928 Limitation Code Size NUM orar 173 L1929 Limitation Too many Mections lt num gt 174 L1930 Unknown Fixup Type in lt ident gt Type lt type gt AR CO A pene beast oes AA 174 L1931 Program Header Begin is not Aligned on the Beginning of a Section os dicate ee dinw dawns seade buds 174 L1932 Program Header Overflow in lt name gt at lt index gt 174 LIVES ELF ele Warming desir 174 Lig ELF acti EnO rai 175 L19306 ELF Output lt details gt EO sii 24244322440 4402408 176 L1938 Type Clash in Segment Corrupt Object lt name gt 177 L4000 Could not Open Object File lt objFile gt it NAMES List ic a atodos 177 L4001 Link Parameter File lt PRMFile gt not Found 177 14002 NAMES Section was not Found in Linker Parameter File lt PRM File gt oooooo
179. umber allows the message to be easily searched in the manual or online help The user can map messages to different classes by using the buttons located on the right side of the dialog box Each button refers to a message class To change the class associated with a message select the message in the list box and click the button associated with the class where the message is to be moved The Default button will reset selected messages to their default class The Reset All button will reset all messages to their default class Example To define the warning message L1201 No stack defined as an error message 1 Click the Warning tab to display the list of all warning messages 2 Click on the string L1201 No stack defined in the list box to select the message 3 Click the Error button to define this message as an error message Click Yes to validate the change or No to retain the previous mapping MCUez Linker User s Manual MOTOROLA Graphical User Interface GUI 33 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Graphical User Interface GUI 2 3 4 3 View Menu 2 3 4 4 Help Menu This menu enables the user to customize the linker window e Select View Toolbar to display or hide the toolbar e Select View Status Bar to display or hide the status bar e Select View Log Change Font to open a standard Font Selection dialog box Options selected in this
180. unctions IROFunc LDAB 0 BRA int XIRQOFunc LDAB 2 BRA int SwIFunc LDAB 4 BRA int OpCodeFunc LDAB 6 BRA int ResetFunc LDAB 8 BRA entry DummyFunc RTI User s Manual MCUez Linker 74 Operating Procedures MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Operating Procedures Linker Commands int LDX Data ABX TING 0 Y RTI entry LDS SAFE loop BRA loop VectorTable SECTION Definition of vector table IRQInt DC W IROFunc XIRQInt DC W XIROFunc SWIInt DC W SWIFunc OpCodelnt DC W OpCodeFunc COPResetInt DC W DummyFunc No function attached to COP Reset ClMonResInt DC W DummyFunc No function attached to Clock MonitorReset ResetiInt DC W ResetFunc NOTE Each constant in the section VectorTable is defined as a word 2 byte constant because entries in the HC12 vector table are 16 bits wide In the previous example the constant TRQInt is initialized with the address of the label TROFunc The constant XIRQInt is initialized with the address of the label XTRQFunc All labels specified as an initialization value must be defined published using XDEF or imported using XREF before the vector table section Forward referencing is not allowed in the DC directive When developing a banked applic
181. urce Section Name gt to Section lt Destination Section Name gt Type Error Description An invalid move operation has been detected for objects defined in a binary file inside a section This message is generated when a variable is moved in a code or constant section or a function is moved in a data or constant section Example ERROR counter from file fibo o cannot be moved from section data to section text LINK fibo abs NAMES fibo o startup o END SEGMENTS MY_RAM READ_WRITE 0x800 TO 0x80F MY_ROM READ_ONLY 0x810 TO OxAFF STK_1 READ_WRITE 0xB00 TO OxBFF END PLACEMENT text INTO MY_ROM data INTO MY_RAM stack INTO STK_1 END OBJECT_ALLOCATION fibo o DATA IN text END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Move the specified object into a section with the required attribute or remove the move operation MCUez Linker User s Manual MOTOROLA Linker Messages 161 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages 6 3 68 L1504 lt Object Name gt from section lt Section Name gt Cannot be Moved from Section lt Source Section Name gt to Section lt Destination Section Name gt Type Error Description An invalid move operation has been detected for objects de
182. was opened but not closed Close the comment 6 3 77 L1626 Unexpected End of File Type Description Tip User s Manual Error The end of file was encountered and the scanner was involved in the inner scope of an expression or structure nesting This is illegal Check the syntax of the linker parameter file MCUez Linker 164 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference 6 3 78 L1627 PRESTART Command not Supported Yet Type Error Description The PRESTART command is recognized by the parser but is not yet implemented Tip Contact a Motorola representative for features of the next release 6 3 79 L1628 HEXFILE Command not Supported Yet Type Error Description The HEXFILE command is recognized by the parser but is not implemented yet Tip Contact a Motorola representative for features of the next release 6 3 80 L1629 START_DATA Command not Supported Yet Type Error Description The START_DATA command is recognized by the parser but is not implemented yet Tip Contact a Motorola representative for features of the next release 6 3 81 L1700 File lt Filename gt Should Contain DWARF Information Type Error Description The binary file that defines the startup structure does not contain DWARF information This is required because the type of startup st
183. xBOO TO OXxBFF ROM_2 READ_ONLY 0x500 TO Ox7FF END PLACEMENT text rodata INTO MY_ROM data INTO MY_RAM stack INTO MY_STK CEE INTO ROM_2 ERROR text appears twice in PLACEMENT block END Set reset vector on _Startup VECTOR ADDRESS OxFFFE _Startup Tip Remove one occurrence of the specified section from the PLACEMENT block 6 3 34 L1112 lt Section name gt Section Has Segment Type lt Segment Qualifier gt Illegal Type Error Description A section is placed in a segment defined with an incompatible qualifier This message is generated when e The section stack is placed ina READ_ONLY segment e The section bss is placed ina READ_ONLY segment e The section startData is placed ina READ_WRITE NO_INIT or PAGED segment e The section init is placedinaREAD_WRITE NO_INIT or PAGED segment e The section copy is placed in a READ_WRITE NO_INIT or PAGED segment User s Manual MCUez Linker 132 Linker Messages MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc Linker Messages Linker Messages Reference e The section text is placed in a READ_WRITE NO_INIT or PAGED segment e The section data is placed ina READ_ONLY segment e A data section is placed ina READ_ONLY segment e A code section is placed ina READ_WRITE segment Example a ERROR The data section has segment type READ_ONLY illegal LINK fibo abs
Download Pdf Manuals
Related Search
Related Contents
KK 2.1 Multi-Rotor Control Board CA601 (英文) Image HGTL09110C Treadmill User Manual HP V100W, 2GB User Guide - Signal Boosters 取扱説明書及び安全ガイドを必ずご参照下さい。 *2012 年 3 月 27 日 User Manual - Kantar Media CCM II Notes - UCD Centre of Adhesion and Adhesives Silvercrest Model BD-11 Floor Plan Télécharger le manuel de Slendertone Abs Copyright © All rights reserved.
Failed to retrieve file