lscript - 2025.1 English - UG1400

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

Document ID
UG1400
Release Date
2025-05-29
Version
2025.1 English
Create linker script
Table 1. lscript- Create linker script
XSCT methods Arguments Corresponding Python API Arguments Comments
lscript memory

-app <application-name> Name of application from workspace.

-supported-mem Returns supported memory regions for each section.

lscript.get_memory_regions  
Note: In Python CLI, lscript object is to be created using host component. On the other hand, in XSCT you pass application_name to get the memory regions.
Note: In XSCT, there was no provision to create/update memory regions . In Python CLI, it can be done using the following commands:lscript.add_memory_region update_memory_region

Required Arguments:

name = <name> Name for the new memory region.

base_address = <base_address> Base address for the memory region.

size = <size> Size of the memory region.

lscript section

-app <application-name> Name of application from workspace.

-name <section-name> Name of the section to be edited.

-mem <memory-region> Name of the memory region to be used for the section.

-size <section-size> Size of the section.

-addAdd a new section.

-type Type of new section to be added.

Supported types are CODE, DATA, STACK, HEAP.

  1. lscript.get_ld_sections

    (To list the sections)

  2. lscript.update_ld_section

    (To update the ld sections)

  1. None
  2. Required Arguments:

section = <section> An existing memory code section identifier.

region = <memory_region> The updated memory region for the code section.

 
lscript def-mem

-app <application-name> Name of application from workspace.

-code Return default code memory.

-data Return default data memory.

-stack Return default stack & heap memory.

lscript.get_stack_size

(To get stack size)

lscript.get_heap_size

(To get heap size)

   
lscript generate   lscript.regenerate