Linker Options - 2025.2 English - UG1400

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2025-11-20
Version
2025.2 English
-defsym _STACK_SIZE=value
Use this linker option to modify the total memory allocation for the stack. The variable _STACK_SIZE is the total space allocation. The _STACK_SIZE variable has the default value of 100 words, or 400 bytes. If your program requires more than 400 bytes for stack and heap combined, increase the value of _STACK_SIZE. The value is in bytes.

In certain cases, a program can require a bigger stack. A program requiring a larger stack size than the size available can lead to incorrect execution of the code.

Note: A minimum stack size of 16 bytes (0x0010) is required for programs linked with the AMD-provided C runtime (CRT) files.
-defsym _HEAP_SIZE=value
Allocate the total memory for the heap with the variable _HEAP_SIZE. The default value of _HEAP_SIZE is zero.

Dynamic memory allocation routines use the heap. If your program uses the heap in this fashion, then you must provide a reasonable value for _HEAP_SIZE.

For advanced users: you can generate linker scripts directly from IP integrator.