Nios® II Software Developer Handbook

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

5.4.1.1.4. Creating a Script that Uses the Command-Line Tools

If you create a script that uses the command-line tools nios2-bsp-create-settings and nios2-bsp-generate-files explicitly, or you use these tools directly on the command line, it is possible to create the BSP settings file in a directory different from the directory where the generated BSP files reside. However, in most cases, when you want to store a BSP’s generated files directory under source control, you also want to store the BSP settings file. Therefore, it is best to keep the settings file with the other BSP files. You can rebuild the project without the BSP settings file, but the settings file allows you to update and query the BSP.
Note: Because the BSP depends on a .sopcinfo file, you must usually store the .sopcinfo file in source control along with the BSP. The BSP settings file stores the .sopcinfo file path as a relative or absolute path, according to the definition on the nios2-bsp or nios2-bsp-create-settings command line. You must take the path into account when retrieving the BSP and the .sopcinfo file from source control.