Step 3: Compile the Quartus Prime project
If the Intel’s Platform Designer or Quartus Prime project files have been modified, a full compilation of the generated hardware is required. The following command will perform this:
- For both Nios II and Nios V:
quartus_cmd.exe <Quartus_Prime_Project_Name>.qpf -c <Quartus_Prime_Project_Name>.qsf
Note: The gemrtos_build script uses the project name specified in the “Quartus Prime Project Name” parameter of the GeMRTOS Multiprocessor component’s configuration panel. To override this, use the -qpr option:
- For Nios II:
bash gemrtos_build.sh -qpr <Quartus_Prime_Project_Name>
- For Nios V
gemrtos_build.bat -qpr <Quartus_Prime_Project_Name>
This step compiles the entire hardware project and may take some time to complete. It is recommended to execute this step, along with Step 1 and Step 2, only when the Intel’s Platform Designer or Quartus Prime project files have been modified.
Step 4: Generate the BSP settings file
The BSP project contains the software support package for the hardware. It retrieves hardware information from the .sopcinfo file and includes the device drivers for all components in the Intel’s Platform Designer project. The following commands generate the BSP project:
- For Nios II:
nios2-bsp hal ./<BSP_sub_folder> <Platform_Designer_project_name>.sopcinfo --cpu-name <GeMRTOS_Multiprocessor_component_name>_gemrtos_proc_1 -–cmd="set_setting hal.enable_reduced_device_drivers true"
- For Nios V
niosv-bsp -c --sopcinfo=<Platform_Designer_project_name>.sopcinfo --type=hal -i=<GeMRTOS_Multiprocessor_component_name>_gemrtos_proc_1 -–cmd="set_setting hal.enable_reduced_device_drivers true" <BSP_sub_folder>/settings.bsp
where:
<BSP_sub_folder> is the destination folder for the BSP project, which by default is located in the ./software subdirectory.
< Platform_Designer_project_name> refers to the name of the Intel’s Platform Designer project.
<GeMRTOS_Multiprocessor_component_name> is the name assigned to the GeMRTOS Multiprocessor component in the Intel’s Platform Designer project (by default, this is set to “GeMRTOS_Multiprocessor_0”).
Executing this command creates or updates the settings.bsp file within the BSP project folder. The BSP project is configured with the processor that has an ID equal to 1 as the reference for the project.
Note: The BSP project is created similarly to a uniprocessor BSP project, but with the added requirement of specifying the reference processor in a multiprocessor system. By default, the processor with ID 1 is used as the reference.
If it is wanted to get the correct arguments, it can be executed:
- for Nios II:
qsys-script.exe --system-file< Platform_Designer_project_name>qsys --script=./ip/GeMRTOS_Multiprocessor/qsysscript.tcl
- for Nios V:
%QSYS_ROOTDIR%/qsys-script.exe --system-file< Platform_Designer_project_name>qsys --script=./ip/GeMRTOS_Multiprocessor/qsysscript.tcl
This command will produce the command line to execute according the configuration of the system.