Specifications
Description
This command is provided to define a user-defined external memory device, outside the hardware system.
Such a device would typically be mapped through a bridge component. This command adds an external
memory device to the BSP's memory map, allowing the BSP to define memory regions and section
mappings for the memory as if it were part of the system. The external memory device parameters are
stored in the BSP settings file.
add_memory_region
Usage
add_memory_region <name> <slave_desc> <offset> <span>
Options
• <name>: String with the name of the memory region to create.
• <slave_desc>: String with the slave descriptor of the memory device for this region.
• <offset>: String with the byte offset of the memory region from the memory device base address.
• <span>: String with the span of the memory region in bytes.
Description
Creates a new memory region for the linker script. This memory region must not overlap with any other
memory region and must be within the memory range of the associated slave descriptor. The offset and
span are decimal numbers unless prefixed with 0x.
Example
add_memory_region onchip_ram0 onchip_ram0 0 0x100000
add_section_mapping
Usage
add_section_mapping <section_name> <memory_region_name>
Options
• <section_name>: String with the name of the linker section.
• <memory_region_name>: String with the name of the memory region to map.
Description
Maps the specified linker section to the specified linker memory region. If the section does not already
exist, add_section_mapping creates it. If it already exists, add_section_mapping overrides the existing
mapping with the new one. The linker creates the section mappings in the order in which they appear in
the linker script.
Example
add_section_mapping .text onchip_ram0
NII5V2
2015.05.14
add_memory_region
15-65
Nios II Software Build Tools Reference
Altera Corporation
Send Feedback