Nios® II Software Developer Handbook

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

5.3.1. Applications and Libraries

The Nios® II SBT has nearly identical support for C/C++ applications and libraries. The support for applications and libraries is very simple. For each case, the SBT generates a private makefile (named Makefile). The private makefile is used to build the application or user library.

The private makefile builds one of two types of files:

  • A .elf file—For an application
  • A library archive file (.a)—For a user library

For a user library, the SBT also generates a public makefile, called public.mk. The public makefile is included in the private makefile for any application (or other user library) that uses the user library.

When you create a makefile for an application or user library, you provide the SBT with a list of source files and a reference to a BSP directory. The BSP directory is mandatory for applications and optional for libraries.