4.4.5 xc32-ld (32-Bit Linker)
A subset of command-line options may be specified in MPLAB X IDE. Select a category, and then set up linker options. For additional options, see MPLAB Object Linker for 32-bit Devices documentation. See also 4.4.8 Options Page Features.
Option | Description | Command Line |
---|---|---|
Heap Size (bytes) | Specify the size of the heap in bytes. Allocate a run-time heap of size bytes for use by C programs. The heap is allocated from unused data memory. If not enough memory is available, an error is reported. | --defsym=_min_heap_size=<size> See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Minimum stack size (bytes) | Specify the minimum size of the stack in bytes. By default, the linker allocates all unused data memory for the run-time stack. Use this option to ensure that at least a minimum sized stack is available. The actual stack size is reported in the link map output file. If the minimum size is not available, an error is reported. | --defsym=_min_stack_size=<size> See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Allow overlapped sections | Check to ignore overlaps of section addresses. This feature is provided for diagnostic purposes and should be used only to diagnose a linker error related to section-allocation issues. Uncheck to check for overlaps. | --[no-]check-sections See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Remove unused sections | Check to enable garbage collection of unused input sections (on some targets). This is typically used with the controls that place data/functions into their own section. Uncheck to disable garbage collection. | --[no-]gc-sections See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Use response file to link | Pass linker options in a file rather than on the command line. On Windows systems, this option allows you to properly link projects with a large number of object files that would normally overrun the command-line length limitation of the Windows OS. | |
Write start linear address record | Use the ELF file's entry-point field to write a Start Linear Address (SLA) record (type 0x05) to the hex file. The hex record may be useful for a bootloader that needs to determine the entry point to the application. You can set the value using the |
See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Additional driver options | Type here any additional driver options that do not have dedicated GUI widgets in the Project Properties dialog. The string entered here will be emitted verbatim with the other driver options. |
Option | Description | Command Line |
---|---|---|
Optimization level of Standard Libraries | Select the optimization level with which libraries were built. Your compiler edition may support only some library optimizations. Equivalent to -On option emitted for the link stage of compilation, where n is an option below:
| -On See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
System Libraries | Add libraries to be linked with the project files. You may add more than one. | --library=name See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Library directories | Add a library directory to the library search path. You may add more than one. | --library-path="name" See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Exclude Standard Libraries | Check to not use the standard system startup files or libraries when linking. Only use library directories specified on the command line. Uncheck to use the standard system startup files and libraries. | -nostdlib See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Do not link crt0 startup code | Exclude the default startup code because the project provides application-specific startup code. | -nostartfiles See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Do not link device startup code | Do not link the default device-specific startup code (for example, startup_device.c ) | -mno-device-startup-code See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Option | Description | Command Line |
---|---|---|
Generate map file | Create a map file. | -Map="file" See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Display memory usage | Check to print memory usage report. Uncheck to not print a report. | --report-mem See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Generate cross-reference file | Check to create a cross-reference table. Uncheck to not create this table. | --cref See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Warn on section realignment | Check to have warnings printed if the start of a section changes due to alignment. This feature is provided for diagnostic purposes and should be used only to diagnose section-alignment issues. Uncheck to inhibit warning. | --warn-section-align See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Trace Symbols | Add/remove trace symbols. |
--trace-symbol symbol See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Option | Description | Command Line |
---|---|---|
Linker symbols | Create a global symbol in the output file containing the absolute address (expr ). You may use this option as many times as necessary to define multiple symbols in the command line. A limited form of arithmetic is supported for the expr in this context: you may give a hexadecimal constant or the name of an existing symbol, or use + and - to add or subtract hexadecimal constants or symbols. | --defsym=sym See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Preprocessor macro definitions | Define preprocessor macros for use in linker scripts (when the option is passed to xc32-gcc directly). | -Dmacro See MPLAB® XC32 Assembler, Linker and Utilities User's Guide. |
Symbols | Specify symbol information in the output. |
|