Nios® II Software Developer Handbook

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

5.3.3. Software Build Process

To create a software project with the Nios® II SBT, you perform several high-level steps:
  1. Obtain the hardware design on which the software is to run. When you are learning about the build tools, this might be a Nios® II design example. When you are developing your own design, it is probably a design developed by someone in your organization. Either way, you need to have the SOPC Information File (.sopcinfo).
  2. Decide what features the BSP requires. For example, does it need to support an RTOS? Does it need other specialized software support, such as a TCP/IP stack? Does it need to fit in a small memory footprint? The answers to these questions tell you what BSP features and settings to use.

    For more information about available BSP settings, refer to the " Nios® II Software Build Tools Reference" chapter.

  3. Define a BSP. Use the Nios® II SBT to specify the components in the BSP, and the values of any relevant settings. The result of this step is a BSP settings file, called settings.bsp.

    For more information about creating BSPs, refer to the "Board Support Packages" chapter.

  4. Create a BSP makefile using the Nios II build tools.
  5. Optionally create a user library. If you need to include a custom software user library, you collect the user library source files in a single directory, and create a user library makefile. The Nios II build tools can create a makefile for you. You can also create a makefile by hand, or you can autogenerate a makefile and then customize it by hand.

    For more information about creating user library projects, refer to the “Applications and Libraries” chapter.

  6. Collect your application source code. When you are learning, this might be a Nios® II software example. When you are developing a product, it is probably a collection of C/C++ source files developed by someone in your organization.

    For more information about creating application projects, refer to the “Applications and Libraries” chapter.

  7. Create an application makefile. The easiest approach is to let the Nios® II build tools create the makefile for you. You can also create a makefile by hand, or you can autogenerate a makefile and then customize it by hand.

    For more information about creating makefiles, refer to the “Makefiles” chapter.

    Note: You must use the correct directory path for fetching the respective files from your project folder.