- The total memory allocated for the stack can be modified using this linker
option. The variable
_STACK_SIZEis the total space allocated for the stack. The
_STACK_SIZEvariable is given the default value of 100 words, or 400 bytes. If your program is expected to need more than 400 bytes for stack and heap combined, it is recommended that you increase the value of
_STACK_SIZEusing this option. The value is in bytes.
In certain cases, a program might need a bigger stack. If the stack size required by the program is greater than the stack size available, the program tries to write in other, incorrect, sections of the program, leading to incorrect execution of the code.Note: A minimum stack size of 16 bytes (0x0010) is required for programs linked with the Xilinx-provided C runtime (CRT) files.
- The total memory allocated for the heap can be controlled by the value given
to the variable
_HEAP_SIZE. The default value of
Dynamic memory allocation routines use the heap. If your program uses the heap in this fashion, then you must provide a reasonable value for
For advanced users: you can generate linker scripts directly from IP integrator.