Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

5.4.2.4. Changing the Default Linker Memory Region

The default Tcl script chooses the largest memory region connected to your Nios® II processor as the default region.

For more information about all default memory sections mapped to this default region, refer to the previous chapter, "Creating a Custom Linker Section".

You can pass in a command-line option to the default Tcl script to override this default mapping. To map all default sections to onchip_ram, type the following command:

nios2-bsp hal my_bsp --default_sections_mapping onchip_ram

If you run nios2-bsp again to update your BSP, the default Tcl script overrides your default sections mapping. To prevent your default sections mapping from being changed, provide nios2-bsp with the original --default_sections_mapping command-line option or pass it the DONT_CHANGE value for the memory name instead of onchip_ram.